Class SelectorBase<WidgetType, ItemType>
- Namespace
- Myra.Graphics2D.UI
- Assembly
- Myra.dll
An abstract base class for selector widgets that manage selection of items from a collection.
public abstract class SelectorBase<WidgetType, ItemType> : Widget, IItemWithId, INotifyAttachedPropertyChanged where WidgetType : Widget where ItemType : class, ISelectorItem
Type Parameters
WidgetTypeThe type of widget to display the items.
ItemTypeThe type of items that can be selected.
- Inheritance
-
SelectorBase<WidgetType, ItemType>
- Implements
- Derived
- Inherited Members
Constructors
SelectorBase(WidgetType)
Initializes a new instance of the SelectorBase<WidgetType, ItemType> class.
protected SelectorBase(WidgetType widget)
Parameters
widgetWidgetTypeThe widget to display and manage the items.
Properties
InternalChild
Gets the internal child widget that displays the items.
[Browsable(false)]
protected WidgetType InternalChild { get; }
Property Value
- WidgetType
Items
Gets the collection of items available for selection.
[Browsable(false)]
public abstract ObservableCollection<ItemType> Items { get; }
Property Value
- ObservableCollection<ItemType>
SelectedIndex
Gets or sets the index of the currently selected item, or null if no item is selected.
[Browsable(false)]
public abstract int? SelectedIndex { get; set; }
Property Value
- int?
SelectedItem
Gets or sets the currently selected item, or null if no item is selected.
[Browsable(false)]
public abstract ItemType SelectedItem { get; set; }
Property Value
- ItemType
SelectionMode
Gets or sets the selection mode (single or multiple items).
public abstract SelectionMode SelectionMode { get; set; }
Property Value
Events
SelectedIndexChanged
Occurs when the selected item or selected index changes.
public abstract event MyraEventHandler SelectedIndexChanged