MSDN Library
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ApplicationView class

Represents the active application view and associated states and behaviors.

Syntax


var applicationView = Windows.UI.ViewManagement.ApplicationView.getForCurrentView();

Members

The ApplicationView class has these types of members:

Events

The ApplicationView class has these events.

EventDescription
Consolidated Occurs when the window is removed from the list of recently used apps, or if the user executes a close gesture on it.
VisibleBoundsChanged This event is raised when the value of VisibleBounds changes, typically as a result of the status bar, app bar, or other chrome being shown or hidden.

 

Methods

The ApplicationView class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
ExitFullScreenMode Takes the app out of full-screen mode.
GetApplicationViewIdForWindow Gets the window ID that corresponds to a specific CoreWindow managed by the app.
GetForCurrentView Gets the view state and behavior settings of the active application.
SetDesiredBoundsMode Sets a value indicating the bounds used by the framework to lay out the contents of the window (app view).
SetPreferredMinSize Sets the smallest size, in effective pixels, allowed for the app window.
ShowStandardSystemOverlays Shows system UI elements, like the title bar, over a full-screen app.
TryEnterFullScreenMode Attempts to place the app in full-screen mode.
TryResizeView Attempts to change the size of the view to the specified size in effective pixels.
TryUnsnap Attempts to unsnap a previously snapped app.
TryUnsnapToFullscreen Attempts to unsnap a previously snapped app.

 

Properties

The ApplicationView class has these properties.

PropertyAccess typeDescription

AdjacentToLeftDisplayEdge

Read-only

Gets a value that indicates whether the current window is in close proximity to the left edge of the screen.

AdjacentToRightDisplayEdge

Read-only

Gets a value that indicates whether the current window is in close proximity to the right edge of the screen.

DesiredBoundsMode

Read-only

Gets a value that indicates the bounds used by the framework to lay out the contents of the window (app view).

FullScreenSystemOverlayMode

Read/write

Gets or sets a value that indicates how an app in full-screen mode responds to edge swipe actions.

Id

Read-only

Gets the ID of the window (app view).

IsFullScreen

Read-only

Gets a value that indicates whether the window touches both the left and right sides of the display.

IsFullScreenMode

Read-only

Gets a value that indicates whether the app is running in full-screen mode.

IsOnLockScreen

Read-only

Gets whether the window (app view) is on the Windows lock screen.

IsScreenCaptureEnabled

Read/write

Gets or sets whether screen capture is enabled for the window (app view).

Orientation

Read-only

Gets the current orientation (landscape or portrait) of the window (app view) with respect to the display.

PreferredLaunchViewSize

Read/write

Gets or sets the size the app launches with if no view size is remembered by Windows.

PreferredLaunchWindowingMode

Read/write

Gets or sets a value that indicates the windowing mode the app launches with.

SuppressSystemOverlays

Read/write

Gets or sets a value indicating whether or not system overlays (such as overlay applications or the soft steering wheel) should be shown.

TerminateAppOnFinalViewClose

Read/write

Indicates whether the app terminates when the last window is closed.

Title

Read/write

Gets or sets the displayed title of the window.

TitleBar

Read-only

Gets the title bar of the app.

Value

Read-only

Gets the state of the current window (app view).

VisibleBounds

Read-only

Gets the visible region of the window (app view). The visible region is the region not occluded by chrome such as the status bar and app bar.

 

Remarks

A window (also called an app view) is the displayed portion of a Windows Runtime app. On Windows, a user's screen can have up to 4 windows of variable width displayed simultaneously. They do not overlap, and their top and bottom edges touch the top and bottom edges of the screen. There may be non-window areas between adjacent windows.

The window is not the same thing as the current page of the application. It is better thought of as the container of the pages; you can use the window reference in your program for all the pages of the application.

Each window has a corresponding CoreWindow that represents the UI processing thread (including the core input handlers and event dispatcher) for the window.

You can use the properties (or methods, for JavaScript) of the window in configuring your pages. For example: the Orientation property tells you whether the window is portrait or landscape; for Windows the AdjacentToLeftDisplayEdge property tells you whether the left edge of the screen is the left border of the window; and the isFullScreen method tells you whether the window uses the entire screen. For examples of using these methods, see the Application Views sample.

To obtain an object of this type, call ApplicationView.GetForCurrentView.

Note  Do not use the value returned in the ApplicationView.Value property when creating a page layout. This method is deprecated and may not be available in future releases.
 

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.ViewManagement
Windows::UI::ViewManagement [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.ViewManagement
Windows::UI::ViewManagement [C++]

Metadata

Windows.winmd

Attributes

[MarshalingBehavior(Agile)]
[Muse()]
[Threading(Both)]
[Version(0x06020000)]

See also

Object
Disabling screen capture sample (Windows 10)
User interaction mode sample (Windows 10)
Multiple views sample (Windows 10)
Full screen mode sample (Windows 10)
Window resizing sample (Windows 10)
Title bar sample (Windows 10)

 

 

Show:
© 2016 Microsoft