ApplicationView class

Applies to Windows and Windows Phone

Defines an instance of a window (app view) and the information that describes it.

Syntax


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

Attributes

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

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.

 

Methods

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

MethodDescription
GetApplicationViewIdForWindow Gets the window ID that corresponds to a specific CoreWindow managed by the app.
GetForCurrentView Gets the window (app view) for the current app.
TryUnsnap Attempts to unsnap a previously snapped app.

 

Properties

The ApplicationView class has these properties.

PropertyAccess typeDescription

AdjacentToLeftDisplayEdge

Read-onlyGets whether the current window (app view) is snapped and adjacent to the left edge of the screen.

AdjacentToRightDisplayEdge

Read-onlyGets whether the current window (app view) is adjacent to the right edge of the screen.

Id

Read-onlyGets the ID of the window (app view).

IsFullScreen

Read-onlyGets whether the window (app view) fills the entire screen.

IsOnLockScreen

Read-onlyGets whether the window (app view) is on the Windows lock screen.

IsScreenCaptureEnabled

Read/writeGets or sets whether screen capture is enabled for the window (app view).

Orientation

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

TerminateAppOnFinalViewClose

Read/writeIndicates whether the app terminates when the last window is closed.

Title

Read/writeGets or sets the displayed title of the window.

Value

Read-onlyGets the state of the current window (app view).

 

Remarks

A window (also called an app view) is the displayed portion of a Windows Store app. 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; 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

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

 

 

Show:
© 2014 Microsoft. All rights reserved.