Binding to the Shell

For the OS to display toast and tile notifications, the channel must call the BindToShellToast and BindToShellTile methods, as demonstrated in the following excerpt:

/* Toast Notifications. */if (!channel.IsShellToastBound){    channel.BindToShellToast();}/* Tile Notifications. */if (!channel.IsShellTileBound){    channel.BindToShellTile();}

To stop receiving toast and tile notifications, the channel provides the UnbindToShellToast and UnbindToShellTile methods, respectively.

Best Practice

When creating an HttpNotificationChannel, avoid keeping it open if not subscribing to its events. It is not necessary for the channel to be kept open for the shell to receive either toast or tile notifications, and the channel itself consumes ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.