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.GetForCurrentView | getForCurrentView method

Applies to Windows and Windows Phone

Gets the window (app view) for the current app.


Public Shared Function GetForCurrentView() As ApplicationView


This method has no parameters.

Return value

Type: ApplicationView

An ApplicationView instance that can be used to get and set window display properties.


Windows 8 behavior

We determine whether an app is targeted for Windows 8 or Windows 8.1, so we can adjust functionality for the following features:

  • Window sizing—If an app is targeted for Windows 8, the shell doesn’t size the app to a window size that is not supported in Windows 8.1.
  • Charms—Charms only ever operated on the large app in Windows 8. In Windows 8.1, Charms can operate on any app on screen at any size.
Starting in Windows 8.1, we recommend that you:
  • Stop using view states and start using window sizes to make layout decisions.
  • Make sure that your app works down to 500 pixels wide. Apps can be resized down to 500 pixels or 320 pixels.
  • Check code that attempts to infer view state information from window dimensions. In Windows 8, the minimum width for undocked apps was 1024 pixels. However, it is no longer the case that a window narrower than 1024 pixels must be docked.

This is a static member of the ApplicationView class. For JavaScript this means that it is a method of the ApplicationView class, not of the window object that getForCurrentView creates.


Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]


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



See also




© 2014 Microsoft