Пример #1
0
 public VirtualJoystick()
 {
     InitializeComponent();
     centerKnob.Completed += new EventHandler <object>(centerKnob_Completed);
     Knob.AddHandler(UIElement.PointerPressedEvent, new PointerEventHandler(Knob_PointerDown), true);
     Knob.AddHandler(UIElement.PointerMovedEvent, new PointerEventHandler(Knob_PointerMoved), true);
     Knob.AddHandler(UIElement.PointerReleasedEvent, new PointerEventHandler(Knob_PointerUp), true);
     Knob.AddHandler(UIElement.PointerCaptureLostEvent, new PointerEventHandler(Knob_PointerLost), true);
     Knob.AddHandler(UIElement.PointerCaptureLostEvent, new PointerEventHandler(Knob_PointerUp), true);
     Knob.AddHandler(UIElement.PointerExitedEvent, new PointerEventHandler(Knob_PointerUp), true);
     Knob.AddHandler(UIElement.PointerCanceledEvent, new PointerEventHandler(Knob_PointerUp), true);
     Knob.LostFocus += Knob_LostFocus;
 }