Class ToastEntry
One entry in the ToastManager stack.
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public sealed class ToastEntry
Remarks
An entry is a handle, not a view. It is returned by Add(string, NotificationStyle, string) so the caller can update or dismiss the toast later without holding on to a visual element.
Properties
icon
The name of the leading icon, or null for no icon.
Declaration
public string icon { get; }
Property Value
| Type | Description |
|---|---|
| string |
id
The unique identifier of this entry, stable for its whole lifetime.
Declaration
public int id { get; }
Property Value
| Type | Description |
|---|---|
| int |
style
The semantic style of the toast. See NotificationStyle.
Declaration
public NotificationStyle style { get; }
Property Value
| Type | Description |
|---|---|
| NotificationStyle |
text
The message displayed by the toast.
Declaration
public string text { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Dismiss()
Remove this entry from the stack.
Declaration
public void Dismiss()
Update(string, NotificationStyle?, string)
Update this entry in place and refresh every mounted Toaster. The entry keeps its position in the stack, so a long-running task can turn its own toast from "Uploading…" into "Upload complete" without it jumping to the top.
Declaration
public void Update(string text = null, NotificationStyle? style = null, string icon = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The new message. |
| NotificationStyle? | style | The new semantic style. |
| string | icon | The new leading icon name. |