protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) { if (SelectionModel != null) { if (Keyboard.Modifiers.HasFlag(ModifierKeys.Shift) && !SelectionModel.SingleSelect) { if (Keyboard.Modifiers.HasFlag(ModifierKeys.Control)) { SelectionModel.DeselectRangeFromAnchor(RepeatedIndex); } else { SelectionModel.SelectRangeFromAnchor(RepeatedIndex); } } else if (Keyboard.Modifiers.HasFlag(ModifierKeys.Control)) { if (SelectionModel.IsSelected(RepeatedIndex).Value) { SelectionModel.Deselect(RepeatedIndex); } else { SelectionModel.Select(RepeatedIndex); } } else { SelectionModel.Select(RepeatedIndex); this.Focus(); } } base.OnMouseLeftButtonDown(e); }
public void Deselect() { SelectionModel.Deselect(GetGroupIndex(), RepeatedIndex); }