共用方式為


ThemeSettings.CreateForWindowId(WindowId) 方法

定義

建立 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

參數

windowId
WindowId

取得主題資訊時要使用的 WindowId

傳回

會提供主題資訊的 ThemeSettings 物件。

備註

指定的 WindowId 必須代表下列視窗:

  • 這是最上層視窗
  • AND 位於與呼叫端相同的進程和執行緒上

例如,您可以從ContentIslandEnvironment.AppWindowId屬性取得WindowId。 您可以從XamlRoot物件取得ContentIslandEnvironment物件。

適用於

另請參閱