ApplicationViewSwitcher.TryShowAsViewModeAsync ApplicationViewSwitcher.TryShowAsViewModeAsync ApplicationViewSwitcher.TryShowAsViewModeAsync ApplicationViewSwitcher.TryShowAsViewModeAsync ApplicationViewSwitcher.TryShowAsViewModeAsync Method

Definition

Overloads

TryShowAsViewModeAsync(Int32, ApplicationViewMode) TryShowAsViewModeAsync(Int32, ApplicationViewMode) TryShowAsViewModeAsync(Int32, ApplicationViewMode) TryShowAsViewModeAsync(Int32, ApplicationViewMode) TryShowAsViewModeAsync(Int32, ApplicationViewMode)

Displays a view as a standalone view in the desired view mode.

TryShowAsViewModeAsync(Int32, ApplicationViewMode, ViewModePreferences) TryShowAsViewModeAsync(Int32, ApplicationViewMode, ViewModePreferences) TryShowAsViewModeAsync(Int32, ApplicationViewMode, ViewModePreferences) TryShowAsViewModeAsync(Int32, ApplicationViewMode, ViewModePreferences) TryShowAsViewModeAsync(Int32, ApplicationViewMode, ViewModePreferences)

Displays a view as a standalone view in the desired view mode with the specified options.

TryShowAsViewModeAsync(Int32, ApplicationViewMode) TryShowAsViewModeAsync(Int32, ApplicationViewMode) TryShowAsViewModeAsync(Int32, ApplicationViewMode) TryShowAsViewModeAsync(Int32, ApplicationViewMode) TryShowAsViewModeAsync(Int32, ApplicationViewMode)

Displays a view as a standalone view in the desired view mode.

public : static IAsyncOperation<Platform::Boolean> TryShowAsViewModeAsync(int viewId, ApplicationViewMode viewMode)
static IAsyncOperation<bool> TryShowAsViewModeAsync(int32_t viewId, ApplicationViewMode viewMode) const;
public static IAsyncOperation<bool> TryShowAsViewModeAsync(Int32 viewId, ApplicationViewMode viewMode)
Public Shared Function TryShowAsViewModeAsync(viewId As Int32, viewMode As ApplicationViewMode) As IAsyncOperation(Of bool)
Windows.UI.ViewManagement.ApplicationViewSwitcher.tryShowAsViewModeAsync(viewId, viewMode).done( /* Your success and error handlers */ );
Parameters
viewId
Int32 Int32 Int32

The ID of the window to display.

viewMode
ApplicationViewMode ApplicationViewMode ApplicationViewMode

The desired view mode for the window.

Returns

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

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

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.

TryShowAsViewModeAsync(Int32, ApplicationViewMode, ViewModePreferences) TryShowAsViewModeAsync(Int32, ApplicationViewMode, ViewModePreferences) TryShowAsViewModeAsync(Int32, ApplicationViewMode, ViewModePreferences) TryShowAsViewModeAsync(Int32, ApplicationViewMode, ViewModePreferences) TryShowAsViewModeAsync(Int32, ApplicationViewMode, ViewModePreferences)

Displays a view as a standalone view in the desired view mode with the specified options.

public : static IAsyncOperation<Platform::Boolean> TryShowAsViewModeAsync(int viewId, ApplicationViewMode viewMode, ViewModePreferences viewModePreferences)
static IAsyncOperation<bool> TryShowAsViewModeAsync(int32_t viewId, ApplicationViewMode viewMode, ViewModePreferences viewModePreferences) const;
public static IAsyncOperation<bool> TryShowAsViewModeAsync(Int32 viewId, ApplicationViewMode viewMode, ViewModePreferences viewModePreferences)
Public Shared Function TryShowAsViewModeAsync(viewId As Int32, viewMode As ApplicationViewMode, viewModePreferences As ViewModePreferences) As IAsyncOperation(Of bool)
Windows.UI.ViewManagement.ApplicationViewSwitcher.tryShowAsViewModeAsync(viewId, viewMode, viewModePreferences).done( /* Your success and error handlers */ );
Parameters
viewId
Int32 Int32 Int32

The ID of the window to display.

viewMode
ApplicationViewMode ApplicationViewMode ApplicationViewMode

The desired view mode for the window.

viewModePreferences
ViewModePreferences ViewModePreferences ViewModePreferences

Preferred settings for the desired view mode.

Returns

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

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

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.