Class Thread
Thread UI element. Main container for a threaded conversation.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class Thread : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder
Constructors
Thread()
Default constructor.
Declaration
public Thread()
Fields
actionsOpenUssClassName
The ThreadMessage actions-open modifier styling class.
Declaration
public const string actionsOpenUssClassName = "appui-thread--actions-open"
Field Value
| Type | Description |
|---|---|
| string |
actionsUssClassName
The Thread actions button styling class.
Declaration
public const string actionsUssClassName = "appui-thread__actions"
Field Value
| Type | Description |
|---|---|
| string |
flexSpacerUssClassName
The Thread flex spacer styling class, applied to the spacer element between participants and resolve button in the header to push the resolve button to the right.
Declaration
public const string flexSpacerUssClassName = "appui-thread__flex-spacer"
Field Value
| Type | Description |
|---|---|
| string |
headerUssClassName
The Thread header styling class.
Declaration
public const string headerUssClassName = "appui-thread__header"
Field Value
| Type | Description |
|---|---|
| string |
participantsUssClassName
The Thread participants styling class.
Declaration
public const string participantsUssClassName = "appui-thread__participants"
Field Value
| Type | Description |
|---|---|
| string |
repliesUssClassName
The Thread replies container styling class.
Declaration
public const string repliesUssClassName = "appui-thread__replies"
Field Value
| Type | Description |
|---|---|
| string |
resolveBtnUssClassName
The Thread resolve button styling class.
Declaration
public const string resolveBtnUssClassName = "appui-thread__resolve-btn"
Field Value
| Type | Description |
|---|---|
| string |
resolvedUssClassName
The Thread resolved modifier styling class.
Declaration
public const string resolvedUssClassName = "appui-thread--resolved"
Field Value
| Type | Description |
|---|---|
| string |
ussClassName
The Thread main styling class.
Declaration
public const string ussClassName = "appui-thread"
Field Value
| Type | Description |
|---|---|
| string |
withRepliesUssClassName
The Thread with replies modifier styling class, applied when there is at least 1 reply to show on the collapse button label.
Declaration
public const string withRepliesUssClassName = "appui-thread--with-replies"
Field Value
| Type | Description |
|---|---|
| string |
Properties
bindParticipant
The bind callback for participant avatars.
Declaration
public Action<Avatar, int> bindParticipant { get; set; }
Property Value
| Type | Description |
|---|---|
| Action<Avatar, int> |
contentContainer
The content container of the Thread does not exist as replies are added directly to the repliesListView.
Declaration
public override VisualElement contentContainer { get; }
Property Value
| Type | Description |
|---|---|
| VisualElement |
Overrides
enableDislikes
Whether dislikes are enabled. Propagated via ThreadContext.
Declaration
[Tooltip("Whether likes/dislikes are enabled.")]
public bool enableDislikes { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
enableLikes
Whether likes are enabled. Propagated via ThreadContext.
Declaration
[Tooltip("Whether likes/dislikes are enabled.")]
public bool enableLikes { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
enableReactions
Whether reactions are enabled. Propagated via ThreadContext.
Declaration
[Tooltip("Whether reactions are enabled.")]
public bool enableReactions { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
enableResolution
Whether the resolve button is visible.
Declaration
[Tooltip("Whether the resolve button is visible.")]
public bool enableResolution { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
isResolved
The resolution state of the thread.
Declaration
[Tooltip("The resolution state of the thread.")]
public bool isResolved { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
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<Thread, MenuBuilder> makeActionMenuItems { get; set; }
Property Value
| Type | Description |
|---|---|
| Action<Thread, MenuBuilder> |
participants
The participants data source for the AvatarGroup.
Declaration
public IList participants { get; set; }
Property Value
| Type | Description |
|---|---|
| IList |
repliesListView
The replies container where reply messages are added. The API mirrors the subset of ListView previously used here so existing callers continue to compile unchanged.
Declaration
public RepliesView repliesListView { get; }
Property Value
| Type | Description |
|---|---|
| RepliesView |
replyCount
The number of replies displayed on the collapse button label.
Declaration
[Tooltip("The number of replies displayed on the collapse button.")]
public int replyCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Events
resolveToggled
Event invoked when the resolve button is toggled.
Declaration
public event Action<bool> resolveToggled
Event Type
| Type | Description |
|---|---|
| Action<bool> |