Class Checkbox
Checkbox UI element.
Implements
INotifyValueChanged<CheckboxState>
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: Unity.AppUI.dll
Syntax
public class Checkbox : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder, IInputElement<CheckboxState>, IValidatableElement<CheckboxState>, INotifyValueChanged<CheckboxState>, IPressable
Constructors
Checkbox()
Default constructor.
Declaration
public Checkbox()
Fields
boxUssClassName
The Checkbox box styling class.
Declaration
public const string boxUssClassName = "appui-checkbox__box"
Field Value
Type | Description |
---|---|
string |
checkmarkUssClassName
The Checkbox checkmark styling class.
Declaration
public const string checkmarkUssClassName = "appui-checkbox__checkmark"
Field Value
Type | Description |
---|---|
string |
emphasizedUssClassName
The Checkbox emphasized mode styling class.
Declaration
public const string emphasizedUssClassName = "appui-checkbox--emphasized"
Field Value
Type | Description |
---|---|
string |
labelUssClassName
The Checkbox label styling class.
Declaration
public const string labelUssClassName = "appui-checkbox__label"
Field Value
Type | Description |
---|---|
string |
partialCheckmarkUssClassName
The Checkbox partial checkmark styling class.
Declaration
public const string partialCheckmarkUssClassName = "appui-checkbox__partialcheckmark"
Field Value
Type | Description |
---|---|
string |
sizeUssClassName
The Checkbox size styling class.
Declaration
public const string sizeUssClassName = "appui-checkbox--size-"
Field Value
Type | Description |
---|---|
string |
ussClassName
The Checkbox main styling class.
Declaration
public const string ussClassName = "appui-checkbox"
Field Value
Type | Description |
---|---|
string |
Properties
clickable
Clickable Manipulator for this Checkbox.
Declaration
public Pressable clickable { get; set; }
Property Value
Type | Description |
---|---|
Pressable |
emphasized
The Checkbox emphasized mode.
Declaration
public bool emphasized { get; set; }
Property Value
Type | Description |
---|---|
bool |
invalid
The Checkbox invalid state.
Declaration
public bool invalid { get; set; }
Property Value
Type | Description |
---|---|
bool |
label
The text displayed in the Checkbox label.
Declaration
public string label { get; set; }
Property Value
Type | Description |
---|---|
string |
validateValue
The Checkbox validation function.
Declaration
public Func<CheckboxState, bool> validateValue { get; set; }
Property Value
Type | Description |
---|---|
Func<CheckboxState, bool> |
value
The Checkbox value.
Declaration
public CheckboxState value { get; set; }
Property Value
Type | Description |
---|---|
CheckboxState |
Methods
SetValueWithoutNotify(CheckboxState)
Set the Checkbox value without notifying the change.
Declaration
public void SetValueWithoutNotify(CheckboxState newValue)
Parameters
Type | Name | Description |
---|---|---|
CheckboxState | newValue | The new Checkbox value. |
Implements
UnityEngine.UIElements.INotifyValueChanged<T>