次要磚指導方針Secondary tile guidance

次要磚提供一致且有效率的方式讓使用者直接從 [開始] 功能表上存取應用程式中的特定區域。A secondary tile provides a consistent, efficient way for users to directly access specific areas within an app from the Start menu. 雖然使用者可選擇是否將次要磚「釘選」到 [開始] 功能表,但應用程式中的可釘選區域是由開發人員決定的。Although a user chooses whether or not to "pin" a secondary tile to the Start menu, the pinnable areas in an app are determined by the developer. 如需更詳細的摘要,請參閱次要磚概觀For a more detailed summary, see Secondary tiles overview. 當您在應用程式中啟用次要磚並設計相關聯的 UI 時,請考慮這些指導方針。Consider these guidelines when you enable secondary tiles and design the associated UI in your app.

注意

只有使用者才能將次要磚釘選至 [開始] 功能表;應用程式無法以程式設計的方式釘選次要磚。Only users can pin a secondary tile to the Start menu; apps can't programmatically pin secondary tiles. 使用者也可控制磚的移除,並可將次要磚從 [開始] 功能表或在父項應用程式中移除。Users also control tile removal, and can remove a secondary tile from the Start menu or from within the parent app.

建議Recommendations

當啟用您應用程式中的次要磚時,請考慮以下建議事項:Consider the following recommendations when enabling secondary tiles in your app:

  • 當焦點中的內容為可釘選時,應用程式列應包含 [釘選到開始畫面] 按鈕,藉此為使用者建立次要磚。When the content in focus is pinnable, the app bar should contain a "Pin to Start" button to create a secondary tile for the user.
  • 當使用者按一下 [釘選到開始畫面] 時,您應立即從 UI 執行緒將 API 呼叫到釘選次要磚When the user clicks "Pin to Start", you should immediately call the API from the UI thread to pin the secondary tile.
  • 如果焦點中的內容已釘選,請以 [從開始畫面取消釘選] 按鈕取代應用程式列上的 [釘選到開始畫面] 按鈕。If the content in focus is already pinned, replace the "Pin to Start" button on the app bar with an "Unpin from Start" button. [從開始畫面取消釘選] 按鈕應移除現有的次要磚。The "Unpin from Start" button should remove the existing secondary tile.
  • 當在焦點中的內容不可釘選時,不會顯示 [釘選到開始畫面] 按鈕 (或顯示停用的 [釘選到開始畫面] 按鈕)。When the content in focus is not pinnable, don't show a "Pin to Start" button (or show a disabled "Pin to Start" button).
  • 為您的 [釘選到開始畫面] 與 [從開始畫面取消釘選] 按鈕使用系統提供的字符 (請參閱 Windows.UI.Xaml.Controls.Symbol 或 WinJS.UI.AppBarIcon 中的釘選與取消釘選成員)。Use the system-provided glyphs for your "Pin to Start" and "Unpin from Start" buttons (see the pin and unpin members in Windows.UI.Xaml.Controls.Symbol or WinJS.UI.AppBarIcon).
  • 使用標準按鈕文字:「釘選到開始畫面」與「從開始畫面取消釘選」。Use the standard button text: "Pin to Start" and "Unpin from Start". 當您使用系統提供的釘選與取消釘選字符時,您必須覆寫預設文字。You'll have to override the default text when using the system-provided pin and unpin glyphs.
  • 不要使用次要磚作為虛擬命令按鈕以與父項應用程式互動,例如 [略過至下一個追蹤] 磚。Don't use a secondary tile as a virtual command button to interact with the parent app, such as a "skip to next track" tile.

裝置的其他使用指導方針Additional usage guidance for devs

  • 當應用程式啟動時,應一律列舉其次要磚,以防有任何不知道的新增與刪除項目。When an app launches, it should always enumerate its secondary tiles, in case there were any additions or deletions of which it was unaware. 當透過 [開始] 畫面應用程式列刪除次要磚時,Windows 只會移除該次要磚。When a secondary tile is deleted through the Start screen app bar, Windows simply removes the tile. 應用程式本身負責發行由次要磚使用的任何資源。The app itself is responsible for releasing any resources that were used by the secondary tile. 當透過雲端複製次要磚時,次要磚上的目前磚或徽章通知、排程的通知、推播通知通道及搭配定期通知使的統一資源識別項 (URI) 不會透過次要磚複製,必須再次設定。When secondary tiles are copied through the cloud, current tile or badge notifications on the secondary tile, scheduled notifications, push notification channels, and Uniform Resource Identifiers (URIs) used with periodic notifications are not copied with the secondary tile and must be set up again.
  • 應用程式應為次要磚使用有意義、可重複建立、唯一的識別碼。An app should use meaningful, re-creatable, unique IDs for secondary tiles. 使用對應用程式而言有意義的可預測次要磚識別碼,可幫助應用程式了解當在新電腦的全新安裝中顯示次要磚時可使用這些磚執行的動作。Using predictable secondary tile IDs that are meaningful to an app helps the app understand what to do with these tiles when they are seen in a fresh installation on a new computer.
    • 在執行階段,應用程式可以特定的磚是否存在。At runtime, the app can query whether a specific tile exists.
    • 可要求次要磚平台傳回屬於特定應用程式的所有次要磚集。The secondary tile platform can be asked to return the set of all secondary tiles belonging to a specific app. 為這些次要磚使用有意義、唯一的 ID,可幫助應用程式檢查次要磚集,並執行適當的動作。Using meaningful, unique IDs for these tiles can help the app examine the set of secondary tiles and perform appropriate actions. 例如對於社交媒體應用程式,識別碼可識別各個其磚已建立的連絡人。For instance, for a social media app, IDs could identify individual contacts for whom tiles were created.
  • 次要磚 (例如 [開始] 畫面上的所有磚) 為動態的出口,可經常更新為新的內容。Secondary tiles, like all tiles on the Start screen, are dynamic outlets that can be frequently updated with new content. 次要磚可使用與任何其他磚相同的機制,來呈現通知與更新。Secondary tiles can surface notifications and updates by using the same mechanisms as any other tile. 若要深入了解,請參閱選擇通知傳遞方法See Choose a notification delivery method to learn more.