What is Badge Notification? | Badge Notification in Windows 8 Store Apps

In Windows Store Apps by Hafiz FarazLeave a Comment

Badge Notification Picture on the left side shows lock screen of windows 8.1 (Which you can see right now by pressing ‘Windows Key’ + L )

Highlighted area are badge notifications.

Before implementing badge notification things you need to know are: Windows 8.1 can have only 5 badge notification icons. It has to be purely white with transparent background. You need to enable background tasks in manifest (will see in a moment).

Lets do it now!

1. Open visual studio 13 > New project > Visual C# > Blank App

2. In solution explorer, open MainPage.Xaml and add below lines of code between opening and closing tag of Grid. This will add two button.

3. Goto Button_Click event by right clicking and selecting VIEW DEFINITION, then add below code inside curly braces. This will check the status of background task access for app.

4. Goto Button_Click1 event by right clicking and selecting VIEW DEFINITION, then add below code inside curly braces. This will sets the badge value i.e if you have 15 notifications on facebook it will show 15 below badge icon at lockscreen.

5. Goto Manifest file then add declaration of background task, then check push notification and lastly name of your page where your badge code is.
Configuring Badge Notification
6. Goto manifest file > Application > scroll to NOTIFICATIONS> Select Login Screen Notification as BADGE.
7. Finally goto Manifest file then add visual assets, then add badge logo(needs to be white ONLY and transparent background).

Download Complete code by Mr. Usman-Ur-Rehman

Having any problem implementing above code? Click on this post title and comment below there.