ApplicationView.TryEnterViewModeAsync ApplicationView.TryEnterViewModeAsync ApplicationView.TryEnterViewModeAsync ApplicationView.TryEnterViewModeAsync ApplicationView.TryEnterViewModeAsync Method

Definition

Overloads

TryEnterViewModeAsync(ApplicationViewMode) TryEnterViewModeAsync(ApplicationViewMode) TryEnterViewModeAsync(ApplicationViewMode) TryEnterViewModeAsync(ApplicationViewMode) TryEnterViewModeAsync(ApplicationViewMode)

Attempts to change the app view to the specified view mode.

TryEnterViewModeAsync(ApplicationViewMode, ViewModePreferences) TryEnterViewModeAsync(ApplicationViewMode, ViewModePreferences) TryEnterViewModeAsync(ApplicationViewMode, ViewModePreferences) TryEnterViewModeAsync(ApplicationViewMode, ViewModePreferences) TryEnterViewModeAsync(ApplicationViewMode, ViewModePreferences)

Attempts to change the app view to the specified view mode using the specified options.

TryEnterViewModeAsync(ApplicationViewMode) TryEnterViewModeAsync(ApplicationViewMode) TryEnterViewModeAsync(ApplicationViewMode) TryEnterViewModeAsync(ApplicationViewMode) TryEnterViewModeAsync(ApplicationViewMode)

Attempts to change the app view to the specified view mode.

public : IAsyncOperation<Platform::Boolean> TryEnterViewModeAsync(ApplicationViewMode viewMode)
IAsyncOperation<bool> TryEnterViewModeAsync(ApplicationViewMode viewMode) const;
public IAsyncOperation<bool> TryEnterViewModeAsync(ApplicationViewMode viewMode)
Public Function TryEnterViewModeAsync(viewMode As ApplicationViewMode) As IAsyncOperation(Of bool)
Windows.UI.ViewManagement.ApplicationView.tryEnterViewModeAsync(viewMode).done( /* Your success and error handlers */ );

Parameters

viewMode
ApplicationViewMode ApplicationViewMode ApplicationViewMode

A value of the enumeration that indicates the desired view mode.

Returns

true if the app view was changed to the specified view mode; otherwise, false.

Additional features and requirements

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

TryEnterViewModeAsync(ApplicationViewMode, ViewModePreferences) TryEnterViewModeAsync(ApplicationViewMode, ViewModePreferences) TryEnterViewModeAsync(ApplicationViewMode, ViewModePreferences) TryEnterViewModeAsync(ApplicationViewMode, ViewModePreferences) TryEnterViewModeAsync(ApplicationViewMode, ViewModePreferences)

Attempts to change the app view to the specified view mode using the specified options.

public : IAsyncOperation<Platform::Boolean> TryEnterViewModeAsync(ApplicationViewMode viewMode, ViewModePreferences viewModePreferences)
IAsyncOperation<bool> TryEnterViewModeAsync(ApplicationViewMode viewMode, ViewModePreferences viewModePreferences) const;
public IAsyncOperation<bool> TryEnterViewModeAsync(ApplicationViewMode viewMode, ViewModePreferences viewModePreferences)
Public Function TryEnterViewModeAsync(viewMode As ApplicationViewMode, viewModePreferences As ViewModePreferences) As IAsyncOperation(Of bool)
Windows.UI.ViewManagement.ApplicationView.tryEnterViewModeAsync(viewMode, viewModePreferences).done( /* Your success and error handlers */ );

Parameters

viewMode
ApplicationViewMode ApplicationViewMode ApplicationViewMode

A value of the enumeration that indicates the desired view mode.

viewModePreferences
ViewModePreferences ViewModePreferences ViewModePreferences

Preferred settings for the desired view mode.

Returns

true if the app view was changed to the specified view mode; otherwise, false.

Additional features and requirements

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

Remarks

The view mode preferences are requested values only. The system might override these values when your app is changed to the new view mode.