Share via


AppWindow.Create Method

Definition

Overloads

Create()

Creates an app window with the styles and properties set to that of the default OverlappedPresenter.

Create(AppWindowPresenter)

Creates a window with styles and properties as defined in the specified AppWindowPresenter.

Create(AppWindowPresenter, WindowId)

Creates a window with styles and properties as defined in the specified AppWindowPresenter and parented to the specified window.

Create(AppWindowPresenter, WindowId, DispatcherQueue)

Creates a window with styles and properties as defined in the specified AppWindowPresenter, parented to the specified window, and associated with the specified DispatcherQueue.

Create()

Creates an app window with the styles and properties set to that of the default 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

Returns

A new app window with the default configuration.

Attributes

See also

Applies to

Create(AppWindowPresenter)

Creates a window with styles and properties as defined in the specified 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

Parameters

appWindowPresenter
AppWindowPresenter

An AppWindowPresenter object that specifies property values to apply to the window.

Returns

A new app window with the specified configuration.

Attributes

See also

Applies to

Create(AppWindowPresenter, WindowId)

Creates a window with styles and properties as defined in the specified AppWindowPresenter and parented to the specified window.

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

Parameters

appWindowPresenter
AppWindowPresenter

An AppWindowPresenter object that specifies property values to apply to the window.

ownerWindowId
WindowId

The ID of the parent window for the new window.

Returns

A new app window with the specified configuration.

Attributes

Remarks

To make this window an owned window, pass the Id of the window you want to be its owner to the ownerWindowId parameter. The ownerWindowId must be a WindowId from the same process as the window that has the configuration applied to it.

ContextMenu, Dialog, and ToolWindow configurations require this property to be set when the window is created in order to be applied successfully.

See also

Applies to

Create(AppWindowPresenter, WindowId, DispatcherQueue)

Creates a window with styles and properties as defined in the specified AppWindowPresenter, parented to the specified window, and associated with the specified 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

Parameters

appWindowPresenter
AppWindowPresenter

An AppWindowPresenter object that specifies property values to apply to the window.

ownerWindowId
WindowId

The ID of the parent window for the new window.

DispatcherQueue
DispatcherQueue

The dispatcher queue to associate with the new window.

Returns

A new app window with the specified configuration.

Attributes

Applies to