NSSlider in C# | WPF | Saatody | Amit Padhiyar
NSSlider is WPF slider's alternative. Here NS means N-North and S-South. So, NSSlider is vertical slider in WPF. In this post, I will show reference API of this UI.
NSSlider Class API
NSSlider has one class and this is main class. NSSlider provides Minimum, Maximum, Change, Format, Value and Caption properties with one event which is ValueChanged event.
Properties
Here basic commons properties with syntax is below.
Syntax
public decimal Minimum
public decimal Maximum
public decimal Change
public string Format
public decimal Value
public string Caption
Constructors
This is one and default constructor.
Syntax
public NSSlider()
Events
Here is only an event ValueChanged. This event fire when Value property value being changed.
Syntax
public event EventHandler ValueChanged;
Example Of NSSlider
<gui:NSSlider x:Name="NS1" Minimum="-50" Maximum="20" Change="0.1" Format="00.00$" Value="5" Caption="Demo"/>
NS1.ValueChanged += (sender, e) =>
{
System.Console.WriteLine("Value: " + NS1.Value);
};
In generally, Slider work properly. But in some cases, SpinEdit will not work properly (Specially when format has any non-numeric character).
Comments
Post a Comment