コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MouseGestureTracker"/> class.
 /// </summary>
 public MouseGestureTracker()
 {
     this.subscribers = new SubscribeInfos(
         SubscribeInfo.Create(UIElement.PreviewMouseLeftButtonDownEvent, new MouseButtonEventHandler(this.OnStart)),
         SubscribeInfo.Create(UIElement.PreviewMouseMoveEvent, new MouseEventHandler(this.OnMove)),
         SubscribeInfo.Create(UIElement.PreviewMouseLeftButtonUpEvent, new MouseButtonEventHandler(this.OnEnd)),
         SubscribeInfo.Create(UIElement.MouseLeaveEvent, new MouseEventHandler(this.OnEnd)));
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TouchGestureTracker"/> class.
 /// </summary>
 public TouchGestureTracker()
 {
     this.subscribers = new SubscribeInfos(
         SubscribeInfo.Create(UIElement.PreviewTouchDownEvent, new EventHandler <TouchEventArgs>(this.OnStart)),
         SubscribeInfo.Create(UIElement.PreviewTouchMoveEvent, new EventHandler <TouchEventArgs>(this.OnMove)),
         SubscribeInfo.Create(UIElement.PreviewTouchUpEvent, new EventHandler <TouchEventArgs>(this.OnEnd)),
         SubscribeInfo.Create(UIElement.TouchLeaveEvent, new EventHandler <TouchEventArgs>(this.OnEnd)),
         SubscribeInfo.Create(NavigationCommands.BrowseForward, this.OnBrowseForward),
         SubscribeInfo.Create(NavigationCommands.BrowseBack, this.OnBrowseBack));
 }