Class ToastItem
Represents a toast instance used by hosts to render a notification.
This model is created from ToastOptions and exposes
read-only properties used by the control template.
Inheritance
System.Object
ToastItem
Implements
System.IDisposable
Assembly: Syncfusion.SfToastNotification.WPF.dll
Syntax
public class ToastItem : ContentControl, IDisposable
Fields
AccentBrushProperty
Declaration
public static readonly DependencyProperty AccentBrushProperty
Field Value
| Type |
| System.Windows.DependencyProperty |
ActionTemplateSelectorProperty
Declaration
public static readonly DependencyProperty ActionTemplateSelectorProperty
Field Value
| Type |
| System.Windows.DependencyProperty |
Declaration
public static readonly DependencyProperty CloseButtonTemplateProperty
Field Value
| Type |
| System.Windows.DependencyProperty |
SeverityProperty
Identifies the Severity dependency property.
Declaration
public static readonly DependencyProperty SeverityProperty
Field Value
| Type |
| System.Windows.DependencyProperty |
TitleTemplateProperty
Declaration
public static readonly DependencyProperty TitleTemplateProperty
Field Value
| Type |
| System.Windows.DependencyProperty |
VariantProperty
Identifies the Variant dependency property.
Declaration
public static readonly DependencyProperty VariantProperty
Field Value
| Type |
| System.Windows.DependencyProperty |
Properties
AccentBrush
Gets or sets the accent brush used to tint visual elements for this toast (icons, borders, and highlights).
Not applied when Severity is None. Applies to in-app toasts only; not used for native toasts.
Declaration
public SolidColorBrush AccentBrush { get; set; }
Property Value
| Type |
| System.Windows.Media.SolidColorBrush |
Actions
Gets the collection of actions rendered for this toast.
Declaration
public IReadOnlyList<ToastAction> Actions { get; }
Property Value
| Type |
| System.Collections.Generic.IReadOnlyList<ToastAction> |
ActionTemplateSelector
Gets or sets the System.Windows.Controls.DataTemplateSelector used to choose templates for action buttons.
Allows per-action template selection. Applies to in-app toasts only; not used for native toasts.
Declaration
public DataTemplateSelector ActionTemplateSelector { get; set; }
Property Value
| Type |
| System.Windows.Controls.DataTemplateSelector |
Gets or sets the template used to render the close button.
Applies to in-app toasts only; not used for native toasts.
Declaration
public DataTemplate CloseButtonTemplate { get; set; }
Property Value
| Type |
| System.Windows.DataTemplate |
Gets the header text shown above or beside the message.
Applies to in-app toasts only; not used for native toasts.
Declaration
public string Header { get; }
Property Value
Message
Gets the main message body of the toast.
Declaration
public string Message { get; }
Property Value
Mode
Gets the display mode used for this toast.
Declaration
public ToastMode Mode { get; }
Property Value
Severity
Gets or sets the severity for the toast.
Applies to in-app toasts only; not used for native toasts. Use the matching SeverityProperty for binding.
Declaration
public ToastSeverity Severity { get; set; }
Property Value
Gets a value indicating whether the action buttons row should be displayed.
Applies to in-app toasts only; not used for native toasts.
Declaration
public bool ShowActionButtons { get; }
Property Value
Gets a value indicating whether the close button should be displayed.
Applies to in-app toasts only; not used for native toasts.
Declaration
public bool ShowCloseButton { get; }
Property Value
Title
Gets the title text for the toast.
Declaration
public string Title { get; }
Property Value
TitleTemplate
Gets or sets the template used to render the title area of the toast.
Applies to in-app toasts only; not used for native toasts.
Declaration
public DataTemplate TitleTemplate { get; set; }
Property Value
| Type |
| System.Windows.DataTemplate |
ToastSound
Specifies the sound to be played for a toast notification.
Declaration
public ToastSound ToastSound { get; set; }
Property Value
ToastSoundPath
Declaration
public Uri ToastSoundPath { get; set; }
Property Value
Variant
Gets or sets the visual variant of the toast (Text, Outlined, Filled).
Applies to in-app toasts only; not used for native toasts. Use the matching VariantProperty for binding.
Declaration
public ToastVariant Variant { get; set; }
Property Value
Methods
Dispose()
Declaration
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type |
Name |
Description |
| System.Boolean |
disposing |
|
Implements
System.IDisposable