Share via


ApplicationView.GetApplicationViewIdForWindow(ICoreWindow) Method

Definition

Gets the window ID that corresponds to a specific CoreWindow managed by the app.

public static int GetApplicationViewIdForWindow(ICoreWindow window);

Parameters

window
ICoreWindow

Reference to the CoreWindow object that contains a window handle used by the app.

Returns

Int32

The ID of the window associated with the supplied CoreWindow.

Remarks

Every view has an associated CoreWindow, which handles the core UI events for the window and manages drawing operations to the window. An app can have multiple views, with separate UI threads. Use this method to determine which window is provided by a specific CoreWindow instance managed by your app.

For languages other than Javascript, this is a static member of the ApplicationView class. JavaScript does not support this method (CoreWindow is not available as an API).

Applies to

Product Versions
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100