/// <summary> /// Изменилась коллекция /// </summary> private void ListViewEx_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) { if (AutoScroll) { // Включен режим "Автоскролл" if (e.Action == NotifyCollectionChangedAction.Add && e.NewItems.Count > 0) { PART_listView.ScrollIntoView(e.NewItems[0]); } } }
public ListViewEx() { InitializeComponent(); _autoScroll = true; _rowHeight = Double.NaN; _lastHeaderClicked = null; _lastDirection = ListSortDirection.Ascending; _sorter = null; PART_listView.Loaded += new RoutedEventHandler(ListViewLoaded); PART_listView.SelectionChanged += new SelectionChangedEventHandler(HandleSelectedItem); PART_listView.AddHandler(Thumb.DragDeltaEvent, new DragDeltaEventHandler(ListViewDragDelta), true); }
public void SelectedAll() { PART_listView.SelectAll(); }