Toast Notifications

Show toast notifications to the user

Reference the library

C#
using CI.WSANative.Notification;

Show a toast notification

Immediately shows a toast notification - image is optional, tag is only required if you want to later remove the notification manually

C#
WSANativeNotification.ShowToastNotification(new WSAToastNotification() { Title = "This is a title", Text = "This is a description", Tag = "Tag", Image = new Uri("Image Uri") });

Schedule a toast notification

Schedules a toast notification for a specific time - image is optional, tag is only required if you want to later remove the notification manually, id is only required if you want to cancel the notification

C#
WSANativeNotification.ShowScheduledToastNotification(new WSAScheduledToastNotification() { Title = "This is a title", Text = "This is a description", Id = "1234", DeliveryTime = DateTime.Now.AddSeconds(15), Tag = "Tag1", Image = new Uri("Image Uri") });

Remove a toast notification

Removes the toast notification from the action centre. If multiple notifications have the same tag they will all be removed

C#
WSANativeNotification.RemoveToastNotification("Tag");

Remove a scheduled toast notification

Removes the scheduled toast notification identified by the specified id

C#
WSANativeNotification.RemoveScheduledToastNotification("Id");

Get scheduled toast notifications

Returns a list of all scheduled toast notifications

C#
WSANativeNotification.GetScheduledToastNotifications();