ThemeSettings.CreateForWindowId(WindowId) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個 ThemeSettings 物件,提供該 WindowID 的主題資訊。
public:
static ThemeSettings ^ CreateForWindowId(WindowId windowId);
static ThemeSettings CreateForWindowId(WindowId const& windowId);
public static ThemeSettings CreateForWindowId(WindowId windowId);
function createForWindowId(windowId)
Public Shared Function CreateForWindowId (windowId As WindowId) As ThemeSettings
參數
傳回
一個 ThemeSettings 物件,會提供主題資訊。
備註
給定的 WindowId 必須代表一個視窗,使得以下條件:
- 是頂層視窗
- AND 與呼叫者在同一個程序和執行緒上
例如,你可以從 ContentIslandEnvironment.AppWindowId 屬性取得 WindowId。 你可以從 XamlRoot 物件取得 ContentIslandEnvironment 物件。