From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent ni:SliderDouble ranges from editing by user

Solved!
Go to solution

Hi,

I have a slider in WPF/C#

<ni:SliderDouble Height="60" Name="updateRate" ValueChanged="OnUpdateRateValueChanged" Range="0.05,1" Value="0.05"  />

When application is running user can change min or max value of the range by clicking on the tick lable and editing the value.

Need a way to prevent/protect, make it not editable.

Thank you

Yuri

0 Kudos
Message 1 of 3
(3,275 Views)
Solution
Accepted by topic author yurianikin

Scale range editing is controlled by the InteractionModeproperty on the slider. To disable EditRange, you can assign a different set of flag values, such as InteractionMode="ArrowKeys,Drag,Snap,ScrollWheel".

~ Paul H
0 Kudos
Message 2 of 3
(3,271 Views)

Thanks! Working!

0 Kudos
Message 3 of 3
(3,268 Views)