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.

EdgeGesture.GetForCurrentView | getForCurrentView method

Applies to Windows and Windows Phone

Gets an instance of the EdgeGesture class that is used to add and remove event delegate handlers for the current view.

Syntax


var edgeGesture = Windows.UI.Input.EdgeGesture.getForCurrentView();

Parameters

This method has no parameters.

Return value

Type: EdgeGesture

The currently relevant instance of the EdgeGesture object.

Remarks

This method uses the current CoreWindow of your application's CoreApplication object to determine the particular instance. That is, there is a 1:1 correspondence between different instances of EdgeGesture and CoreWindow. You cannot obtain an instance of an EdgeGesture class for another app, nor can an EdgeGesture instance be obtained for an app without a current CoreWindow.

Examples

The following example demonstrates the use of GetForCurrentView to retrieve an instance EdgeGesture through which it then registers for edge gesture events.



var edgeGesture = Windows.UI.Input.EdgeGesture.getForCurrentView();
edgeGesture.addEventListener("starting", onStarting);
edgeGesture.addEventListener("completed", onCompleted);
edgeGesture.addEventListener("canceled", onCanceled);

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.UI.Input
Windows::UI::Input [C++]

Metadata

Windows.winmd

See also

EdgeGesture
Edge gesture invocation sample

 

 

Show:
© 2014 Microsoft