private void KeyDownHandler(object sender, KeyEventArgs e) { if (e.Key == Key.Delete) { Point pt = Mouse.GetPosition(this); var hit = VisualTreeHelper.HitTest(this, pt); if (hit == null) { return; } var hh = hit.VisualHit; while (hh != null && !(hh is ItemVisualizer)) { hh = VisualTreeHelper.GetParent(hh); } if (hh != null) { Items.Remove(((ItemVisualizer)hh).Item); } NewlyAddedRanges.Clear(); ResizeScrollbarThumb(); } }
internal void EndUpdate() { NewlyAddedRanges.Clear(); _supressrebuild = false; _stashRange.Rebuild(); ResizeScrollbarThumb(); }
internal void RemoveItem(Item item) { Items.Remove(item); NewlyAddedRanges.Clear(); ResizeScrollbarThumb(); }