Provides Numeric slider GUI not tied to a control-handle.
Properties
DecimalPlaces
#Gets or sets the number of decimal places allowed for floating point type sliders. Valid values between zero and 12.
Epsilon
#Gets the smallest value change supported by the current slider properties.
FormatMask
#Gets or sets the string format mask to use for the display. Should contain at least one "{0}" element.
Grip
#Gets the box of the current grip. If the slider value/limits are not set up correctly then this rectangle may well be outside of the bounds. If the limits are coincident, this will fail (divide by zero).
GripText
#Gets the text that will be drawn on the slider.
GripTextPure
#Gets the text format of the number of this slider value.
GripWidth
#Gets an estimate of the maximum number of pixels taken up by the grip. This property depends on many different factors, though should remain constant when other properties are not changed. If the Font hasn't been specified, the default Windows.Forms.Control font is used.
Maximum
#Gets or sets the upper limit of the slider.
Minimum
#Gets or sets the lower limit of the slider.
Padding
#Gets or sets the padding around the slider border.
Rail
#Gets the shape of the rail. The height of the rectangle will be zero, but the y-position will be rounded to integer precision.
public Rectangle Rail { get; }
RailBrightColour
#Gets or sets the bright colour used to draw rails and ticks.
public Color RailBrightColour { get; set; }
RailDarkColour
#Gets or sets the dark colour used to draw rails and ticks.
public Color RailDarkColour { get; set; }
RenderDelegate_Background
#Gets or sets the delegate called after the background of the slider has been drawn.
RenderDelegate_Border
#Gets or sets the delegate called after the border of the slider has been drawn.
RenderDelegate_Ticks
#Gets or sets the delegate called after the ticks of the slider have been drawn.
ShadowSize
#Gets or sets the size of the border shadow along all edges of the box.
TextInputHandlerDelegate
#Gets or sets the custom handler for text input. If you do not set a custom handler the default behaviour will be used.
TickCount
#Gets or sets the number of ticks displayed.
TickFrequency
#Gets or sets the frequency of large ticks vs small ticks.
Methods
FixDomain
#Fix the limits of the slider. Limits will be rounded according to slider type and accuracy. Also, a minimum range for all types is ensured.
public void FixDomain()
FixValue
#Fix the value of the slider. The value will be rounded according to slider type and accuracy. Also, the value will be clipped to the limits. Before you call this function, ensure the limits are set up correctly.
public void FixValue()
HideTextInputBox
Hides the text-input override form (if it is displayed).
public void HideTextInputBox()
MouseDown
#Respond to mouse-down events.
Returns: True if a Drag operation was started, false if the event went unnoticed.
MouseMove
#Respond to mouse-move events.
Returns: True if a Drag operation was performed, false if the event went unnoticed.
MouseUp
#Respond to mouse-up events.
Returns: True if a Drag operation was terminated, false if the event went unnoticed.
ProcessNumber
#Process a number using the given slider characteristics.
public static decimal ProcessNumber()
val,
Number to process.
accuracy,
Slider rounding accuracy.
digits
Number of digits to use for floating point rounding.
Returns: Processed number.
RespondToEnter
Implements: RespondToEnter
RespondToEscape
Implements: RespondToEscape
SetSnapRanges
#Assign a collection of snap ranges to this slider.
public void SetSnapRanges()
ranges
Ranges to snap to. Will override whatever snap ranges were defined before.
ShowTextInputBox
#ShowTextInputBox
Display a floating text-box on top of the owner control.
public void ShowTextInputBox()
Control
owner,
Control that owns this slider. The coordinates of the Bounds rectangle must be specified in owner coordinates.
content,
selectContent,
limitToBoundary,
If True, the pop up input box will be 'clipped' to the owner boundary. At least some part of the slider must be visible for this to work.
Matrix
transform
Transformation matrix to apply to pop up UI.
ShowTextInputBox
Display a floating text-box on top of the owner control.
public void ShowTextInputBox()
Control
owner,
Control that owns this slider. The coordinates of the Bounds rectangle must be specified in owner coordinates.
content,
selectContent,
limitToBoundary
If True, the pop up input box will be 'clipped' to the owner boundary. At least some part of the slider must be visible for this to work.
ShowTextInputBox
Display a floating text-box on top of the owner control.
ShowTextInputBox
#public void ShowTextInputBox()
Control
owner