/// <exception cref="InvalidOperationException">The IsScrolling property is read-only. </exception> internal void IsScrollingPropertyChanged(DependencyPropertyChangedEventArgs e) { if (_allowIsScrollingChanges != true) { throw new InvalidOperationException("The IsScrolling property is read-only. "); } _isScrolling = (bool)e.NewValue; var args = new ScrollingStateChangedEventArgs((bool)e.OldValue, (bool)e.NewValue); OnScrollingStateChanged(args); var handler = ScrollingStateChanged; if (handler != null) { handler(this, args); } }
protected virtual void OnScrollingStateChanged(ScrollingStateChangedEventArgs e) { // Must be empty }
/// <exception cref="InvalidOperationException">The IsScrolling property is read-only. </exception> internal void IsScrollingPropertyChanged(DependencyPropertyChangedEventArgs e) { if (_allowIsScrollingChanges != true) throw new InvalidOperationException("The IsScrolling property is read-only. "); _isScrolling = (bool) e.NewValue; var args = new ScrollingStateChangedEventArgs((bool)e.OldValue, (bool)e.NewValue); OnScrollingStateChanged(args); var handler = ScrollingStateChanged; if (handler != null) handler(this, args); }
internal static void IsScrollingPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) { var listbox = (ExtendedListBox) source; if (listbox.allowIsScrollingChanges != true) throw new InvalidOperationException("IsScrolling property is read-only"); var args = new ScrollingStateChangedEventArgs((bool)e.OldValue, (bool)e.NewValue); listbox.OnScrollingStateChanged(args); if (listbox.ScrollingStateChanged != null) listbox.ScrollingStateChanged(listbox, args); }
protected virtual void OnScrollingStateChanged(ScrollingStateChangedEventArgs e) { }