Getting Started
To start using RadToastNotificationManager just drag it from the toolbox and drop it on the form.
Assembly References
You can find listed below the required references for using a RadToastNotificationManager which are automatically added after you drag the RadToastNotificationManager from the toolbox:
Telerik.WinControls.RadToastNotification
Microsoft.Toolkit.Uwp.Notifications * (necessary for using a custom activator)
RadToastNotificationManager requires .NET Framework 4.6.1 or higher.
Toast notifications can only be displayed in Windows 8.0 or higher. For older Windows versions, use RadDesktopAlert instead.
By using the RadToastNotifications Editor you can add different toast notifications to the manager at design time. They are serialized as Telerik toasts which generate Windows system toasts.
Then, if you want to show a toast notification at run time, e.g. when clicking a button, you must register the RadToastNotificationManager first.
Register RadToastNotificationManager and Show a Notification
public ToastNotificationGettingsStarted()
{
InitializeComponent();
this.radToastNotificationManager1.Register();
this.radButton1.Click+=radButton1_Click;
}
private void radButton1_Click(object sender, EventArgs e)
{
this.radToastNotificationManager1.ShowNotification(3);
}
protected override void OnClosed(EventArgs e)
{
base.OnClosed(e);
this.radToastNotificationManager1.Unregister();
}
Public Sub New()
InitializeComponent()
Me.RadToastNotificationManager1.Register()
AddHandler Me.RadButton1.Click, AddressOf radButton1_Click
End Sub
Private Sub radButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Me.RadToastNotificationManager1.ShowNotification(3)
End Sub
Protected Overrides Sub OnClosed(ByVal e As EventArgs)
MyBase.OnClosed(e)
Me.RadToastNotificationManager1.Unregister()
End Sub
The screenshot below is captured under OS Windows 10. The toast notification templates may differ according to the operating system (and OS style theme) that shows them.
As a result, the toast notification is successfully shown when you click the button:
Windows has "Focus Assist' settings where you can choose which notifications you would like to see and hear. The possible options are:
- Off - Get all notifications from your apps and contacts.
- Priority only - See only selected notifications from the priority list. The rest will go straight to the action center.
- Alarms only - Hide all notifications, except alarms.
If a user has Focus Assist set to Alarms only, he will only see and hear Alarm notifications.