Class FieldLabel
A label for a field.
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: Unity.AppUI.dll
Syntax
public class FieldLabel : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder
Constructors
FieldLabel()
Default constructor.
Declaration
public FieldLabel()
FieldLabel(string)
Constructor.
Declaration
public FieldLabel(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | The text to display in the label. |
Fields
labelOverflowUssClassName
The FieldLabel label overflow variant styling class.
Declaration
public const string labelOverflowUssClassName = "appui-field-label--label-overflow-"
Field Value
Type | Description |
---|---|
string |
labelUssClassName
The FieldLabel label styling class.
Declaration
public const string labelUssClassName = "appui-field-label__label"
Field Value
Type | Description |
---|---|
string |
requiredLabelUssClassName
The FieldLabel required label styling class.
Declaration
public const string requiredLabelUssClassName = "appui-field-label__required-label"
Field Value
Type | Description |
---|---|
string |
requiredUssClassName
The FieldLabel required variant styling class.
Declaration
public const string requiredUssClassName = "appui-field-label--required"
Field Value
Type | Description |
---|---|
string |
ussClassName
The FieldLabel main styling class.
Declaration
public const string ussClassName = "appui-field-label"
Field Value
Type | Description |
---|---|
string |
variantUssClassName
The FieldLabel variant styling class.
Declaration
public const string variantUssClassName = "appui-field-label--"
Field Value
Type | Description |
---|---|
string |
Properties
indicatorType
The type of indicator to display when a field is required.
Declaration
public IndicatorType indicatorType { get; set; }
Property Value
Type | Description |
---|---|
IndicatorType |
label
The text to display in the label.
Declaration
public string label { get; set; }
Property Value
Type | Description |
---|---|
string |
labelOverflow
The text overflow mode.
Declaration
public TextOverflow labelOverflow { get; set; }
Property Value
Type | Description |
---|---|
TextOverflow |
required
Whether the field is required.
Declaration
public bool required { get; set; }
Property Value
Type | Description |
---|---|
bool |
requiredText
The text to display next to the label when the field is required and the indicator type is Text.
Declaration
public string requiredText { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
GetIndicatorTypeUssClassName(IndicatorType)
Declaration
public static string GetIndicatorTypeUssClassName(IndicatorType enumValue)
Parameters
Type | Name | Description |
---|---|---|
IndicatorType | enumValue |
Returns
Type | Description |
---|---|
string |
GetLabelOverflowUssClassName(TextOverflow)
Declaration
public static string GetLabelOverflowUssClassName(TextOverflow enumValue)
Parameters
Type | Name | Description |
---|---|---|
TextOverflow | enumValue |
Returns
Type | Description |
---|---|
string |