Class Spinner

Definition

Namespace:
ElmSharp
Assembly:
ElmSharp.dll
API Level:
preview

The Spinner is a widget that increases or decreases the numeric values using arrow buttons, or edit values directly. Inherits Layout.

C#
Copy
public class Spinner : Layout, IAccessibleObject
Inheritance
Derived
Implements

Constructors

View Source

Spinner()

Creates and initializes a new instance of the Layout class.

Declaration
C#
Copy
protected Spinner()
API Level: preview
View Source

Spinner(EvasObject)

Creates and initializes a new instance of the Spinner class.

Declaration
C#
Copy
public Spinner(EvasObject parent)
Parameters
Type Name Description
EvasObject parent

The parent of new Spinner instance

API Level: preview

Properties

View Source

Interval

Sets or gets the interval on time updates for a user mouse button to hold on the spinner widgets' arrows.

Declaration
C#
Copy
public double Interval { get; set; }
Property Value
Type Description
System.Double
API Level: preview
View Source

IsEditable

Sets or gets whether the spinner can be directly edited by the user or not.

Declaration
C#
Copy
public bool IsEditable { get; set; }
Property Value
Type Description
Boolean
Remarks

By default, it is enabled.

API Level: preview
View Source

IsWrapEnabled

Sets or gets the wrap of a given spinner widget.

Declaration
C#
Copy
public bool IsWrapEnabled { get; set; }
Property Value
Type Description
Boolean
Remarks

If wrap is disabled when the user tries to increment the value, but the displayed value plus step value is bigger than the maximum value, then the new value will be the maximum value. If wrap is enabled when the user tries to increment the value, but the displayed value plus step value is bigger than the maximum value, then the new value will be the minimum value. By default, it's disabled.

API Level: preview
View Source

LabelFormat

Sets or gets the label format of the spinner.

Declaration
C#
Copy
public string LabelFormat { get; set; }
Property Value
Type Description
System.String
API Level: preview
View Source

Maximum

Sets or gets the maximum value for the spinner.

Declaration
C#
Copy
public double Maximum { get; set; }
Property Value
Type Description
System.Double
API Level: preview
View Source

Minimum

Sets or gets the minimum value for the spinner.

Declaration
C#
Copy
public double Minimum { get; set; }
Property Value
Type Description
System.Double
API Level: preview
View Source

RoundBase

Sets or gets the base for rounding.

Declaration
C#
Copy
public double RoundBase { get; set; }
Property Value
Type Description
System.Double
API Level: preview
View Source

RoundValue

Sets or gets the round value for rounding.

Declaration
C#
Copy
public int RoundValue { get; set; }
Property Value
Type Description
System.Int32
API Level: preview
View Source

Step

Sets or gets the step that is used to increment or decrement the spinner value.

Declaration
C#
Copy
public double Step { get; set; }
Property Value
Type Description
System.Double
API Level: preview
View Source

Value

Sets or gets the value displayed by the spinner.

Declaration
C#
Copy
public double Value { get; set; }
Property Value
Type Description
System.Double
API Level: preview

Methods

View Source

AddSpecialValue(Double, String)

Sets a special string to display in the place of the numerical value.

Declaration
C#
Copy
public void AddSpecialValue(double value, string label)
Parameters
Type Name Description
System.Double value

The numerical value to be replaced

System.String label

The label to be used

API Level: preview
View Source

CreateHandle(EvasObject)

Creates a widget handle.

Declaration
C#
Copy
protected override IntPtr CreateHandle(EvasObject parent)
Parameters
Type Name Description
EvasObject parent

Parent EvasObject.

Returns
Type Description
System.IntPtr

Handle IntPtr.

Overrides
API Level: preview
View Source

GetSpecialValue(Double)

Gets the special string display in the place of the numerical value.

Declaration
C#
Copy
public string GetSpecialValue(double value)
Parameters
Type Name Description
System.Double value

The replaced numerical value.

Returns
Type Description
System.String

The value of the spinner, which replaced the numerical value with a special string.

API Level: preview
View Source

OnRealized()

The callback of the Realized event.

Declaration
C#
Copy
protected override void OnRealized()
Overrides
API Level: preview
View Source

RemoveSpecialValue(Double)

Removes a previously added special value. After this, the spinner will display the value itself instead of a label.

Declaration
C#
Copy
public void RemoveSpecialValue(double value)
Parameters
Type Name Description
System.Double value

The replaced numerical value.

API Level: preview

Events

View Source

DelayedValueChanged

DelayedValueChanged will be triggered after a short time when the value is changed.

Declaration
C#
Copy
public event EventHandler DelayedValueChanged
Event Type
Type Description
EventHandler
API Level: preview
View Source

ValueChanged

ValueChanged will be triggered whenever the spinner value is changed.

Declaration
C#
Copy
public event EventHandler ValueChanged
Event Type
Type Description
EventHandler
API Level: preview

Implements

Extension Methods