在 [開始] 功能表的資料夾下將應用程式分組

重要

這項功能目前適用于透過 Windows 測試人員計畫 開發通道散發的 初步 Windows 10 組建。 您至少需要組建 20257 才能啟用此功能。

已封裝應用程式的資訊清單包含一或多個 <Application> 專案,這些專案是可用的進入點。 每一個都會成為[開始] 功能表中的圖示。

MSIX 套件可以包含多個應用程式。 或者,公司可以建置多個應用程式,這些應用程式會封裝為個別的 MSIX 套件,但它們全都屬於相同的套件。 在這兩種情況下,您可能會想要將單一資料夾下[開始] 功能表中的所有專案分組在一起,讓使用者更容易在同一位置找到所有應用程式。

您可以使用專案的 屬性 VisualElementsVisualGroup 達成此目標。 以下是實作這項變更的步驟:

  1. 使用您選擇的文字編輯器開啟應用程式的資訊清單檔。 或者,如果您使用 MSIX 封裝工具,您可以在套件編輯器中按下 [開啟資訊清單 ] 按鈕。

  2. 請確定 uap3 命名空間是在資訊清單的節點中 <Package> 宣告:

    <Package ...
         xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"  
         IgnorableNamespaces="... uap3">
        ...
    </Package>
    
  3. 找出 Applications 區段。 您會在裡面找到一或多個 Application 專案,每個圖示都會在[開始] 功能表中建立。 這就是其外觀:

      <Applications>
          <Application>
              <VisualElements DisplayName="App1" 
                              Square150x150Logo="images/150x150.png"
                              Square44x44Logo="images/44x44.png"
                              Description="App1"
                              BackgroundColor="#777777"
                              AppListEntry="default">  
                  <uap:SplashScreen BackgroundColor="#777777"
                                    Image="images/splash.png"/>  
              </VisualElements>  
          </Application>
          <Application>
              ...
          </Application>
      </Applications>
    
  4. 將前置 uap3 詞新增至 VisualElements 區段。 請記得將它同時新增至開頭和結束標記:

      <Applications>
          <Application>
              <uap3:VisualElements DisplayName="App1"
                                   Square150x150Logo="images/150x150.png"
                                   Square44x44Logo="images/44x44.png"
                                   Description="App1"
                                   BackgroundColor="#777777"
                                   AppListEntry="default">  
                  <uap:SplashScreen BackgroundColor="#777777"
                                    Image="images/splash.png"/>  
              </uap3:VisualElements>  
          </Application>
          <Application>
              ...
          </Application>
      </Applications>
    
  5. 最後,將 VisualGroup 屬性新增至 VisualElements 專案。 設定值時,將您想要提供給將在[開始] 功能表中建立的資料夾名稱。

      <Applications>
          <Application>
              <uap3:VisualElements DisplayName="App1"
                                   Square150x150Logo="images/150x150.png"
                                   Square44x44Logo="images/44x44.png"
                                   Description="App1"
                                   BackgroundColor="#777777"
                                   AppListEntry="default"
                                   VisualGroup="MyFolder">  
                  <uap:SplashScreen BackgroundColor="#777777"
                                    Image="images/splash.png"/>  
              </uap3:VisualElements>  
          </Application>
          <Application>
              ...
          </Application>
      </Applications>
    

現在,您可以針對您想要包含在相同資料夾中的所有其他 <Application> 專案重複此程式。 或者,您也可以與其他應用程式執行相同的動作,只要以相同方式編輯其 MSIX 套件中包含的資訊清單檔案,並針對 VisualGroup 屬性使用相同的值即可。