Class Dropdown<TItemType, TView>
Inheritance
Dropdown<TItemType, TView>
Assembly: Ritchie.Toolbox.dll
public abstract class Dropdown<TItemType, TView> : Widget, IFontFamilyProvider, IInspectable, IMouseClickHandler, IGainFocusHandler, ILoseFocusHandler, IDropdownButtonVisual, IVisual<DropdownButtonVisualState>, IMouseEnterHandler, IMouseLeaveHandler, IMouseDownHandler, IMouseUpHandler, IMouseHandler, IUpdateThemeProperties where TView : DropdownItemView<TItemType>, new()
Type Parameters
Name |
Description |
TItemType |
|
TView |
|
Constructors
Declaration
Properties
Declaration
public ICollection<TItemType> Items { get; }
Property Value
PlaceholderTExt
Declaration
public string PlaceholderTExt { get; set; }
Property Value
Declaration
public int SelectedIndex { get; set; }
Property Value
Gets a read-only reference to the visual properties associated with the widget.
Declaration
public ref readonly DropdownButtonVisualState VisualProperties { get; }
Property Value
Methods
ArrangeChildren(IGuiContext, LayoutRect)
Declaration
protected override void ArrangeChildren(IGuiContext context, LayoutRect availableSpace)
Parameters
Overrides
Declaration
protected override void BeforeRender()
Overrides
GetContentSize(Point)
Declaration
protected override Point GetContentSize(Point availableSize)
Parameters
Type |
Name |
Description |
Point |
availableSize |
|
Returns
Overrides
Declaration
public void OnFocusGained(FocusEvent e)
Parameters
Declaration
public void OnFocusLost(FocusEvent e)
Parameters
Declaration
public void OnMouseClick(MouseButtonEvent e)
Parameters
Declaration
public void OnMouseDown(MouseButtonEvent e)
Parameters
Declaration
public void OnMouseEnter(MouseMoveEvent e)
Parameters
Declaration
public void OnMouseLeave(MouseMoveEvent e)
Parameters
Declaration
public void OnMouseUp(MouseButtonEvent e)
Parameters
Declaration
protected override void RebuildClippingZone(GeometryHelper geometry)
Parameters
Overrides
Declaration
protected override void RebuildGeometry(GeometryHelper geometry)
Parameters
Overrides
Declaration
public void SetItems(IEnumerable<TItemType> itemSource)
Parameters
Type |
Name |
Description |
IEnumerable<TItemType> |
itemSource |
|
Retrieves layout properties from the visual style. Called by the UI system on every
frame before layout updates occur. If layout properties change during this method call,
the widget will automatically invalidate its own layout.
Declaration
public void UpdateThemeProperties()
Events
Declaration
public event Action<int>? SelectedIndexChanged
Event Type
Implements
Extension Methods