Dela 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);
 static int GetApplicationViewIdForWindow(ICoreWindow const& window);
public static int GetApplicationViewIdForWindow(ICoreWindow window);
function getApplicationViewIdForWindow(window)
Public Shared Function GetApplicationViewIdForWindow (window As ICoreWindow) As Integer

Parameters

window
ICoreWindow

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

Returns

Int32

int

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