NumberSlider
Class in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll
A number with a slider beside it (a minimum score, a size, a number of frames): the number input first, its unit, then the slider over NumberSlider.Minimum to NumberSlider.Maximum; both show and change the one NumberSlider.Text (bind it two-way to the view model’s text of the number). Typing keeps exactly what was typed; moving the slider writes whole steps (NumberSlider.Step). Its validation error goes below the whole row through FormField.Error; with NumberSlider.HasError the input gets the red border of the theme.
public sealed class NumberSlider : UserControlInherits UserControl
XAML properties
Section titled “XAML properties”Set them in XAML (<ui:NumberSlider Name="..." />) or bind them.
| Name | Type | Description |
|---|---|---|
HasError |
bool |
The value has an error: the number box gets the red border (the text sits below the row). |
Maximum |
double |
The slider’s highest value. |
Minimum |
double |
The slider’s lowest value. |
Placeholder |
string? |
The number box’s hint while it is empty. |
Step |
double |
The slider’s step; the number box takes any value the form allows. |
Text |
string? |
The value as typed (bound like a text box’s text, so the form checks it). |
Unit |
string? |
The unit after the number (“%”, “s”); null: none. |
Properties
Section titled “Properties”TextBox Box { get; }The number input (tests type into it).
Slider
Section titled “Slider”Slider Slider { get; }The slider (tests move it).
Methods
Section titled “Methods”StepFor
Section titled “StepFor”static double StepFor(double minimum, double maximum, double step)The slider’s step for a range: one up to 200, else a hundredth of the range.