Esempio n. 1
0
 private void OnHoldingTimerTick(object sender, EventArgs e)
 {
     _holdingTimer.Stop();
     if (Holding != null && _pointerDownArgs != null && _pointerDownArgs.PointerDeviceType == C1PointerDeviceType.Touch)
     {
         Holding(_element, _pointerDownArgs);
         _pointerDownArgs = null;
     }
 }
Esempio n. 2
0
 private void HoldingPointerUp(object sender, MouseButtonEventArgs e)
 {
     _pointerDownArgs = null;
     _holdingTimer.Stop();
 }
Esempio n. 3
0
 private void HoldingPointerDown(object sender, MouseButtonEventArgs e)
 {
     _pointerDownArgs = new C1TappedEventArgs(e, false);
     _holdingTimer.Start();
 }
Esempio n. 4
0
 private void FinalizeHolding()
 {
     _element.RemoveHandler(UIElement.MouseLeftButtonDownEvent, new MouseButtonEventHandler(HoldingPointerDown));
     _element.RemoveHandler(UIElement.MouseLeftButtonUpEvent, new MouseButtonEventHandler(HoldingPointerUp));
     _holdingTimer.Tick -= OnHoldingTimerTick;
     _holdingTimer = null;
     _pointerDownArgs = null;
 }
 void OnTapped(object sender, C1TappedEventArgs e)
 {
     Rectangle.Background = GetRandomBrush();
 }
 // double-click selects word and changes it
 void th_DoubleTapped(object sender, C1TappedEventArgs e)
 {
     var tb = _listSuggestions.SelectedItem as TextBlock;
     if (tb != null && tb.Text == _txtChangeTo.Text)
     {
         _btnChange_Click(this, null);
     }
 }