Skip to content

SliderNode ​

Namespace: Hex1b

Assembly: Hex1b.dll

Render node for the Slider widget. Manages state, handles input, and renders the slider.

csharp
public sealed class SliderNode : Hex1bNode

Inheritance ​

Object → Hex1bNode → SliderNode

Properties ​

IsFocusable ​

Returns true if this node can receive focus.

Returns: Boolean

csharp
public override bool IsFocusable { get; }

IsFocused ​

Gets or sets whether this node is currently focused. Only meaningful for focusable nodes (where IsFocusable is true).

Returns: Boolean

csharp
public override bool IsFocused { get; set; }

IsHovered ​

Gets or sets whether the mouse is currently hovering over this node. Set by Hex1bApp based on mouse position during each frame. Only set on focusable nodes (tracked via FocusRing hit testing).

Returns: Boolean

csharp
public override bool IsHovered { get; set; }

LargeStepPercent ​

The large step as a percentage of the range (for PageUp/PageDown).

Returns: Double

csharp
public double LargeStepPercent { get; set; }

Maximum ​

The maximum value of the range.

Returns: Double

csharp
public double Maximum { get; set; }

Minimum ​

The minimum value of the range.

Returns: Double

csharp
public double Minimum { get; set; }

Percentage ​

Gets the current value as a percentage (0.0 to 1.0) of the range.

Returns: Double

csharp
public double Percentage { get; }

SourceWidget ​

The source widget for creating typed event args.

Returns: SliderWidget

csharp
public SliderWidget? SourceWidget { get; set; }

Step ​

The step increment for keyboard navigation. Null means 1% of range.

Returns: Nullable<Double>

csharp
public double? Step { get; set; }

Value ​

The current value of the slider.

Returns: Double

csharp
public double Value { get; set; }

Methods ​

ConfigureDefaultBindings(InputBindingsBuilder) ​

Configures the default input bindings for this node type. Override in derived classes to add default key bindings. These bindings can be inspected and modified by the user's callback.

Parameters:

csharp
public override void ConfigureDefaultBindings(InputBindingsBuilder bindings)

MeasureCore(Constraints) ​

Override this method to implement measuring logic for this node.

Parameters:

Returns: Size

csharp
protected override Size MeasureCore(Constraints constraints)

Render(Hex1bRenderContext) ​

Renders the node to the given context.

Parameters:

csharp
public override void Render(Hex1bRenderContext context)

Remarks ​

SliderNode maintains the current value and handles keyboard/mouse input for adjusting the value. The value is preserved across reconciliation cycles.

The slider renders as a horizontal track with a handle (knob) that indicates the current position within the range.

Released under the MIT License.