Class ToastOptions
Represents configuration options for displaying a toast notification. Serves as both the input options and the rendered toast model; there is no separate toast item type fully describes the toast).
Inheritance
Implements
Namespace: Syncfusion.WinForms.AIAssistView
Assembly: Syncfusion.SfAIAssistView.WinForms.dll
Syntax
public class ToastOptions : Object, INotifyPropertyChanged
Constructors
ToastOptions()
Initializes a new instance of the ToastOptions class.
Declaration
public ToastOptions()
Properties
AutoClose
Gets or sets a value indicating whether the toast auto-dismisses after Duration.
Set to false to keep the toast visible until manually dismissed. Default is true.
Declaration
public bool AutoClose { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Duration
Gets or sets the duration after which the toast notification auto-dismisses.
Defaults to 3 seconds. Set AutoClose to false to keep
the toast visible until manually dismissed.
Declaration
public TimeSpan Duration { get; set; }
Property Value
| Type |
|---|
| System.TimeSpan |
ErrorColor
Gets or sets a custom background color for Error toast notifications.
Declaration
public Color ErrorColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
Icon
Gets or sets the icon image displayed alongside the toast notification message.
Declaration
public Image Icon { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Image |
Message
Gets or sets the message text for the toast notification.
Declaration
public string Message { get; set; }
Property Value
| Type |
|---|
| System.String |
Severity
Gets or sets the severity or status level of the toast notification.
Declaration
public ToastSeverity Severity { get; set; }
Property Value
| Type |
|---|
| ToastSeverity |
SuccessColor
Gets or sets a custom background color for Success toast notifications.
Declaration
public Color SuccessColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
TextColor
Gets or sets a custom foreground color for toast notification text.
Declaration
public Color TextColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
WarningColor
Gets or sets a custom background color for Warning toast notifications.
Declaration
public Color WarningColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
Events
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
| Type |
|---|
| System.ComponentModel.PropertyChangedEventHandler |