docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ThreadMessage

    ThreadMessage UI element. Displays a single message within a thread.

    Inheritance
    object
    CallbackEventHandler
    Focusable
    VisualElement
    BaseVisualElement
    ThreadMessage
    Implements
    IEventHandler
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IResolvedStyle
    IContextOverrideElement
    IAdditionalDataHolder
    Inherited Members
    BaseVisualElement.contextPrefix
    BaseVisualElement.scaleOverride
    BaseVisualElement.themeOverride
    BaseVisualElement.langOverride
    BaseVisualElement.layoutDirectionOverride
    BaseVisualElement.preferredTooltipPlacementOverride
    BaseVisualElement.tooltipDelayMsOverride
    BaseVisualElement.GetLayoutDirectionUssClassName(Dir)
    VisualElement.disabledUssClassName
    VisualElement.ExecuteDefaultAction(EventBase)
    VisualElement.Focus()
    VisualElement.SendEvent(EventBase)
    VisualElement.SetEnabledFromHierarchy(bool)
    VisualElement.SetEnabled(bool)
    VisualElement.MarkDirtyRepaint()
    VisualElement.ContainsPoint(Vector2)
    VisualElement.Overlaps(Rect)
    VisualElement.DoMeasure(float, VisualElement.MeasureMode, float, VisualElement.MeasureMode)
    VisualElement.ToString()
    VisualElement.GetClasses()
    VisualElement.ClearClassList()
    VisualElement.AddToClassList(string)
    VisualElement.RemoveFromClassList(string)
    VisualElement.ToggleInClassList(string)
    VisualElement.EnableInClassList(string, bool)
    VisualElement.ClassListContains(string)
    VisualElement.FindAncestorUserData()
    VisualElement.Add(VisualElement)
    VisualElement.Insert(int, VisualElement)
    VisualElement.Remove(VisualElement)
    VisualElement.RemoveAt(int)
    VisualElement.Clear()
    VisualElement.ElementAt(int)
    VisualElement.IndexOf(VisualElement)
    VisualElement.Children()
    VisualElement.Sort(Comparison<VisualElement>)
    VisualElement.BringToFront()
    VisualElement.SendToBack()
    VisualElement.PlaceBehind(VisualElement)
    VisualElement.PlaceInFront(VisualElement)
    VisualElement.RemoveFromHierarchy()
    VisualElement.GetFirstOfType<T>()
    VisualElement.GetFirstAncestorOfType<T>()
    VisualElement.Contains(VisualElement)
    VisualElement.FindCommonAncestor(VisualElement)
    VisualElement.viewDataKey
    VisualElement.userData
    VisualElement.canGrabFocus
    VisualElement.focusController
    VisualElement.usageHints
    VisualElement.transform
    VisualElement.layout
    VisualElement.contentRect
    VisualElement.paddingRect
    VisualElement.worldBound
    VisualElement.localBound
    VisualElement.worldTransform
    VisualElement.pickingMode
    VisualElement.name
    VisualElement.enabledInHierarchy
    VisualElement.enabledSelf
    VisualElement.visible
    VisualElement.generateVisualContent
    VisualElement.experimental
    VisualElement.hierarchy
    VisualElement.cacheAsBitmap
    VisualElement.parent
    VisualElement.panel
    VisualElement.visualTreeAssetSource
    VisualElement.this[int]
    VisualElement.childCount
    VisualElement.schedule
    VisualElement.style
    VisualElement.customStyle
    VisualElement.styleSheets
    VisualElement.tooltip
    VisualElement.resolvedStyle
    Focusable.Blur()
    Focusable.focusable
    Focusable.tabIndex
    Focusable.delegatesFocus
    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)
    CallbackEventHandler.HandleEvent(EventBase)
    CallbackEventHandler.HasTrickleDownHandlers()
    CallbackEventHandler.HasBubbleUpHandlers()
    CallbackEventHandler.ExecuteDefaultActionAtTarget(EventBase)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public class ThreadMessage : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder

    Constructors

    ThreadMessage()

    Default constructor.

    Declaration
    public ThreadMessage()

    Fields

    actionButtonUssClassName

    The ThreadMessage action Button styling class.

    Declaration
    public const string actionButtonUssClassName = "appui-thread-message__action-button"
    Field Value
    Type Description
    string

    actionsOpenUssClassName

    The ThreadMessage actions-open modifier styling class.

    Declaration
    public const string actionsOpenUssClassName = "appui-thread-message--actions-open"
    Field Value
    Type Description
    string

    actionsUssClassName

    The ThreadMessage actions styling class.

    Declaration
    public const string actionsUssClassName = "appui-thread-message__actions"
    Field Value
    Type Description
    string

    attachmentsUssClassName

    The ThreadMessage attachments styling class.

    Declaration
    public const string attachmentsUssClassName = "appui-thread-message__attachments"
    Field Value
    Type Description
    string

    authorNameUssClassName

    The ThreadMessage author name styling class.

    Declaration
    public const string authorNameUssClassName = "appui-thread-message__author-name"
    Field Value
    Type Description
    string

    avatarUssClassName

    The ThreadMessage avatar styling class.

    Declaration
    public const string avatarUssClassName = "appui-thread-message__avatar"
    Field Value
    Type Description
    string

    bodyUssClassName

    The ThreadMessage body styling class.

    Declaration
    public const string bodyUssClassName = "appui-thread-message__body"
    Field Value
    Type Description
    string

    contentContainerUssClassName

    The ThreadMessage content container styling class.

    Declaration
    public const string contentContainerUssClassName = "appui-thread-message__content-container"
    Field Value
    Type Description
    string

    contentUssClassName

    The ThreadMessage content styling class.

    Declaration
    public const string contentUssClassName = "appui-thread-message__content"
    Field Value
    Type Description
    string

    dislikeBtnUssClassName

    The ThreadMessage dislike button styling class.

    Declaration
    public const string dislikeBtnUssClassName = "appui-thread-message__dislike-btn"
    Field Value
    Type Description
    string

    footerUssClassName

    The ThreadMessage footer styling class.

    Declaration
    public const string footerUssClassName = "appui-thread-message__footer"
    Field Value
    Type Description
    string

    headerUssClassName

    The ThreadMessage header styling class.

    Declaration
    public const string headerUssClassName = "appui-thread-message__header"
    Field Value
    Type Description
    string

    likeBtnUssClassName

    The ThreadMessage like button styling class.

    Declaration
    public const string likeBtnUssClassName = "appui-thread-message__like-btn"
    Field Value
    Type Description
    string

    metaUssClassName

    The ThreadMessage meta styling class.

    Declaration
    public const string metaUssClassName = "appui-thread-message__meta"
    Field Value
    Type Description
    string

    reactionsUssClassName

    The ThreadMessage reactions styling class.

    Declaration
    public const string reactionsUssClassName = "appui-thread-message__reactions"
    Field Value
    Type Description
    string

    stateUssClassName

    The ThreadMessage state modifier styling class.

    Declaration
    public const string stateUssClassName = "appui-thread-message--"
    Field Value
    Type Description
    string

    timestampUssClassName

    The ThreadMessage timestamp styling class.

    Declaration
    public const string timestampUssClassName = "appui-thread-message__timestamp"
    Field Value
    Type Description
    string

    ussClassName

    The ThreadMessage main styling class.

    Declaration
    public const string ussClassName = "appui-thread-message"
    Field Value
    Type Description
    string

    Properties

    attachments

    The attachments container. Add attachment elements to this container to have them displayed in the message attachments area.

    Declaration
    public VisualElement attachments { get; }
    Property Value
    Type Description
    VisualElement

    authorAvatar

    The avatar background image for the message author.

    Declaration
    public Background authorAvatar { get; set; }
    Property Value
    Type Description
    Background

    authorAvatarColor

    The background color of the avatar.

    Declaration
    public Optional<Color> authorAvatarColor { get; set; }
    Property Value
    Type Description
    Optional<Color>

    authorInitials

    The initials text displayed inside the avatar when no image is set.

    Declaration
    public string authorInitials { get; set; }
    Property Value
    Type Description
    string

    authorName

    The author name displayed in the message header.

    Declaration
    public string authorName { get; set; }
    Property Value
    Type Description
    string

    contentContainer

    The container for the message. Use this to add a composer in draft mode.

    Declaration
    public override VisualElement contentContainer { get; }
    Property Value
    Type Description
    VisualElement
    Overrides
    VisualElement.contentContainer

    dislikeCount

    The number of dislikes displayed on the dislike button.

    Declaration
    public int dislikeCount { get; set; }
    Property Value
    Type Description
    int

    isDisliked

    Whether the dislike button is in a selected (highlighted) state.

    Declaration
    public bool isDisliked { get; set; }
    Property Value
    Type Description
    bool

    isLiked

    Whether the like button is in a selected (highlighted) state.

    Declaration
    public bool isLiked { get; set; }
    Property Value
    Type Description
    bool

    likeCount

    The number of likes displayed on the like button.

    Declaration
    public int likeCount { get; set; }
    Property Value
    Type Description
    int

    makeActionMenuItems

    Callback to populate the action menu when the action button is clicked. When set, the action button is visible; when null, it is hidden.

    Declaration
    public Action<ThreadMessage, MenuBuilder> makeActionMenuItems { get; set; }
    Property Value
    Type Description
    Action<ThreadMessage, MenuBuilder>

    message

    The rich text content of the message body.

    Declaration
    public string message { get; set; }
    Property Value
    Type Description
    string

    reactions

    The list of reactions to display on the message.

    Declaration
    public IList<ReactionInfo> reactions { get; set; }
    Property Value
    Type Description
    IList<ReactionInfo>

    state

    The state of the message. Adds a modifier class using the -- pattern.

    Declaration
    public ThreadMessageState state { get; set; }
    Property Value
    Type Description
    ThreadMessageState

    timestamp

    The timestamp text displayed in the message header.

    Declaration
    public string timestamp { get; set; }
    Property Value
    Type Description
    string

    timestampTooltip

    The tooltip displayed on the timestamp element.

    Declaration
    public string timestampTooltip { get; set; }
    Property Value
    Type Description
    string

    Methods

    GetStateUssClassName(ThreadMessageState)

    Declaration
    public static string GetStateUssClassName(ThreadMessageState enumValue)
    Parameters
    Type Name Description
    ThreadMessageState enumValue
    Returns
    Type Description
    string

    Events

    dislikeToggled

    Event invoked when the dislike button is toggled.

    Declaration
    public event Action<bool> dislikeToggled
    Event Type
    Type Description
    Action<bool>

    likeToggled

    Event invoked when the like button is toggled.

    Declaration
    public event Action<bool> likeToggled
    Event Type
    Type Description
    Action<bool>

    reactionToggled

    Event invoked when a reaction is toggled.

    Declaration
    public event Action<string, bool> reactionToggled
    Event Type
    Type Description
    Action<string, bool>

    Implements

    IEventHandler
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IResolvedStyle
    IContextOverrideElement
    IAdditionalDataHolder

    Extension Methods

    VisualElementExtensions.FindNavController(VisualElement)
    RegisterUpdateCallbackExtensions.RegisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)
    RegisterUpdateCallbackExtensions.UnregisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)
    VisualElementExtensions.EnableDynamicTransform(VisualElement, bool)
    VisualElementExtensions.EnablePicking(VisualElement, bool)
    VisualElementExtensions.GetChildren<T>(VisualElement, bool)
    VisualElementExtensions.GetContextProvider<T>(VisualElement)
    VisualElementExtensions.GetContextProvider<T>(VisualElement, string)
    VisualElementExtensions.GetContext<T>(VisualElement)
    VisualElementExtensions.GetContext<T>(VisualElement, string)
    VisualElementExtensions.GetExclusiveRootElement(VisualElement)
    VisualElementExtensions.GetLastAncestorOfType<T>(VisualElement)
    VisualElementExtensions.GetPreferredTooltipPlacement(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement, string)
    VisualElementExtensions.GetTooltipContent(VisualElement)
    VisualElementExtensions.GetTooltipTemplate(VisualElement)
    VisualElementExtensions.HasAncestorOfType<T>(VisualElement, bool)
    VisualElementExtensions.HasAncestorsOfType<T>(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement, string)
    VisualElementExtensions.IsInvisible(VisualElement)
    VisualElementExtensions.IsOnScreen(VisualElement)
    VisualElementExtensions.ProvideContext<T>(VisualElement, string, T)
    VisualElementExtensions.ProvideContext<T>(VisualElement, T)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, string, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.SetPreferredTooltipPlacement(VisualElement, OptionalEnum<PopoverPlacement>)
    VisualElementExtensions.SetTooltipContent(VisualElement, VisualElementExtensions.TooltipContentCallback)
    VisualElementExtensions.SetTooltipTemplate(VisualElement, VisualElement)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, string, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)