FloatingButton

References
public sealed class FloatingButton
Base class for button UI elements that float in screen-space on top of IControl.

Properties

Anchor

#
public PointF Anchor { get; }
Gets the anchor position of this button. This property is only relevant if Position == Anchored.

Colour

#
public Color Colour { get; }
Gets the colour of this button.

Control

#
public IFlexControl Control { get; }
Gets the control associated with this floating button.

Enabled

#
public bool Enabled { get; set; }
Gets the enabled state of this button.

HasFocus

#
public bool HasFocus { get; set; }
Gets or sets whether this interaction object is currently active. Object are made active by the owner control if they return Response.Capture from any event handlers. Control are made inactive when they return Response.Release, or when another object becomes active. You typically do not set this property.

Icon

#
public IIcon Icon { get; set; }
Gets or sets the icon associated with this button.

Info

#
public string Info { get; set; }
Gets or sets the info message for this button.

Name

#
public string Name { get; }
Gets or sets the name of this button.

NumericValue

#
public UiNumber NumericValue { get; }
Gets the numeric value (if any) associated with this button.

Position

#
public FloatingPosition Position { get; }
Gets the position category for this button.

State

#
public FloatingState State { get; }
Gets the current state of this button.

Methods

Close

#
public void Close()
Close the button.

Hide

#
public void Hide()
Hide the button.

MakeNumeric

#
public void MakeNumeric(UiNumber number, string valueKey)
Turn this button into a numeric slider.
number (UiNumber)Number.
valueKey (string)State name (if any) on button icon to associate with number.

ModifyAnchor

#
public void ModifyAnchor(PointF anchor, bool immediate)
Set a new anchor point. Handler is not required to modify the anchor animator in this case.
anchor (PointF)New point.
immediate (bool)If true, the button is moved immediately. If false, the change is gradual.

ModifyColour

#
public void ModifyColour(Color colour)
Set a new colour.
colour (Color)New colour.

Show

#
public void Show()
Show the button.

Events

ValueChanged

#
public event EventHandler<FloatingButtonEventArgs<UiNumber>> ValueChanged
Raised when the actual value of the associated number changes.