Share via


ApplicationViewSwitcher.TryShowAsStandaloneAsync Method

Definition

Overloads

TryShowAsStandaloneAsync(Int32)

Displays another window (app view) for the app on the screen, adjacent to the original window

TryShowAsStandaloneAsync(Int32, ViewSizePreference)

Displays another window (app view) for the app on the screen, adjacent to the original window

TryShowAsStandaloneAsync(Int32, ViewSizePreference, Int32, ViewSizePreference)

Displays another window (app view) for the app on the screen, adjacent to the original window.

TryShowAsStandaloneAsync(Int32)

Displays another window (app view) for the app on the screen, adjacent to the original window

[Windows.Foundation.Metadata.Overload("TryShowAsStandaloneAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<bool> TryShowAsStandaloneAsync(int viewId);

Parameters

viewId
Int32

The ID of the new window to display.

Returns

Asynchronously returns true if the call succeeds; false if it does not.

Attributes

Remarks

If this method succeeds, a new window is created next to the original window. It can only be called from an ASTA (core UI) thread.

The new window has its own UI thread (ASTA) and associated CoreWindow. Developers should use thread-safe methods for communication between the windows, such as window.postMessage for JavaScript apps and the CoreDispatcher (CoreWindow.Dispatcher) messaging for C# and C++ developers.

See also

Applies to

WinRT Build 26100 and other versions
Product Versions
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100

TryShowAsStandaloneAsync(Int32, ViewSizePreference)

Displays another window (app view) for the app on the screen, adjacent to the original window

[Windows.Foundation.Metadata.Overload("TryShowAsStandaloneWithSizePreferenceAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<bool> TryShowAsStandaloneAsync(int viewId, ViewSizePreference sizePreference);

Parameters

viewId
Int32

The ID of the new window to display.

sizePreference
ViewSizePreference

The preferred general sizing of the new window.

Returns

Asynchronously returns true if the call succeeds; false if it does not.

Attributes

Remarks

If this method succeeds, a new window is created next to the original window. It can only be called from an ASTA (core UI) thread.

The new window has its own UI thread (ASTA) and associated CoreWindow. Developers should use thread-safe methods for communication between the windows, such as window.postMessage for JavaScript apps and the CoreDispatcher (CoreWindow.Dispatcher) messaging for C# and C++ developers.

See also

Applies to

WinRT Build 26100 and other versions
Product Versions
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100

TryShowAsStandaloneAsync(Int32, ViewSizePreference, Int32, ViewSizePreference)

Displays another window (app view) for the app on the screen, adjacent to the original window.

[Windows.Foundation.Metadata.Overload("TryShowAsStandaloneWithAnchorViewAndSizePreferenceAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<bool> TryShowAsStandaloneAsync(int viewId, ViewSizePreference sizePreference, int anchorViewId, ViewSizePreference anchorSizePreference);

Parameters

viewId
Int32

The ID of the new window to display.

sizePreference
ViewSizePreference

The preferred general sizing of the new window.

anchorViewId
Int32

The ID of the calling (anchor) window.

anchorSizePreference
ViewSizePreference

The preferred new general sizing of the calling window if this call succeeds.

Returns

Asynchronously returns true if the call succeeds; false if it does not.

Attributes

Remarks

If this method succeeds, a new window is created next to the original window. It can only be called from an ASTA (core UI) thread.

The new window has its own UI thread (ASTA) and associated CoreWindow. Developers should use thread-safe methods for communication between the windows, such as window.postMessage for JavaScript apps and the CoreDispatcher (CoreWindow.Dispatcher) messaging for C# and C++ developers.

See also

Applies to

WinRT Build 26100 and other versions
Product Versions
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100