Class Slider<T>
Provides a slider control letting the user navigate from a set of typed options in a linear manner using the keyboard or mouse.
public class Slider<T> : View, IDisposable, ISupportInitializeNotification, ISupportInitialize
Type Parameters
T
- Inheritance
-
Slider<T>
- Implements
- Derived
- Inherited Members
Constructors
- Slider(List<T>, Orientation)
Initializes a new instance of the Slider class.
Properties
- AllowEmpty
Allow no selection.
- FocusedOption
The focused option (has the cursor).
- InnerSpacing
Gets or sets the number of rows/columns between Options
- LegendsOrientation
Legends Orientation. Orientation
- Options
Set the slider options.
- Orientation
Slider Orientation. Orientation
- RangeAllowSingle
Allow range start and end be in the same option, as a single option.
- ShowEndSpacing
Show/Hide spacing before and after the first and last option.
- ShowLegends
Show/Hide the options legends.
- Style
Slider styles. SliderStyle
- Type
Slider Type. SliderType
Methods
- GetSetOptions()
Get the indexes of the set options.
- OnDrawContent(Rectangle)
Draws the view's content, including Subviews.
- OnMouseEvent(MouseEvent)
Called when a mouse event occurs within the view's Viewport.
- OnOptionFocused(int, SliderEventArgs<T>)
Overridable function that fires the OptionFocused event.
- OnOptionsChanged()
Overridable method called when the slider options have changed. Raises the OptionsChanged event.
- OnOrientationChanged(Orientation)
Called when the slider orientation has changed. Invokes the OrientationChanged event.
- PositionCursor()
Positions the cursor in the right position based on the currently focused view in the chain.
- SetContentSizeBestFit()
Adjust the dimensions of the Slider to the best value.
- SetOption(int)
Causes the specified option to be set and be focused.
- UnSetOption(int)
Causes the specified option to be un-set and be focused.
Events
- OptionFocused
Event raised When the option is hovered with the keys or the mouse.
- OptionsChanged
Event raised when the slider option/s changed. The dictionary contains: key = option index, value = T
- OrientationChanged
Fired when the slider orientation has changed. Can be cancelled by setting Cancel to true.