Infragistics(R) NetAdvantage(R) : WPF 2012.1
Interaction Modes
E-mail your feedback on this topic.
Shared XAML > Interactions > xamSlider > Using xamSlider > Interaction Modes

Glossary Item Box

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:

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);



Related Topics

xamSlider Thumbs

xamSlider Tick Marks

ToolTips

Value Tick Marks

Retrieve the Thumb Values

Programmatically Add or Remove Thumbs at Runtime