Ejemplo n.º 1
0
 private static void MouseUp(object sender, MouseButtonEventArgs e)
 {
     if (device != null &&
         device.IsActive)
     {
         device.Position = e.GetPosition(null);
         device.ReportUp();
         device.Deactivate();
         device    = null;
         e.Handled = true;
     }
 }
Ejemplo n.º 2
0
 private static void MouseDown(object sender, MouseButtonEventArgs e)
 {
     if (device != null &&
         device.IsActive)
     {
         device.ReportUp();
         device.Deactivate();
         device = null;
     }
     device = new MouseTouchDevice(e.MouseDevice.GetHashCode());
     device.SetActiveSource(e.MouseDevice.ActiveSource);
     device.Position = e.GetPosition(null);
     device.Activate();
     device.ReportDown();
     e.Handled = true;
 }
 public static void Unregister()
 {
     MouseTouchDevice.UnregisterEvents(RootElement);
 }