Beispiel #1
0
        protected virtual void RaiseScrollingStateChanged(ScrollingStateChangedEventArgs e)
        {
            var handler = ScrollingStateChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Handler for when the IsScrolling dependency property changes
        /// </summary>
        /// <param name="source">The object that has the property</param>
        /// <param name="e">Args</param>
        static void IsScrollingPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
        {
            var listbox = source as LazyListBox;

            if (listbox == null)
            {
                return;
            }

            // Call the virtual notification method for anyone who derives from this class
            var scrollingArgs = new ScrollingStateChangedEventArgs((bool)e.OldValue, (bool)e.NewValue);

            // Raise the event, if anyone is listening to it
            var handler = listbox.ScrollingStateChanged;

            if (handler != null)
            {
                handler(listbox, scrollingArgs);
            }
        }