Share via


uap3:VisualElements (Windows 10)

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

元素階層

<套件>

      <應用程式>

            <應用程式>

                  <uap3:VisualElements>

Syntax

<uap3:VisualElements
    DisplayName = 'A string with a value between 1 and 256 characters in length. This string is localizable.' 
    Description = 'A string between 1 and 2048 characters in length.'
    BackgroundColor = 'A three-byte hexadecimal number preceded by "#" or a named color. See Remarks for a list of named colors.'
    Square150x150Logo = 'A string with a value 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 with a value 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".' 
    VisualGroup = 'A string with a value between 1 and 256 characters in length that does not contain backslashes ("\").' />

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

</uap3:VisualElements>

答案

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

屬性和元素

屬性

屬性 描述 資料類型 必要 預設值
DisplayName 可向用戶顯示之應用程式的易記名稱。 此字串可本地化;如需詳細資訊,請參閱。 長度介於 1 到 256 個字元之間的字串。 這個字串可當地語系化。
說明 應用程式的描述。 此字串可本地化;如需詳細資訊 ,請參閱 長度介於 1 到 2048 個字元之間的字串。 Yes
BackgroundColor 指定應用程式磚的背景色彩。 前面加上 # 三位元組的十六進位數位或具名色彩。 See Remarks for a list of named colors. Yes
Square150x150Logo 用來作為應用程式開始畫面中磚的影像,以及工作切換器上的影像。 如需有關如何在此屬性中指定影像的詳細資訊,請參閱 長度介於 1 到 256 個字元之間的字串,其結尾為 .jpg、 或 ,且.jpeg不能包含下列字元:<、、:?>|" 或 。*.png 在此字串中 / ,和 \ 字元不能是第一個或最後一個字元。 此外,字串也可以包含 或 ,\但不能同時包含/兩者。 Yes
Square44x44Logo 作為應用程式 [開始畫面] 小型磚的影像,以及 [所有應用程式] 清單上的影像。 如需有關如何在此屬性中指定影像的詳細資訊,請參閱 長度介於 1 到 256 個字元之間的字串,其結尾為 .jpg、 或 ,且.jpeg不能包含下列字元:<、、:?>|" 或 。*.png 在此字串中 / ,和 \ 字元不能是第一個或最後一個字元。 此外,字串也可以包含 或 ,\但不能同時包含/兩者。 Yes
AppListEntry [所有應用程式] 清單中的專案。 可以具有下列其中一個值的選擇性字串: 預設值 No
VisualGroup 要在 [所有應用程式清單] 上建立的資料夾名稱,其中應儲存應用程式的圖格。 長度介於 1 到 256 個字元之間的字串,不包含反斜杠 () \ 或空格。 No

注意

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

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

子元素

子元素 描述
uap:DefaultTile 定義預設磚,代表 [開始] 畫面上的應用程式。 此磚會在應用程式第一次安裝之前顯示,然後才收到任何更新通知。 當磚沒有顯示通知時,磚會還原為此預設值。
uap:LockScreen 定義徽章和通知,代表鎖定畫面上的應用程式,當系統鎖定時會顯示。
uap:SplashScreen 定義啟動期間應用程式所顯示之啟動顯示畫面的外觀。
uap:InitialRotationPreference 描述應用程式想要針對最佳用戶體驗顯示的方向。

父元素

Parent 項目 Description
應用程式 代表包含套件中傳遞之部分或所有功能的應用程式。

備註

您無法使用 VisualGroup 屬性來建立巢狀資料夾的結構。 如果您在值中包含反斜杠 (\) ,就會發生錯誤。

如果指令清單只宣告一個應用程式, 則 VisualGroup 屬性無效。

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

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

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

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

範例

下列範例會在 [所有應用程式清單] 中建立名為App1的資料夾,並將App1的圖格儲存在該資料夾中。

<Package
    xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"  
    IgnorableNamespaces="... desktop">
    <Applications>
        <Application>
            <uap3:VisualElements
                DisplayName="App1" 
                Square150x150Logo="images/150x150.png" 
                Square44x44Logo="images/44x44.png" 
                Description="App1" 
                BackgroundColor="#777777" 
                AppListEntry="default" 
                VisualGroup="App1">  
                <uap:SplashScreen
                    BackgroundColor="#777777" 
                    Image="images/splash.png"/>  
           </uap3:VisualElements>  
        </Application>
    </Applications>
</Package>

規格需求

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