NumberPicker
ReferencesStandard numberline picker UX object. The picked value is always the number underneath a fixed marker line in the horizontal centre of the control. The numberline itself is dragged and zoomed underneath that marker.
Constructors
NumberPicker
#Create a number picker based on an initial value and zoom.
Properties
Bounds
#Gets or sets the layout bounds for this picker. Resizing retains the zoom, not the visible limits.
public RectangleF Bounds { get; set; }
Centre
#Gets or sets the exact number underneath the marker line. Unlike Value this number is never rounded.
Limits
#Gets the limits for this picker. The limits define the lowest and highest allowed values. The value of the UiNumber represents the original value.
Quantum
#Gets the distance between the smallest visible ticks. This is the quantum the value is rounded to when snapping.
ShowBalloon
#Gets or sets whether a value balloon is drawn above the marker line while the cursor hovers over the picker or the numberline is navigated.
Value
#Gets the picked value. This is the number underneath the marker line, rounded to the visible tick density when SnapToTicks is on.
Methods
DrawBalloon
#Render the value balloon above the marker line. The balloon sticks out above the bounds, so this must be called without a clipping region in place.
public void DrawBalloon()
context,
Graphics context.
Color
fill
Solid balloon colour, the text is drawn in a contrasting colour.
FormatValue
#Write a number the way the balloon would show it at the current zoom. With snapping on the decimals follow the finest visible tick class, without it the number is written out in full.
Returns: Formatted number.
QuantumFor
#Compute the distance between the smallest ticks visible at a zoom.
Returns: Quantum at that zoom.
SetValue
#Assign a value. The numberline is recentred exactly on the new value, the zoom is retained.
SnapBack
#Recentre the numberline exactly on the current value. The motion is animated, the value itself does not change.
public void SnapBack()
SnapBackWhenIdle
#Snap back once navigation has been quiet for a moment. Used by navigation paths which have no explicit end signal.
public void SnapBackWhenIdle()
TickExponentFor
#Compute the power-of-ten exponent of the smallest tick class visible at a zoom.
Returns: Exponent of the finest visible tick class.