Sdílet prostřednictvím


ViewSizePreference Enum

Definition

Defines the set of possible general window (app view) size preferences.

public enum class ViewSizePreference
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
enum class ViewSizePreference
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum ViewSizePreference
var value = Windows.UI.ViewManagement.ViewSizePreference.default
Public Enum ViewSizePreference
Inheritance
ViewSizePreference
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Fields

Name Value Description
Default 0

The app does not have a window size preference specified. Windows, rather than the app, sets the size preference, which defaults to UseHalf.

UseLess 1

The window uses less than 50% of the available horizontal screen pixels.

UseHalf 2

The window uses 50% (half) of the available horizontal screen pixels.

UseMore 3

The window uses more than 50% of the available horizontal screen pixels.

UseMinimum 4

The window uses the minimum horizontal pixel width (either 320 or 500 pixels) specifies in the app's manifest (such as package.appxmanifest).

UseNone 5

The window has no visible component.

Custom 6

The window uses a custom preferred size specifed in the app.

Remarks

An "app view" is the displayed portion of a UWP app, and which can be variably sized by the user. A user's screen can have up to 4 app views of variable width displayed simultaneously, with a combined horizontal pixel width equal to that of the display device's horizontal resolution.

Custom view sizes

Set the ViewModePreferences.ViewSizePreference property value to Custom when you set the ViewModePreferences.CustomSize property.

Version history

Windows version SDK version Value added
1703 15063 Custom

Applies to