uap:VisualElements (Windows 10)

描述應用程式的視覺層面:其預設磚、標誌影像、文字和背景色彩、初始螢幕方向、啟動顯示畫面,以及鎖定螢幕磚外觀。

元素階層

<套件>

    <應用程式>

         <應用程式>

              <uap:VisualElements>

Syntax

<uap:VisualElements
    DisplayName = 'A string with a value between 1 and 256 characters. This string is localizable.' 
    Description = 'A string between 1 and 2048 characters.'
    BackgroundColor = 'A three-byte hexadecimal number preceded by "#" or a named color. See Remarks for a list of named colors.'
    Square150x150Logo = 'A string between 1 and 256 characters in length that ends with ".jpg", ".png", or ".jpeg" that cannot contain these characters: <, >, :, ", |, ?, or *. In this string, the / and \ characters cannot be the first or last characters. Also, the string can contain / or \ but not both.'
    Square44x44Logo = 'A string between 1 and 256 characters in length that ends with ".jpg", ".png", or ".jpeg" that cannot contain these characters: <, >, :, ", |, ?, or *. In this string, the / and \ characters cannot be the first or last characters. Also, the string can contain / or \ but not both.'
    AppListEntry = 'An optional string that can have one of the following values: "default" or "none".' >

  <!-- Child elements -->
  uap:DefaultTile?
  & uap:LockScreen?
  & uap:SplashScreen?
  & uap:InitialRotationPreference?

</uap:VisualElements>

答案

? 選擇性 (零或一個 &) 交錯連接器, (可能會依任何順序發生)

屬性和元素

屬性

屬性 描述 資料類型 必要 預設值
DisplayName 可向使用者顯示之應用程式的易記名稱。 此字串可當地語系化;如需詳細資訊 ,請參閱 值介於 1 到 256 個字元的字串。 這個字串可當地語系化。
說明 應用程式的描述。 此字串可當地語系化;如需詳細資訊 ,請參閱 介於 1 到 2048 個字元之間的字串。 Yes
BackgroundColor 指定應用程式磚的背景色彩。 如需色彩名稱 ,請參閱 一節。 Yes
Square150x150Logo 用來作為應用程式開始畫面中磚的影像,以及工作切換器上的影像。 如需有關如何在此屬性中指定影像的詳細資訊,請參閱 長度介於 1 到 256 個字元之間的字串,其結尾為 .jpg.png 或 ,且 .jpeg 不能包含下列字元: <>:"|?* 。 在此字串中 / ,和 \ 字元不能是第一個或最後一個字元。 此外,字串也可以包含 或 , \ 但不能同時包含 / 兩者。 Yes
Square44x44Logo 作為應用程式 [開始畫面] 小型磚的影像,以及 [所有應用程式] 清單上的影像。 如需有關如何在此屬性中指定影像的詳細資訊,請參閱 長度介於 1 到 256 個字元之間的字串,其結尾為 .jpg.png 或 ,且 .jpeg 不能包含下列字元: <>:"|?* 。 在此字串中 / ,和 \ 字元不能是第一個或最後一個字元。 此外,字串也可以包含 或 , \ 但不能同時包含 / 兩者。 Yes
AppListEntry [所有應用程式] 清單中的專案。 針對不需要 [開始] 功能表磚的進入點選取 [無]。 選擇性字串,可以有下列其中一個值:「default」 或 「none」。 No 預設值

注意

此處指定的背景色彩也適用于這些專案:

  • 任何應用程式擁有對話方塊中的按鈕色彩
  • 市集中的 [應用程式描述] 頁面

子元素

子項目 描述
uap:DefaultTile 代表 [開始] 畫面上應用程式的預設磚。 此磚會在應用程式第一次安裝之前顯示,然後才收到任何更新通知。 當磚沒有顯示通知時,磚會還原為此預設值。
uap:InitialRotationPreference 描述應用程式想要針對最佳使用者體驗顯示的方向。 在可旋轉的裝置上,例如平板電腦,應用程式將不會針對此處未指定的方向重新繪製。 例如,如果應用程式只 Landscape 指定 和 LandscapeFlipped 方向,且裝置會旋轉為 Portrait 方向,則應用程式將不會旋轉。
uap:LockScreen 定義徽章和通知,代表鎖定畫面上的應用程式,當系統鎖定時會顯示。
uap:SplashScreen 定義啟動期間應用程式所顯示之啟動顯示畫面的外觀。

注意

在無法旋轉的裝置上,應用程式可能會顯示在該裝置的預設方向中,且會忽略應用程式的慣用方向。 不過,在啟用旋轉鎖定的裝置上,仍會接受您應用程式的慣用旋轉。

這些方向喜好設定選項適用于啟動 顯示畫面 和應用程式 UI,當應用程式啟動新的會話時。 您可以透過 AutoRotationPreferences 屬性在執行時間期間變更喜好設定。

父元素

父元素 描述
應用程式 代表包含套件中傳遞之部分或所有功能的應用程式。

備註

如需磚維度需求的詳細資訊,請參閱 磚大小

針對 Square150x150LogoSquare44x44Logo 影像,您可以提供不同縮放比例的影像,讓 Windows 可以為裝置和螢幕解析度選擇最佳大小。 您也可以提供協助工具的高對比影像和當地語系化的影像,以符合不同的 UI 語言。 此功能也可讓您將 DisplayNameDescription 屬性當地語系化。 如需詳細資訊,請參閱 全球化 主題。

Applications/Application/Extensions/Extension/FileTypeAssociation/Logo Applications/Application/Extensions/Extension/Protocol/Logo

以下顯示兩種標誌影像類型的大小需求:

Image 屬性 以圖元為單位縮放 (影像大小)
Applications/Application/VisualElements/@Square150x150Logo 100 (150x150)
250 (375x375)
Applications/Application/VisualElements/@Square44x44Logo 100 (44x44)
250 (110x110)
Applications/Application/VisualElements/@Tall150x310Logo 100 (150x310)
250 (375x775)

以下是支援的背景色彩名稱:

aliceBlue
瓦特文
青色
青綠色
azure
米黃色
淡黃色
黑色
一般
藍色
blueViolet
棕色
burlyWood
cadetBlue
淡黃綠
巧克力色
珊瑚紅
cmflowerBlue
玉米穗黃
大紅色
青色
深藍
深青色
darkGoldenrod

darkGray
深綠
dark一卡多
darkMagenta
darkOliveGreen
darkOrange
darkOrchid
darkRed
darkSalmon
darkSeaGreen
darkSlateBlue
darkSlateGray
darkTurquoise
darkViolet
deepPink
deepSkyBlue
dimGray
dodgerBlue
磚紅
瓦特文
forestGreen
桃紅
亮灰
ghostWhite

金色
金黃
灰色
綠色
greenYellow
蜜瓜白
hotPink
印度紅
靛藍
象牙白
卡其色
淡紫
擷取者
lawnGreen
檢視
lightBlue
lightCoral
lightCyan
lightGoldenrodYellow
lightGray
lightGreen
lightPink
lightSalmon
lightSeaGreen

lightSkyBlue
lightSlateGray
lightSteelBlue
lightYellow
淺綠色
limeGreen
亞麻黃
洋紅
暗紅色
mediumAquamarine
mediumBlue
mediumOrchid
mediumPurple
mediumSeaGreen
mediumSlateBlue
mediumSpringGreen
mediumTurquoise
mediumVioletRed
midnightBlue
mintCream
mistyRose
鹿皮黃
navajoWhite

海軍藍
oldLace
橄欖色
oliveDrab
橙色
orangeRed
蘭花紫
帕德德羅d
淺綠
擷耙文
擷取者VioletRed
papyaWhip
peachPuff
秘魯色
粉紅色
梅紅色
擷藍
紫色
紅色
rosyBrown
royalBlue
saddleBrown
淡橙紅

擷布
seaGreen
貝殼
深黃褐
銀色
skyBlue
slateBlue
slateGray
snow
springGreen
steelBlue
tan
藍綠色
薊紫
蕃茄紅
透明
淺粉藍
紫色
小麥色
白色
whiteSmoke
黃色
yellowGreen

範例

下列範例取自 SDK 範例的套件資訊清單。

<Applications>
    <Application Id="App" StartPage="default.html">
        <uap:VisualElements 
            DisplayName="ApplicationDataSample"
            Description="Application data sample"
            BackgroundColor="#FFFFFF"               
            Square150x150Logo="images\squareTile-sdk.png" 
            Square44x44Logo="images\smallTile-sdk.png" 
            AppListEntry="default">
            <uap:DefaultTile
                ShowName="allLogos" />
            <uap:LockScreen
                Notification="badge"
                BadgeLogo="images\badgeLogo.png" />
            <uap:SplashScreen
                BackgroundColor="white"
                Image="images\splash-sdk.png" />
            <uap:InitialRotationPreference> 
                <uap:Rotation
                    Preference="portrait" />
            </uap:InitialRotationPreference>            
        </uap:VisualElements>
    </Application>
</Applications>                             

另請參閱

規格需求

Item
Namespace http://schemas.microsoft.com/appx/manifest/uap/windows10
OS 最低版本 Windows 10版本 1511 (組建 10586)