Class Range

Namespace
Forma
Assembly
Forma.dll
public abstract class Range : TemplatedControl, IAddChild<Control>, IAddChild, INotifyPropertyChanged, IDisposable
Inheritance
Range
Implements
Derived
Inherited Members

Constructors

Range()

protected Range()

Properties

AccessibilityActions

public override AccessibilityActions AccessibilityActions { get; }

Property Value

AccessibilityActions

AccessibilityValue

public override string AccessibilityValue { get; }

Property Value

string

AllowGreater

public bool AllowGreater { get; set; }

Property Value

bool

AllowLesser

public bool AllowLesser { get; set; }

Property Value

bool

ExpRatio

public bool ExpRatio { get; set; }

Property Value

bool

MaxValue

public float MaxValue { get; set; }

Property Value

float

MinValue

public float MinValue { get; set; }

Property Value

float

Page

public float Page { get; set; }

Property Value

float

Ratio

public float Ratio { get; set; }

Property Value

float

Step

public float Step { get; set; }

Property Value

float

UseRoundedValues

public bool UseRoundedValues { get; set; }

Property Value

bool

Value

public float Value { get; set; }

Property Value

float

Methods

GetAsRatio()

public float GetAsRatio()

Returns

float

SetAsRatio(float)

public void SetAsRatio(float ratio)

Parameters

ratio float

SetValueNoSignal(float)

public void SetValueNoSignal(float value)

Parameters

value float

Share(Range)

public void Share(Range range)

Parameters

range Range

SnapToMultiple(float, float)

Snaps a value to the nearest multiple of step with no anchor, matching Godot's anchor-free Math::snapped (used e.g. to pre-snap SpinBox's arrow_step itself).

protected static float SnapToMultiple(float value, float step)

Parameters

value float
step float

Returns

float

SnapToStep(float, float)

Snaps a value to the nearest multiple of step anchored at MinValue, matching Godot's Range::_calc_value / _snapped_r128 formula (floor(x/step + 0.5) * step) - round-half-up, not .NET's default round-half-to-even.

protected float SnapToStep(float value, float step)

Parameters

value float
step float

Returns

float

Unshare()

public void Unshare()

Events

ValueChanged

public event Action<Range, float> ValueChanged

Event Type

Action<Range, float>