Esempio n. 1
0
        void OnPointerReleased(object sender, PointerRoutedEventArgs e)
        {
            if (_pointerID != e.Pointer.PointerId)
            {
                return;
            }

            ReleasePointerCapture(e.Pointer);
            e.Handled  = true;
            _pointerID = null;

            if (e.IsMouse())
            {
                Point pt = e.GetCurrentPoint(null).Position;
                if (this.ContainPoint(pt))
                {
                    _owner.Lv.ScrollIntoGroup(Group);
                }
            }
            else if (!_isMoved)
            {
                _owner.Lv.ScrollIntoGroup(Group);
            }
            _isMoved = false;
        }
Esempio n. 2
0
 void OnPointerCaptureLost(object sender, PointerRoutedEventArgs e)
 {
     if (e.IsMouse())
     {
         ResetMouseState();
     }
 }
Esempio n. 3
0
 void OnPointerExited(object sender, PointerRoutedEventArgs e)
 {
     if (e.IsMouse() && !IsSelected)
     {
         e.Handled = true;
         VisualStateManager.GoToState(this, "Normal", true);
     }
 }
Esempio n. 4
0
 void OnPointerExited(object sender, PointerRoutedEventArgs e)
 {
     if (e.IsMouse() && !_isDragging && _resizingCol == null)
     {
         SetCursor(CoreCursorType.Arrow);
         VisualStateManager.GoToState(this, "Normal", true);
     }
 }
Esempio n. 5
0
 void OnPointerEntered(object sender, PointerRoutedEventArgs e)
 {
     if (!_menuOpened &&
         e.IsMouse() &&
         (_owner.SelectionMode == SelectionMode.None || !_row.IsSelected))
     {
         _rcPointer.Fill = _owner.EnteredBrush;
     }
 }
Esempio n. 6
0
        void OnPointerPressed(object sender, PointerRoutedEventArgs e)
        {
            if (CapturePointer(e.Pointer))
            {
                e.Handled  = true;
                _pointerID = e.Pointer.PointerId;
                _isMoved   = false;
                _ptLast    = e.GetCurrentPoint(null).Position;

                if (e.IsMouse() && !IsSelected)
                {
                    VisualStateManager.GoToState(this, "Pressed", true);
                }
            }
        }
Esempio n. 7
0
 void OnPointerEntered(object sender, PointerRoutedEventArgs e)
 {
     if (e.IsMouse() && !_isDragging && _resizingCol == null)
     {
         Point pt = e.GetCurrentPoint(this).Position;
         if (pt.X >= _resizePadding && Col.Width - pt.X >= _resizePadding)
         {
             SetCursor(CoreCursorType.Arrow);
             VisualStateManager.GoToState(this, "PointerOver", true);
         }
         else
         {
             SetCursor(CoreCursorType.SizeWestEast);
             VisualStateManager.GoToState(this, "Normal", true);
         }
     }
 }