共用方式為


AppWindow.Create 方法

定義

多載

Create()

建立應用程式視窗,並將樣式和屬性設定為預設 OverlappedPresenter的樣式和屬性。

Create(AppWindowPresenter)

建立具有指定 中定義之樣式和屬性的 AppWindowPresenter視窗。

Create(AppWindowPresenter, WindowId)

建立樣式和屬性的視窗,其定義於指定 AppWindowPresenter 和父系至指定的視窗。

Create(AppWindowPresenter, WindowId, DispatcherQueue)

建立樣式和屬性的視窗,其定義於指定的 AppWindowPresenter、父系至指定的視窗,並與指定的 DispatcherQueue相關聯。

Create()

建立應用程式視窗,並將樣式和屬性設定為預設 OverlappedPresenter的樣式和屬性。

public:
 static AppWindow ^ Create();
/// [Windows.Foundation.Metadata.Overload("Create")]
 static AppWindow Create();
[Windows.Foundation.Metadata.Overload("Create")]
public static AppWindow Create();
function create()
Public Shared Function Create () As AppWindow

傳回

具有預設組態的新應用程式視窗。

屬性

另請參閱

適用於

Create(AppWindowPresenter)

建立具有指定 中定義之樣式和屬性的 AppWindowPresenter視窗。

public:
 static AppWindow ^ Create(AppWindowPresenter ^ appWindowPresenter);
/// [Windows.Foundation.Metadata.Overload("CreateWithPresenter")]
 static AppWindow Create(AppWindowPresenter const& appWindowPresenter);
[Windows.Foundation.Metadata.Overload("CreateWithPresenter")]
public static AppWindow Create(AppWindowPresenter appWindowPresenter);
function create(appWindowPresenter)
Public Shared Function Create (appWindowPresenter As AppWindowPresenter) As AppWindow

參數

appWindowPresenter
AppWindowPresenter

AppWindowPresenter物件,指定要套用至視窗的屬性值。

傳回

具有指定組態的新應用程式視窗。

屬性

另請參閱

適用於

Create(AppWindowPresenter, WindowId)

建立樣式和屬性的視窗,其定義於指定 AppWindowPresenter 和父系至指定的視窗。

public:
 static AppWindow ^ Create(AppWindowPresenter ^ appWindowPresenter, WindowId ownerWindowId);
/// [Windows.Foundation.Metadata.Overload("CreateWithPresenterAndOwner")]
 static AppWindow Create(AppWindowPresenter const& appWindowPresenter, WindowId const& ownerWindowId);
[Windows.Foundation.Metadata.Overload("CreateWithPresenterAndOwner")]
public static AppWindow Create(AppWindowPresenter appWindowPresenter, WindowId ownerWindowId);
function create(appWindowPresenter, ownerWindowId)
Public Shared Function Create (appWindowPresenter As AppWindowPresenter, ownerWindowId As WindowId) As AppWindow

參數

appWindowPresenter
AppWindowPresenter

AppWindowPresenter物件,指定要套用至視窗的屬性值。

ownerWindowId
WindowId

新視窗之父視窗的標識碼。

傳回

具有指定組態的新應用程式視窗。

屬性

備註

若要讓此視窗成為擁有的視窗,請將您想要為其擁有者之 視窗的標識碼 傳遞至 ownerWindowId 參數。 ownerWindowId必須是與套用組態的視窗相同進程的 WindowId

ContextMenu、Dialog 和 ToolWindow 設定需要在建立視窗以成功套用時設定這個屬性。

另請參閱

適用於

Create(AppWindowPresenter, WindowId, DispatcherQueue)

建立樣式和屬性的視窗,其定義於指定的 AppWindowPresenter、父系至指定的視窗,並與指定的 DispatcherQueue相關聯。

public:
 static AppWindow ^ Create(AppWindowPresenter ^ appWindowPresenter, WindowId ownerWindowId, DispatcherQueue ^ DispatcherQueue);
/// [Windows.Foundation.Metadata.Overload("CreateWithDispatcherQueue")]
 static AppWindow Create(AppWindowPresenter const& appWindowPresenter, WindowId const& ownerWindowId, DispatcherQueue const& DispatcherQueue);
[Windows.Foundation.Metadata.Overload("CreateWithDispatcherQueue")]
public static AppWindow Create(AppWindowPresenter appWindowPresenter, WindowId ownerWindowId, DispatcherQueue DispatcherQueue);
function create(appWindowPresenter, ownerWindowId, DispatcherQueue)
Public Shared Function Create (appWindowPresenter As AppWindowPresenter, ownerWindowId As WindowId, DispatcherQueue As DispatcherQueue) As AppWindow

參數

appWindowPresenter
AppWindowPresenter

AppWindowPresenter物件,指定要套用至視窗的屬性值。

ownerWindowId
WindowId

新視窗之父視窗的標識碼。

DispatcherQueue
DispatcherQueue

要與新視窗建立關聯的發送器佇列。

傳回

具有指定組態的新應用程式視窗。

屬性

適用於