Class SelectorBase
The abstract base class for OptionSelector<TEnum> and FlagSelector<TFlagsEnum>.
public abstract class SelectorBase : View, IDisposable, ISupportInitializeNotification, ISupportInitialize, IOrientation, IValue<int?>, IValue
- Inheritance
-
SelectorBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Remarks
Default key bindings:
| Key | Action |
|---|---|
| Up / Left | Moves to the previous option. |
| Down / Right | Moves to the next option. |
Constructors
- SelectorBase()
Initializes a new instance of the SelectorBase class.
Properties
- DefaultMouseHighlightStates
Gets or sets the default Highlight Style.
- DoubleClickAccepts
Gets or sets whether double-clicking on an Item will cause the Accepting event to be raised.
- HorizontalSpace
Gets or sets the horizontal space for this OptionSelector if the Orientation is Horizontal
- Orientation
Gets or sets the Orientation for this SelectorBase. The default is Vertical.
- Styles
Gets or sets the styles for the flag selector.
- TabBehavior
Gets or sets the tab behavior of the checkboxes within the selector. If TabStop (the default), navigating within and out of the selector will follow the standard superview/subview behavior. If NoStop, only the arrow keys wil navigate within the selector.
- Values
Gets or sets the option values. If Values is null, get will return values based on the Labels property.
Methods
- CreateCheckBox(string, int)
INTERNAL: Creates a checkbox subview
- CreateSubViews()
Creates the subviews for this selector.
- GetCheckBoxValue(CheckBox)
Gets the int value associated with a checkbox. For testing and advanced scenarios.
- OnAccepting(CommandEventArgs)
Called when the user is accepting the state of the View and the Accept has been invoked. Set CommandEventArgs.Handled to true and return true to indicate the event was handled and processing should stop.
- OnOrientationChanged(Orientation)
Called when Orientation has changed.
- OnValueChanged(int?, int?)
Called when Value has changed.
- RaiseValueChanged(int?, int?)
Raises the ValueChanged event.
- RaiseValueChanging(int?, int?)
Raises the ValueChanging event.
- SetLayout()
Updates the layout of the subviews based on Orientation.
- UpdateChecked()
Called when the checked state of the checkboxes needs to be updated.
Events
- OrientationChanged
Raised when Orientation has changed.
- OrientationChanging
Raised when Orientation is changing. Can be cancelled.
- ValueChanged
Raised when Value has changed.
- ValueChangedUntyped
Raised when Value has changed, providing the value as an un-typed object.
- ValueChanging
Raised when Value is about to change. Set Handled to true to cancel the change.