Class SpinBox

Namespace
Forma
Assembly
Forma.dll

Edits a numeric range through text entry, arrow stepping, keyboard input, or vertical dragging.

[TemplatePart("PART_Editor", typeof(ContentPresenter), true)]
public sealed class SpinBox : Range, IAddChild<Control>, IAddChild, INotifyPropertyChanged, IDisposable
Inheritance
SpinBox
Implements
Inherited Members

Constructors

SpinBox()

public SpinBox()

Fields

EditorPartName

public const string EditorPartName = "PART_Editor"

Field Value

string

Properties

AccessibilityRole

public override AccessibilityRole AccessibilityRole { get; }

Property Value

AccessibilityRole

ArrowLayout

Gets or sets the arrow arrangement. The default is Vertical.

public SpinBoxArrowLayout ArrowLayout { get; set; }

Property Value

SpinBoxArrowLayout

CustomArrowRound

public bool CustomArrowRound { get; set; }

Property Value

bool

CustomArrowStep

public float CustomArrowStep { get; set; }

Property Value

float

Font

public SpriteFont Font { get; set; }

Property Value

SpriteFont

IsDraggingValue

public bool IsDraggingValue { get; }

Property Value

bool

LineEdit

public SpinBoxLineEdit LineEdit { get; }

Property Value

SpinBoxLineEdit

Prefix

public string Prefix { get; set; }

Property Value

string

Suffix

public string Suffix { get; set; }

Property Value

string

UIFont

public UIFont UIFont { get; set; }

Property Value

UIFont

UpdateOnTextChanged

public bool UpdateOnTextChanged { get; set; }

Property Value

bool

Methods

Apply()

public void Apply()

GetArrowLayout()

Gets the arrow arrangement.

public SpinBoxArrowLayout GetArrowLayout()

Returns

SpinBoxArrowLayout

GetCustomArrowStep()

public float GetCustomArrowStep()

Returns

float

GetHorizontalAlignment()

public HorizontalAlignment GetHorizontalAlignment()

Returns

HorizontalAlignment

GetLineEdit()

public LineEdit GetLineEdit()

Returns

LineEdit

GetMinimumSize()

public override Vector2 GetMinimumSize()

Returns

Vector2

GetPrefix()

public string GetPrefix()

Returns

string

GetSuffix()

public string GetSuffix()

Returns

string

GetUpdateOnTextChanged()

public bool GetUpdateOnTextChanged()

Returns

bool

IsCustomArrowRounding()

public bool IsCustomArrowRounding()

Returns

bool

IsEditable()

public bool IsEditable()

Returns

bool

IsSelectAllOnFocus()

public bool IsSelectAllOnFocus()

Returns

bool

PointerMoved(Point)

The pointer moved over this control, in global coordinates.

protected override void PointerMoved(Point point)

Parameters

point Point

PointerPressed(Point)

A pointer press landed on this control, in global coordinates.

Protected as well as internal so a control defined outside this assembly can take part in pointer input. Without that, an app hosting its own drawing surface has to read raw mouse state instead, which bypasses hit-testing, modal gating and the injection side-channel — so such a surface cannot be driven by a test at all.

protected override void PointerPressed(Point point)

Parameters

point Point

PointerReleased(Point, bool)

The pointer was released, with whether it was still inside this control.

protected override void PointerReleased(Point point, bool isInside)

Parameters

point Point
isInside bool

SetArrowLayout(SpinBoxArrowLayout)

Sets the arrow arrangement.

public void SetArrowLayout(SpinBoxArrowLayout layout)

Parameters

layout SpinBoxArrowLayout

SetCustomArrowRound(bool)

public void SetCustomArrowRound(bool round)

Parameters

round bool

SetCustomArrowStep(float)

public void SetCustomArrowStep(float customArrowStep)

Parameters

customArrowStep float

SetEditable(bool)

public void SetEditable(bool enabled)

Parameters

enabled bool

SetHorizontalAlignment(HorizontalAlignment)

public void SetHorizontalAlignment(HorizontalAlignment alignment)

Parameters

alignment HorizontalAlignment

SetPrefix(string)

public void SetPrefix(string prefix)

Parameters

prefix string

SetSelectAllOnFocus(bool)

public void SetSelectAllOnFocus(bool enabled)

Parameters

enabled bool

SetSuffix(string)

public void SetSuffix(string suffix)

Parameters

suffix string

SetUpdateOnTextChanged(bool)

public void SetUpdateOnTextChanged(bool enabled)

Parameters

enabled bool