Class ThreadReaction
ThreadReaction UI element. Displays an emoji reaction with a count.
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 ThreadReaction : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder, IPressable
Constructors
ThreadReaction()
Default constructor.
Declaration
public ThreadReaction()
ThreadReaction(Action)
Construct a ThreadReaction with a given click event callback.
Declaration
public ThreadReaction(Action clickEvent)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | clickEvent | The given click event callback. |
Fields
countUssClassName
The ThreadReaction count styling class.
Declaration
public const string countUssClassName = "appui-thread-reaction__count"
Field Value
| Type | Description |
|---|---|
| string |
emojiUssClassName
The ThreadReaction emoji styling class.
Declaration
public const string emojiUssClassName = "appui-thread-reaction__emoji"
Field Value
| Type | Description |
|---|---|
| string |
ussClassName
The ThreadReaction main styling class.
Declaration
public const string ussClassName = "appui-thread-reaction"
Field Value
| Type | Description |
|---|---|
| string |
Properties
clickable
Clickable Manipulator for this ThreadReaction.
Declaration
public Pressable clickable { get; set; }
Property Value
| Type | Description |
|---|---|
| Pressable |
contentContainer
The content container of the ThreadReaction.
Declaration
public override VisualElement contentContainer { get; }
Property Value
| Type | Description |
|---|---|
| VisualElement |
Overrides
count
The reaction count.
Declaration
[Tooltip("The reaction count.")]
public int count { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
emoji
The emoji string to display.
Declaration
[Tooltip("The emoji string to display.")]
public string emoji { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
isOwnReaction
Whether this reaction belongs to the current user.
Declaration
[Tooltip("Whether this reaction belongs to the current user.")]
public bool isOwnReaction { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Events
clicked
The ThreadReaction click event.
Declaration
public event Action clicked
Event Type
| Type | Description |
|---|---|
| Action |