ApplicationView.TryEnterViewModeAsync Method

Definition

Overloads

TryEnterViewModeAsync(ApplicationViewMode, ViewModePreferences)

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

TryEnterViewModeAsync(ApplicationViewMode)

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

TryEnterViewModeAsync(ApplicationViewMode, ViewModePreferences)

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

public:
 virtual IAsyncOperation<bool> ^ TryEnterViewModeAsync(ApplicationViewMode viewMode, ViewModePreferences ^ viewModePreferences) = TryEnterViewModeAsync;
/// [Windows.Foundation.Metadata.Overload("TryEnterViewModeWithPreferencesAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<bool> TryEnterViewModeAsync(ApplicationViewMode const& viewMode, ViewModePreferences const& viewModePreferences);
[Windows.Foundation.Metadata.Overload("TryEnterViewModeWithPreferencesAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<bool> TryEnterViewModeAsync(ApplicationViewMode viewMode, ViewModePreferences viewModePreferences);
function tryEnterViewModeAsync(viewMode, viewModePreferences)
Public Function TryEnterViewModeAsync (viewMode As ApplicationViewMode, viewModePreferences As ViewModePreferences) As IAsyncOperation(Of Boolean)

Parameters

viewMode
ApplicationViewMode

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

viewModePreferences
ViewModePreferences

Preferred settings for the desired view mode.

Returns

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

Attributes

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

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.

Applies to

TryEnterViewModeAsync(ApplicationViewMode)

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

public:
 virtual IAsyncOperation<bool> ^ TryEnterViewModeAsync(ApplicationViewMode viewMode) = TryEnterViewModeAsync;
/// [Windows.Foundation.Metadata.Overload("TryEnterViewModeAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<bool> TryEnterViewModeAsync(ApplicationViewMode const& viewMode);
[Windows.Foundation.Metadata.Overload("TryEnterViewModeAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<bool> TryEnterViewModeAsync(ApplicationViewMode viewMode);
function tryEnterViewModeAsync(viewMode)
Public Function TryEnterViewModeAsync (viewMode As ApplicationViewMode) As IAsyncOperation(Of Boolean)

Parameters

viewMode
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.

Attributes

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Applies to