Windows 8 Toast Notifications

What is Toast Notifications?

Windows 8 has a notification system similar to that implemented in mobile operation systems such as Windows Phone, IOS and Android.

A Windows 8 Toast is a notification triggered by an application or the operating system itself that is displayed to the user by way of a small pop-up notification.

A toast is a small, informational window displayed by certain kinds of software, especially instant messaging clients such as Skype and Windows Live Messenger. Toasts notify users of various kinds of events, such as reception of new e-mail, a change in a peer’s availability, or a change in network connectivity.

Toast Templates



Let’s create project and name it “ToastNotificationsDemo”


Then open MainPage.xaml from solution explorer


Then drag button from toolbox to page designer and give it content “Show Toast” from properties window


Then we need to add event handler to button to show toast lets add click event from properties windows as you see and named it “ShowToastClickEvent”


Now event created for you in “MainPage.xaml.cs”

Let’s add Microsoft notification extensions from NuGet Packages (you can read more about it from here

open package manager console Then install notification package using this command

PM> Install-Package NotificationsExtensions.WinRT


Now you will find NotificationsExtensions.WinRT referenced in your project

Let’s back to code “MainPage.xaml.cs” and add our name spaces we will use

using NotificationsExtensions.ToastContent;

using Windows.UI.Notifications; 

Then add event body

privatevoid ShowToastClickEvent(object sender, RoutedEventArgs e)


            IToastText02 content = ToastContentFactory.CreateToastText02();

            content.TextBodyWrap.Text = “Hello…Body…”;

            content.TextHeading.Text = “Hello…Header”;

            ToastNotification notification = content.CreateNotification();



Finally we let’s create notification 


            ToastNotification notification = content.CreateNotification();

Then till the notification manager we need to display it now


Wait don’t Run Now……

We must enable toast capability from Package.appxmanifest file


Now It’s time to run the app and the result will come like that …


There is more about notifications if you need learn more go to



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s