Beispiel #1
0
        /// <summary>
        /// Reset the Slider to the Start/End
        /// </summary>
        /// <param name="isStart">Pass true to reset to start point</param>
        public void ResetSelection(bool isStart)
        {
            double widthChange = this.RangeStop - this.RangeStart;

            widthChange = isStart ? -widthChange : widthChange;

            RangeSliderBase.MoveThumb(this.leftButton, this.rightButton, widthChange);
            this.ReCalculateRangeSelected(true, true);
        }
Beispiel #2
0
        /// <summary>
        /// Moves the current selection with x value
        /// </summary>
        /// <param name="isLeft">True if you want to move to the left</param>
        public void MoveSelection(bool isLeft)
        {
            double widthChange = RangeSliderBase.RepeatButtonMoveRatio * (this.RangeStopSelected - this.RangeStartSelected)
                                 * this.movableWidth / this.movableRange;

            widthChange = isLeft ? -widthChange : widthChange;
            RangeSliderBase.MoveThumb(this.leftButton, this.rightButton, widthChange);
            this.ReCalculateRangeSelected(true, true);
        }
Beispiel #3
0
 /// <summary>
 /// This method drags the thumb from the middle
 /// </summary>
 /// <param name="sender">Center thumb.</param>
 /// <param name="e">Event data.</param>
 private void CenterThumbDragDelta(object sender, DragDeltaEventArgs e)
 {
     RangeSliderBase.MoveThumb(this.leftButton, this.rightButton, e.HorizontalChange);
 }