Class Dropdown
Dropdown UI element.
Inheritance
Dropdown
Implements
Inherited Members
VisualElement.ExecuteDefaultAction(EventBase)
VisualElement.Focus()
VisualElement.Overlaps(Rect)
VisualElement.ToString()
VisualElement.GetFirstOfType<T>()
VisualElement.GetFirstAncestorOfType<T>()
VisualElement.canGrabFocus
VisualElement.focusController
VisualElement.cacheAsBitmap
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
Namespace: Unity.AppUI.UI
Assembly: solution.dll
Syntax
public class Dropdown : Picker<DropdownItem, DropdownItem>, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IInputElement<IEnumerable<int>>, IValidatableElement<IEnumerable<int>>, INotifyValueChanged<IEnumerable<int>>, ISizeableElement, IPressable
Constructors
Dropdown()
Default constructor.
Declaration
public Dropdown()
Dropdown(IList, Action<DropdownItem, int>, Action<DropdownItem, IEnumerable<int>>, int[])
Construct a Dropdown UI element with a provided dynamic collection of items.
Declaration
public Dropdown(IList items, Action<DropdownItem, int> bindItemFunc = null, Action<DropdownItem, IEnumerable<int>> bindTitleFunc = null, int[] defaultIndices = null)
Parameters
Type | Name | Description |
---|---|---|
IList | items | An items collection. |
Action<DropdownItem, int> | bindItemFunc | The binding function used to populate display data for each item. |
Action<DropdownItem, IEnumerable<int>> | bindTitleFunc | The binding function used to populate display data for the title. |
int[] | defaultIndices | The selected index by default. |
Fields
ussClassName
The Dropdown main styling class.
Declaration
public static readonly string ussClassName
Field Value
Type | Description |
---|---|
string |
Properties
bindTitle
A method that will be called to bind the title.
Declaration
public Action<DropdownItem, IEnumerable<int>> bindTitle { get; set; }
Property Value
Type | Description |
---|---|
Action<DropdownItem, IEnumerable<int>> |
Methods
ApplyMultiSelectionMessage(LocalizedTextElement, int)
Apply the Picker localized multi selection message.
Declaration
protected virtual void ApplyMultiSelectionMessage(LocalizedTextElement element, int selectionCount)
Parameters
Type | Name | Description |
---|---|---|
LocalizedTextElement | element | The LocalizedTextElement to apply the message to. |
int | selectionCount | The number of selected items. |
Implements
UnityEngine.UIElements.INotifyValueChanged<T>