Пример #1
0
 //TODO TabStop
 private void DataGridRowGroupHeader_PointerPressed(PointerPressedEventArgs e)
 {
     if (OwningGrid == null)
     {
         return;
     }
     if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
     {
         if (OwningGrid.IsDoubleClickRecordsClickOnCall(this) && !e.Handled)
         {
             ToggleExpandCollapse(!RowGroupInfo.IsVisible, true);
             e.Handled = true;
         }
         else
         {
             //if (!e.Handled && OwningGrid.IsTabStop)
             if (!e.Handled)
             {
                 OwningGrid.Focus();
             }
             e.Handled = OwningGrid.UpdateStateOnMouseLeftButtonDown(e, OwningGrid.CurrentColumnIndex, RowGroupInfo.Slot, allowEdit: false);
         }
     }
     else if (e.GetCurrentPoint(this).Properties.IsRightButtonPressed)
     {
         if (!e.Handled)
         {
             OwningGrid.Focus();
         }
         e.Handled = OwningGrid.UpdateStateOnMouseRightButtonDown(e, OwningGrid.CurrentColumnIndex, RowGroupInfo.Slot, allowEdit: false);
     }
 }
Пример #2
0
 //TODO TabStop
 private void DataGridRowGroupHeader_PointerPressed(PointerPressedEventArgs e)
 {
     if (OwningGrid != null && e.MouseButton == MouseButton.Left)
     {
         if (OwningGrid.IsDoubleClickRecordsClickOnCall(this) && !e.Handled)
         {
             ToggleExpandCollapse(!RowGroupInfo.IsVisible, true);
             e.Handled = true;
         }
         else
         {
             //if (!e.Handled && OwningGrid.IsTabStop)
             if (!e.Handled)
             {
                 OwningGrid.Focus();
             }
             e.Handled = OwningGrid.UpdateStateOnMouseLeftButtonDown(e, OwningGrid.CurrentColumnIndex, RowGroupInfo.Slot, allowEdit: false);
         }
     }
 }
Пример #3
0
 private void DataGridCell_MouseLeftButtonDown(object sender, PointerPressedEventArgs e)
 {
     if (!e.Handled)
     {
         // OwningGrid is null for TopLeftHeaderCell and TopRightHeaderCell because they have no OwningRow
         if (this.OwningGrid != null)
         {
             if (this.OwningRow != null)
             {
                 Debug.Assert(sender is DataGridCell);
                 Debug.Assert(sender == this);
                 e.Handled = this.OwningGrid.UpdateStateOnMouseLeftButtonDown(e, this.ColumnIndex, this.RowIndex);
             }
             if (this.OwningGrid.IsTabStop)
             {
                 //  bool success = this.
                 OwningGrid.Focus();
                 //Debug.Assert(success);
             }
         }
     }
 }
Пример #4
0
        //TODO TabStop
        private void DataGridRowHeader_PointerPressed(object sender, PointerPressedEventArgs e)
        {
            if (e.MouseButton != MouseButton.Left)
            {
                return;
            }

            if (OwningGrid != null)
            {
                if (!e.Handled)
                //if (!e.Handled && OwningGrid.IsTabStop)
                {
                    OwningGrid.Focus();
                }
                if (OwningRow != null)
                {
                    Debug.Assert(sender is DataGridRowHeader);
                    Debug.Assert(sender == this);
                    e.Handled = OwningGrid.UpdateStateOnMouseLeftButtonDown(e, -1, Slot, false);
                    OwningGrid.UpdatedStateOnMouseLeftButtonDown = true;
                }
            }
        }
Пример #5
0
        //TODO TabStop
        private void DataGridRowHeader_PointerPressed(object sender, PointerPressedEventArgs e)
        {
            if (OwningGrid == null)
            {
                return;
            }

            if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
            {
                if (!e.Handled)
                //if (!e.Handled && OwningGrid.IsTabStop)
                {
                    OwningGrid.Focus();
                }
                if (OwningRow != null)
                {
                    Debug.Assert(sender is DataGridRowHeader);
                    Debug.Assert(sender == this);
                    e.Handled = OwningGrid.UpdateStateOnMouseLeftButtonDown(e, -1, Slot, false);
                    OwningGrid.UpdatedStateOnMouseLeftButtonDown = true;
                }
            }
            else if (e.GetCurrentPoint(this).Properties.IsRightButtonPressed)
            {
                if (!e.Handled)
                {
                    OwningGrid.Focus();
                }
                if (OwningRow != null)
                {
                    Debug.Assert(sender is DataGridRowHeader);
                    Debug.Assert(sender == this);
                    e.Handled = OwningGrid.UpdateStateOnMouseRightButtonDown(e, -1, Slot, false);
                }
            }
        }