protected override void OnSelectionChanging(InkCanvasSelectionChangingEventArgs e) { bool selBak = Keyboard.Modifiers == ModifierKeys.Control; ReadOnlyCollection<UIElement> col = e.GetSelectedElements(); List<UIElement> rez = new List<UIElement>(); foreach (UIElement el in col) if (selBak && el == bkg) rez.Add(el); else if (!selBak && el != bkg) rez.Add(el); e.SetSelectedElements(rez); }
private void selectingText(object sender, InkCanvasSelectionChangingEventArgs e) { e.SetSelectedElements(filterMyText(e.GetSelectedElements())); }