Class
RadToastNotificationManager

Manages toast notifications creation, display, scheduling, and dismissal for Windows desktop applications.

Definition

Constructors

RadToastNotificationManager()

Initializes a new instance of the RadToastNotificationManager class.

Declaration

cs-api-definition
public RadToastNotificationManager()

RadToastNotificationManager(IContainer)

Initializes a new instance of the RadToastNotificationManager class with the specified container.

Declaration

cs-api-definition
public RadToastNotificationManager(IContainer container)

Parameters

container

IContainer

The container to add the component to.

Properties

ToastNotifications

Gets or sets a collection of initialized toast notifications that can be shown by the manager.

Declaration

cs-api-definition
[Browsable(true)]
[TypeConverter(typeof(CollectionConverter))]
public RadToastNotificationCollection ToastNotifications { get; set; }

Property Value

RadToastNotificationCollection

Methods

AddScheduledNotification(RadToastNotification)

Schedules a toast notification to be displayed at a future time specified by DeliveryTime. To enable later removal of the scheduled notification, assign a unique Tag which can be used with RemoveScheduledNotification(string).

Declaration

cs-api-definition
public void AddScheduledNotification(RadToastNotification radToastNotification)

Parameters

radToastNotification

RadToastNotification

The RadToastNotification that will be scheduled for future display.

Dispose(bool)

Clean up any resources being used.

Declaration

cs-api-definition
protected override void Dispose(bool disposing)

Parameters

disposing

bool

true if managed resources should be disposed; otherwise, false.

Overrides Component.Dispose(bool)

HideNotification()

Hides the most recently displayed toast notification that is currently visible.

Declaration

cs-api-definition
public void HideNotification()

RemoveScheduledNotification(string)

Removes a previously scheduled notification that has not yet been displayed. The notification is identified by the unique Tag assigned when it was scheduled.

Declaration

cs-api-definition
public void RemoveScheduledNotification(string tag)

Parameters

tag

string

The unique tag that identifies the scheduled notification to remove.

ShowNotification(RadToastNotification)

Shows a given toast notification immediately.

Declaration

cs-api-definition
public void ShowNotification(RadToastNotification radToastNotification)

Parameters

radToastNotification

RadToastNotification

The RadToastNotification instance that will be displayed.

ShowNotification(int)

Shows a notification from the ToastNotifications collection using its index.

Declaration

cs-api-definition
public void ShowNotification(int index)

Parameters

index

int

The zero-based index of the notification to display.

ShowNotification(string)

Shows a notification from the ToastNotifications collection using its name.

Declaration

cs-api-definition
public void ShowNotification(string name)

Parameters

name

string

The unique name of the notification to display.

Unregister()

Cleans up resources used by the Toast Notification Manager and removes all displayed notifications. Calling this will clear notifications in the action center as well. Call this when the program exits or during uninstallation. Must be called from the same executable that displayed the toast notifications.

Declaration

cs-api-definition
public void Unregister()

UpdateNotification(string, IDictionary<string, string>)

Updates a displayed notification based on its unique tag with new binding data.

Declaration

cs-api-definition
public void UpdateNotification(string tag, IDictionary<string, string> bindingData)

Parameters

tag

string

The unique Tag that identifies the notification to update.

bindingData

IDictionary<string, string>

Key-value pairs that will update the notification's content. The key is the binding parameter name and the value is the new content to display.

Events

RadToastOnActivated

Occurs when a user interacts with a toast notification by clicking on it or its action buttons.

Declaration

cs-api-definition
public static event RadToastOnActivatedEventHandler RadToastOnActivated

Event Value

RadToastOnActivatedEventHandler