ResourceContext.GetForUIContext(UIContext) Method

Definition

Gets a default ResourceContext associated with the specified UIContext for the currently running application.

public:
 static ResourceContext ^ GetForUIContext(UIContext ^ context);
 static ResourceContext GetForUIContext(UIContext const& context);
public static ResourceContext GetForUIContext(UIContext context);
function getForUIContext(context)
Public Shared Function GetForUIContext (context As UIContext) As ResourceContext

Parameters

context
UIContext

The UI context for which to get the ResourceContext.

Returns

The default ResourceContext associated with the specified UI context.

Windows requirements

Device family
Windows 10, version 1903 (introduced in 10.0.18362.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v8.0)

Remarks

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

Applies to