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)]
/// [Windows.Foundation.Metadata.Static(Windows.UI.ViewManagement.IViewModePreferencesStatics, 262144, "Windows.Foundation.UniversalApiContract")]
class ViewModePreferences final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.Static(typeof(Windows.UI.ViewManagement.IViewModePreferencesStatics), 262144, "Windows.Foundation.UniversalApiContract")]
public sealed class ViewModePreferences
Public NotInheritable Class ViewModePreferences
Inheritance
ViewModePreferences
Attributes

Windows 10 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