SliderExtensions
Namespace: Hex1b
Assembly: Hex1b.dll
Extension methods for creating Slider widgets.
csharp
public static class SliderExtensionsInheritance
Object → SliderExtensions
Methods
Slider<TParent>(WidgetContext<TParent>, double, double, double, double)
Creates a slider with a custom range and step increment.
Parameters:
ctx(WidgetContext<<TParent>>): The widget context.initialValue(Double): The initial value.min(Double): The minimum value of the range.max(Double): The maximum value of the range.step(Double): The step increment for keyboard navigation.
Returns: SliderWidget
A new SliderWidget.
csharp
public static SliderWidget Slider<TParent>(this WidgetContext<TParent> ctx, double initialValue, double min, double max, double step) where TParent : Hex1bWidgetSlider<TParent>(WidgetContext<TParent>, double, double, double)
Creates a slider with a custom range.
Parameters:
ctx(WidgetContext<<TParent>>): The widget context.initialValue(Double): The initial value.min(Double): The minimum value of the range.max(Double): The maximum value of the range.
Returns: SliderWidget
A new SliderWidget.
csharp
public static SliderWidget Slider<TParent>(this WidgetContext<TParent> ctx, double initialValue, double min, double max) where TParent : Hex1bWidgetSlider<TParent>(WidgetContext<TParent>, double)
Creates a slider with a 0-100 range.
Parameters:
ctx(WidgetContext<<TParent>>): The widget context.initialValue(Double): The initial value (0-100). Default is 0.
Returns: SliderWidget
A new SliderWidget.
csharp
public static SliderWidget Slider<TParent>(this WidgetContext<TParent> ctx, double initialValue = 0) where TParent : Hex1bWidgetRemarks
Sliders allow users to select a numeric value within a range by moving a handle along a track. They support keyboard navigation (arrow keys, Home/End, PageUp/PageDown) and mouse click-to-position.
Examples
Simple slider with default 0-100 range:
csharp
ctx.Slider(50)Slider with custom range:
csharp
ctx.Slider(25, min: 0, max: 50)Slider with discrete steps:
csharp
ctx.Slider(0, min: 0, max: 100, step: 10)