Class ChoiceListItem
A single lettered option inside a ChoiceList.
Inheritance
ChoiceListItem
Implements
Inherited Members
VisualElement.Focus()
VisualElement.Overlaps(Rect)
VisualElement.ToString()
VisualElement.TryGetBinding(BindingId, out Binding)
VisualElement.TryGetDataSourceContext(BindingId, out DataSourceContext)
VisualElement.TryGetLastBindingToUIResult(in BindingId, out BindingResult)
VisualElement.TryGetLastBindingToSourceResult(in BindingId, out BindingResult)
VisualElement.GetFirstOfType<T>()
VisualElement.GetFirstAncestorOfType<T>()
VisualElement.canGrabFocus
VisualElement.focusController
VisualElement.cacheAsBitmap
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallbackOnce<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.RegisterCallbackOnce<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, CallbackOptions)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, CallbackOptions)
CallbackEventHandler.NotifyPropertyChanged(in BindingId)
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
[UxmlElement]
public class ChoiceListItem : Radio, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IContextOverrideElement, IAdditionalDataHolder, IValidatableElement<bool>, INotifyValueChanged<bool>, IPressable
Remarks
ChoiceListItem derives from Radio. Everything about being a radio — the key, value, group registration, the clickable manipulator and keyboard focus — is inherited unchanged. The item only adds the letter badge and styles the row as a full-width pressable surface with the radio circle hidden.
Constructors
ChoiceListItem()
Default constructor.
Declaration
public ChoiceListItem()
Fields
badgeUssClassName
The ChoiceListItem letter badge styling class.
Declaration
public const string badgeUssClassName = "appui-choicelistitem__badge"
Field Value
| Type | Description |
|---|---|
| string |
ussClassName
The ChoiceListItem main styling class.
Declaration
public const string ussClassName = "appui-choicelistitem"
Field Value
| Type | Description |
|---|---|
| string |
Properties
letter
The letter badge shown at the start of the row.
Declaration
[CreateProperty]
[UxmlAttribute]
public string letter { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
Left unset, the parent ChoiceList assigns it automatically from the item's position (A, B, C…). Setting it pins the badge and takes the item out of the automatic sequence. Set it to an empty string to hide the badge.