What's the difference between Properties/DisplayName element and VisualElements@DisplayName attribute in .appxmanifest file

人盡茶涼 提交于 2019-12-11 08:35:23

问题


In following appxmanifest, what is the difference between

Package/Properties/DisplayName element

and

Package/Applications/Application/VisualElements@DisplayName

<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
  <Identity Name="" 
            Version="" 
            Publisher="" />
  <Properties>
    <DisplayName></DisplayName> <!-- this -->
    <PublisherDisplayName></PublisherDisplayName>
    <Logo></Logo>
  </Properties>
  <Prerequisites>
    <OSMinVersion></OSMinVersion>
    <OSMaxVersionTested></OSMaxVersionTested>
  </Prerequisites>
  <Resources>
    <Resource Language="" />
  </Resources>
  <Applications>
    <Application Id="" StartPage="">
      <!-- and this -->
      <VisualElements DisplayName="" 
           Description=""
           Logo="" SmallLogo=""  
           ForegroundText="" BackgroundColor="">
         <SplashScreen Image="" />
      </VisualElements>
    </Application>
  </Applications>
</Package>

https://msdn.microsoft.com/en-us/library/windows/apps/br211475.aspx


回答1:


Package/Properties/DisplayName

The DisplayName is the name of your app that you reserve in the store, for apps which are uploaded to the store.

This is the actual reserved name in the developer portal (= store). When you package your app for upload to the store, this will be automatically set when going through the wizard in Visual Studio.

The root element Visual Elements is how the Windows Store app is visualized on the user's pc/phone.

Package/Applications/Application/VisualElements

Describes the visual aspects of the Windows Store app: its default tile, logo images, text and background colors, initial screen orientation, splash screen, and lock screen tile appearance.

So the DisplayName property under the Visual Elements element is how the app's name is shown on the user's pc. This can be different from the name in the store (e.g. localized).

A friendly name for the app that can be displayed to users. This string is localizable; see Remarks for details. There are two explicitly reserved words that may not be used as the DisplayName for apps uploaded to the Windows Store: "NoUIEntryPoints" and "NoUIEntryPoints-DesignMode". These identifiers are reserved for use by development tools and test suites.

Source: https://msdn.microsoft.com/en-us/library/windows/apps/br211471.aspx




回答2:


I have an app in the Store that may explain this issue.

Package/Properties/Display Name element refers to the app name in the Store which is the same as what's in Dashboard. While if you change the Display Name distribute in Visual Elements, your app will be different from itself in the Store after user installs it from the Store.



来源:https://stackoverflow.com/questions/40760695/whats-the-difference-between-properties-displayname-element-and-visualelements

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!