void UpdateBadgeWithNumber(int number)
{
// Note: This sample contains an additional project, NotificationsExtensions.
// NotificationsExtensions exposes an object model for creating notifications, but you can also modify the xml
// of the notification directly. See the additional function UpdateBadgeWithNumberWithStringManipulation to see how to do it
// by modifying strings directly.
BadgeNumericNotificationContent badgeContent = new BadgeNumericNotificationContent((uint)number);
// Send the notification to the application’s tile.
BadgeUpdateManager.CreateBadgeUpdaterForApplication().Update(badgeContent.CreateNotification());
OutputTextBlock.Text = badgeContent.GetContent();
}