GetForCurrentView | getForCurrentView method

ResourceContext.GetForCurrentView | getForCurrentView method

Gets a default ResourceContext associated with the current view for the currently running application.

Syntax


Public Shared Function GetForCurrentView() As ResourceContext

Parameters

This method has no parameters.

Return value

Type: ResourceContext

The default context associated with the current view.

Remarks

The resource management system for Windows Store apps supports the tailoring of resources for scale. Starting in Windows 8.1, different views owned by an app are able to display simultaneously on different display devices that may use different scales. In this way, scale is a per-view characteristic. Therefore, since scale is a qualifier that is part of a ResourceContext, a ResourceContext must be associated with a particular view.

Errors

This method fails if it is called in a windowless thread.

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.ApplicationModel.Resources.Core
Windows::ApplicationModel::Resources::Core [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

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

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.ApplicationModel.Resources.Core
Windows::ApplicationModel::Resources::Core [C++]

Metadata

Windows.winmd

See also

ResourceContext

 

 

Show:
© 2016 Microsoft