Windows Dev Center

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.

ResourceContext.GetForCurrentView | getForCurrentView method

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

Syntax


var resourceContext = Windows.ApplicationModel.Resources.Core.ResourceContext.getForCurrentView();

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 (device family)

Device family

Universal

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 (operating system)

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:
© 2015 Microsoft