ApplicationView.TryEnterViewModeAsync 方法      
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| TryEnterViewModeAsync(ApplicationViewMode, ViewModePreferences) | 尝试使用指定的选项将应用视图更改为指定的视图模式。 | 
| TryEnterViewModeAsync(ApplicationViewMode) | 尝试将应用视图更改为指定的视图模式。 | 
TryEnterViewModeAsync(ApplicationViewMode, ViewModePreferences)
尝试使用指定的选项将应用视图更改为指定的视图模式。
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)参数
- viewMode
- ApplicationViewMode
枚举的值,指示所需的视图模式。
- viewModePreferences
- ViewModePreferences
所需视图模式的首选设置。
返回
如果应用视图已更改为指定的视图模式,则为 true;否则为 false。
- 属性
Windows 要求
| 设备系列 | 
							Windows 10 Creators Update (在 10.0.15063.0 中引入) | 
| API contract | 
							Windows.Foundation.UniversalApiContract (在 v4.0 中引入) | 
注解
视图模式首选项仅是请求的值。 当你的应用更改为新的视图模式时,系统可能会重写这些值。
适用于
TryEnterViewModeAsync(ApplicationViewMode)
尝试将应用视图更改为指定的视图模式。
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)参数
- viewMode
- ApplicationViewMode
枚举的值,指示所需的视图模式。
返回
如果应用视图已更改为指定的视图模式,则为 true;否则为 false。
- 属性
Windows 要求
| 设备系列 | 
							Windows 10 Creators Update (在 10.0.15063.0 中引入) | 
| API contract | 
							Windows.Foundation.UniversalApiContract (在 v4.0 中引入) |