Class Badge
Badge UI element.
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 Badge : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement
Constructors
Badge()
Default constructor.
Declaration
public Badge()
Fields
badgeUssClassName
The Badge badge styling class.
Declaration
public static readonly string badgeUssClassName
Field Value
Type | Description |
---|---|
string |
horizontalAnchorUssClassName
The Badge horizontal anchor styling class prefix.
Declaration
public static readonly string horizontalAnchorUssClassName
Field Value
Type | Description |
---|---|
string |
labelUssClassName
The Badge label styling class.
Declaration
public static readonly string labelUssClassName
Field Value
Type | Description |
---|---|
string |
overlapUssClassName
The Badge overlap type styling class prefix.
Declaration
public static readonly string overlapUssClassName
Field Value
Type | Description |
---|---|
string |
ussClassName
The Badge main styling class.
Declaration
public static readonly string ussClassName
Field Value
Type | Description |
---|---|
string |
variantClassName
The Badge variant styling class prefix.
Declaration
public static readonly string variantClassName
Field Value
Type | Description |
---|---|
string |
verticalAnchorUssClassName
The Badge vertical anchor styling class prefix.
Declaration
public static readonly string verticalAnchorUssClassName
Field Value
Type | Description |
---|---|
string |
zeroUssClassName
The Badge Zero content styling class.
Declaration
public static readonly string zeroUssClassName
Field Value
Type | Description |
---|---|
string |
Properties
backgroundColor
The background color of the Badge.
Declaration
public Optional<Color> backgroundColor { get; set; }
Property Value
Type | Description |
---|---|
Optional<Color> |
color
The content color of the Badge.
Declaration
public Optional<Color> color { get; set; }
Property Value
Type | Description |
---|---|
Optional<Color> |
content
The text of the Badge.
Declaration
public int content { get; set; }
Property Value
Type | Description |
---|---|
int |
contentContainer
The content container of the Badge.
Declaration
public override VisualElement contentContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
Overrides
horizontalAnchor
The horizontal anchor of the Badge.
Declaration
public HorizontalAnchor horizontalAnchor { get; set; }
Property Value
Type | Description |
---|---|
HorizontalAnchor |
max
The maximum value of the Badge.
Declaration
public int max { get; set; }
Property Value
Type | Description |
---|---|
int |
overlapType
The overlap type of the Badge.
Declaration
public BadgeOverlapType overlapType { get; set; }
Property Value
Type | Description |
---|---|
BadgeOverlapType |
showZero
Whether the Badge should show zero values.
Declaration
public bool showZero { get; set; }
Property Value
Type | Description |
---|---|
bool |
variant
The variant of the Badge.
Declaration
public BadgeVariant variant { get; set; }
Property Value
Type | Description |
---|---|
BadgeVariant |
verticalAnchor
The vertical anchor of the Badge.
Declaration
public VerticalAnchor verticalAnchor { get; set; }
Property Value
Type | Description |
---|---|
VerticalAnchor |