Introduced
Re-imagine the Windows 8 Store Apps gesture
Monitoring Edge gestures
Gesture manipulation-Application of Manipulate (displacement gestures, scaling gestures, rotating gestures)
Gesture recognition-the application of Gesturerecognizer
Example
1. Demonstrate how to monitor edge gestures
Input/touch/edgegesturedemo.xaml
<page
x:class= "XamlDemo.Input.Touch.EdgeGestureDemo"
xmlns= "http://schemas.microsoft.com/winfx/2006 /xaml/presentation "
xmlns:x=" Http://schemas.microsoft.com/winfx/2006/xaml "
xmlns:local=" using: XamlDemo.Input.Touch "
xmlns:d=" http://schemas.microsoft.com/expression/blend/2008 "
xmlns:mc=" http:// schemas.openxmlformats.org/markup-compatibility/2006 "
mc:ignorable=" D ">
<grid background=" Transparent ">
<stackpanel margin=" 0 0 0 ">
<textblock name=" lblmsg "fontsize=" 14.667 "/>
</StackPanel>
</Grid>
</Page>
Input/touch/edgegesturedemo.xaml.cs
* * Demonstrates how to monitor edge gestures * * edgegesture-edge gesture Help class * Getforcurrentview ()-Get current Edgegesture object * Starting-edge gesture start Event to Trigger * Completed-the event that is triggered after the edge gesture is completed * Canceled-event triggered after edge gesture cancellation * * Edgegestureeventargs-event parameters after triggering edge gesture events *
Edgegesturekind-Edge gesture input type (touch, keyboard, Mouse) * * using System;
Using Windows.UI.Input;
Using Windows.UI.Xaml.Controls; Namespace XamlDemo.Input.Touch {public sealed partial class Edgegesturedemo:page {public Edgegesturede Mo () {this.
InitializeComponent ();
Edgegesture edgegesture = Edgegesture.getforcurrentview ();
edgegesture.canceled + = edgegesture_canceled;
edgegesture.completed + = edgegesture_completed;
Edgegesture.starting + = edgegesture_starting; } void Edgegesture_starting (edgegesture sender, Edgegestureeventargs args) {Lblmsg.text
+ = "Edgegesture starting"; Lblmsg.text += Environment.NewLine; } void Edgegesture_completed (edgegesture sender, Edgegestureeventargs args) {Lblmsg.text
+ = "Edgegesture Completed";
Lblmsg.text + = Environment.NewLine; } void Edgegesture_canceled (edgegesture sender, Edgegestureeventargs args) {Lblmsg.text
+ = "Edgegesture Canceled";
Lblmsg.text + = Environment.NewLine; }
}
}