ViewModePreferences Class

Definition

Represents the preferred settings to be applied to a view when it's changed to a new view mode.

public ref class ViewModePreferences sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
class ViewModePreferences final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
public sealed class ViewModePreferences
Public NotInheritable Class ViewModePreferences
Inheritance
Object Platform::Object IInspectable ViewModePreferences
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

To get an instance of ViewModePreferences, call the CreateDefault method.

These view mode preferences are requested values only. The system might override these values when your app is changed to the new view mode. Custom sizes that you specify are not guaranteed to be honored by Windows, so you should not write code that relies on never getting into a size that is smaller than the preferred minimum size or larger than the preferred maximum size. No error is returned when a preferred size is ignored.

Properties

CustomSize

Gets or sets a custom preferred size for the app window.

ViewSizePreference

Gets or sets the preferred size of the app window.

Methods

CreateDefault(ApplicationViewMode)

Creates a new instance of ViewModePreferences with default property values set for the specified view mode.

Applies to