示例#1
0
        /// <summary>
        /// Raises the RangeChanged event
        /// </summary>
        /// <param name="oldLowerVal">The previous lower value.</param>
        /// <param name="newLowerVal">The new lower value.</param>
        /// <param name="oldUpperVal">The previous upper value.</param>
        /// <param name="newUpperVal">The new upper value.</param>
        protected virtual void OnRangeChanged(double oldLowerVal, double newLowerVal, double oldUpperVal, double newUpperVal)
        {
            RoutedPropertyChangedEventHandler <RangeChangedEventArgs> handler = RangeChanged;

            if (handler != null)
            {
                RangeChangedEventArgs oldValues = new RangeChangedEventArgs(oldLowerVal, oldUpperVal);
                RangeChangedEventArgs newValues = new RangeChangedEventArgs(newLowerVal, newUpperVal);

                handler(this, new RoutedPropertyChangedEventArgs <RangeChangedEventArgs>(oldValues, newValues));
            }
        }
示例#2
0
        /// <summary>
        /// Raises the RangeChanged event
        /// </summary>
        /// <param name="oldLowerVal">The previous lower value.</param>
        /// <param name="newLowerVal">The new lower value.</param>
        /// <param name="oldUpperVal">The previous upper value.</param>
        /// <param name="newUpperVal">The new upper value.</param>
        protected virtual void OnRangeChanged(double oldLowerVal, double newLowerVal, double oldUpperVal, double newUpperVal)
        {
            RoutedPropertyChangedEventHandler<RangeChangedEventArgs> handler = RangeChanged;
                if (handler != null)
                {
                    RangeChangedEventArgs oldValues = new RangeChangedEventArgs(oldLowerVal, oldUpperVal);
                    RangeChangedEventArgs newValues = new RangeChangedEventArgs(newLowerVal, newUpperVal);

                    handler(this, new RoutedPropertyChangedEventArgs<RangeChangedEventArgs>(oldValues, newValues));
                }
        }