Version

Interaction Modes

The xamSlider™ control allows you to configure how the thumbs interact with each other. This can be done by setting the xamSliderNumericThumb object’s InteractionMode property to one of the following SliderThumbInteractionMode enumeration values:

  • Lock – An active thumb cannot pass over or push a locked thumb.

  • Push – An active thumb can push a thumb whose mode is set to push along the slider, changing its position to that of the active thumb.

  • Free – There is not a specified interaction when the thumb mode is set to free.

The interaction between thumbs depends on the InteractionMode value of the non active thumb. For example when you drag a thumb along the slider and you encounter another thumb, it is the interaction mode of the second thumb that determines the interaction between the two thumbs.

The following code demonstrates how to set the interaction modes.

In XAML:

<ig:XamNumericRangeSlider
        Name="xamNumericRangeSlider1"
        MinValue="0"
        MaxValue="100">
   <ig:XamSliderNumericThumb InteractionMode="Free" Value="25" />
   <ig:XamSliderNumericThumb InteractionMode="Lock" Value="50" />
   <ig:XamSliderNumericThumb InteractionMode="Push" Value="75" />
</ig:XamNumericRangeSlider>

In Visual Basic:

'Numeric range slider
Dim numericRangeThumb1 As New XamSliderNumericThumb()
numericRangeThumb1.InteractionMode = SliderThumbInteractionMode.Free
numericRangeThumb1.Value = 25
Dim numericRangeThumb2 As New XamSliderNumericThumb()
numericRangeThumb2.InteractionMode = SliderThumbInteractionMode.Lock
numericRangeThumb2.Value = 50
Dim numericRangeThumb3 As New XamSliderNumericThumb()
numericRangeThumb3.InteractionMode = SliderThumbInteractionMode.Push
numericRangeThumb3.Value = 75
Me.xamNumericRangeSlider1.Thumbs.Add(numericRangeThumb1)
Me.xamNumericRangeSlider1.Thumbs.Add(numericRangeThumb2)
Me.xamNumericRangeSlider1.Thumbs.Add(numericRangeThumb3)

In C#:

//Numeric range slider
XamSliderNumericThumb numericRangeThumb1 = new XamSliderNumericThumb
{
    InteractionMode= SliderThumbInteractionMode.Free,
    Value = 25
};
xamSliderNumericThumb numericRangeThumb2 = new XamSliderNumericThumb
{
    InteractionMode = SliderThumbInteractionMode.Lock,
    Value = 50
};
xamSliderNumericThumb numericRangeThumb3 = new XamSliderNumericThumb
{
    InteractionMode = SliderThumbInteractionMode.Push,
    Value = 75
};
this.xamNumericRangeSlider1.Thumbs.Add(numericRangeThumb1);
this.xamNumericRangeSlider1.Thumbs.Add(numericRangeThumb2);
this.xamNumericRangeSlider1.Thumbs.Add(numericRangeThumb3);