Class RadToastNotificationManager
Toast Notification Manager.
Inheritance
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.RadToastNotification.dll
Syntax
public class RadToastNotificationManager : Component
Constructors
RadToastNotificationManager()
Default constructor.
Declaration
public RadToastNotificationManager()
RadToastNotificationManager(IContainer)
Creates and initializes a new instance of the RadToastNotificationManager.
Declaration
public RadToastNotificationManager(IContainer container)
Parameters
System.ComponentModel.IContainer
container
|
Properties
ToastNotifications
A collection with initialized toast notifications.
Declaration
public RadToastNotificationCollection ToastNotifications { get; set; }
Property Value
RadToastNotificationCollection
|
Methods
AddScheduledNotification(RadToastNotification)
Schedules a given toast notification. You need to set DeliveryTime. If you want to be able to remove the scheduled toast, you must set unique Tag and use it in RemoveScheduledNotification(String) afterwards.
Declaration
public void AddScheduledNotification(RadToastNotification radToastNotification)
Parameters
RadToastNotification
radToastNotification
The RadToastNotification that will be scheduled. |
Dispose(Boolean)
Clean up any resources being used.
Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean
disposing
true if managed resources should be disposed; otherwise, false. |
HideNotification()
Hides the currently shown toast notification.
Declaration
public void HideNotification()
OnRadToastActivated(String, Dictionary<String, String>, String)
Fires RadToastActivated, when the internal activator is used.
Declaration
[Obsolete("This method is deprecated. Activator is no longer needed. We suggest using the new RadToastOnActivated event instead.")]
public static void OnRadToastActivated(string arguments, Dictionary<string, string> userInput, string appUserModelId)
Parameters
System.String
arguments
|
System.Collections.Generic.Dictionary<System.String, System.String>
userInput
|
System.String
appUserModelId
|
Register()
Registers the application using the current process filename, a default Telerik shortcut name, default AUMID and internal activator. When the internal activator is activated, it fires RadToastActivated.
Declaration
[Obsolete("This method is deprecated. Registration is no longer needed.")]
public void Register()
Register(String, String, String)
Registers the application using an internal activator. When the internal activator is activated, it fires RadToastActivated.
Declaration
[Obsolete("This method is deprecated. Registration is no longer needed.")]
public void Register(string exePath, string shortcutName, string aumid)
Parameters
System.String
exePath
The path of the executable |
System.String
shortcutName
A name of the shortcut that will be placed in start menu. |
System.String
aumid
Unique id of the application - recommended string - name + GUID. |
Register<T>()
Registers the application using the current process filename, a default Telerik shortcut name and default AUMID.
Declaration
[Obsolete("This method is deprecated. Registration is no longer needed.")]
public void Register<T>()
where T : RadToastNotificationActivatorBase, new()
Type Parameters
T
An activator that receives notification activations. Must inherit RadToastNotificationActivatorBase. |
Register<T>(String, String, String)
Registers the application using the manager, so the activator can receive notification activation.
Declaration
[Obsolete("This method is deprecated. Registration is no longer needed.")]
public void Register<T>(string exePath, string shortcutName, string aumid)
where T : RadToastNotificationActivatorBase, new()
Parameters
System.String
exePath
The path of the executable |
System.String
shortcutName
A name of the shortcut that will be placed in start menu. |
System.String
aumid
Unique id of the application - recommended string - name + GUID. |
Type Parameters
T
An activator that receives notification activations. Must inherit RadToastNotificationActivatorBase. |
RemoveScheduledNotification(String)
Removes an already scheduled notification. In order to remove a scheduled notification, you must specify unique Tag that will be used to find the scheduled notification.
Declaration
public void RemoveScheduledNotification(string tag)
Parameters
System.String
tag
The unique Tag that will identify the notification. |
ShowNotification(Int32)
Shows a notification from ToastNotifications collection using its index.
Declaration
public void ShowNotification(int index)
Parameters
System.Int32
index
The index of the notification. |
ShowNotification(String)
Shows a notification from ToastNotifications collection using its name.
Declaration
public void ShowNotification(string name)
Parameters
System.String
name
The name of the notification. |
ShowNotification(RadToastNotification)
Shows a given toast notification.
Declaration
public void ShowNotification(RadToastNotification radToastNotification)
Parameters
RadToastNotification
radToastNotification
The RadToastNotification that will be shown. |
Unregister()
Cleans up resources used by the Toast Notification Manager. Keep in mind that calling this will clear notifications in the action area as well. You can call this, when the program exits or on uninstalling the program, but it must be called from the exe that was showing the toast notifications.
Declaration
public void Unregister()
Unregister(String, String)
Unregister a registered manager.
Declaration
[Obsolete("This method is deprecated. We suggest using only Unregister().")]
public void Unregister(string shortcutName, string aumid)
Parameters
System.String
shortcutName
A name of the shortcut that will be removed. |
System.String
aumid
Unique id of the application. |
Unregister<T>()
Unregister a registered manager.
Declaration
[Obsolete("This method is deprecated. We suggest using only Unregister().")]
public void Unregister<T>()
where T : RadToastNotificationActivatorBase, new()
Type Parameters
T
|
Unregister<T>(String, String)
Unregister a registered manager.
Declaration
[Obsolete("This method is deprecated. We suggest using only Unregister().")]
public void Unregister<T>(string shortcutName, string aumid)
where T : RadToastNotificationActivatorBase, new()
Parameters
System.String
shortcutName
A name of the shortcut that will be removed. |
System.String
aumid
Unique id of the application. |
Type Parameters
T
|
UpdateNotification(String, IDictionary<String, String>)
Updates a given notification based on its unique tag with bindingData.
Declaration
public void UpdateNotification(string tag, IDictionary<string, string> bindingData)
Parameters
System.String
tag
Unique Tag. |
System.Collections.Generic.IDictionary<System.String, System.String>
bindingData
Key value pairs that will update BindingData. The key is the binding parameter and the value is a string that will update the current value. |
Events
RadToastActivated
If the manager is registered with the internal activator, this event will fire, when a toast activates.
Declaration
[Obsolete("This event is deprecated. We suggest using the new RadToastOnActivated event instead.")]
public static event RadToastActivatedEventHandler RadToastActivated
Event Type
RadToastActivatedEventHandler
|
RadToastOnActivated
Fire the event when a toast activates.
Declaration
public static event RadToastOnActivatedEventHandler RadToastOnActivated
Event Type
RadToastOnActivatedEventHandler
|