ATTENZIONE: Questo sito impiega diversi tipi di cookies. Alla pagina MAGGIORI INFORMAZIONI è possibile avere informazioni aggiuntive. Cliccando su ACCETTO o continuando a navigare sul sito acconsenti al loro utilizzo.
<luglio 2024>
lunmarmergiovensabdom
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234
Immagini

UniversalApp - Tile

 

Aggiungere al progetto le classi delle NOTIFICATION EXTENSION nella 000_LIB

 

TILE = icona sulla start page

BADGE = numeretto che indica quante notifiche attive ci sono

 

 

//PULISCO IL BADGE SULLA TILE - da mettere all'avvio dell'applicazione

BadgeUpdateManager.CreateBadgeUpdaterForApplication().Clear();

 

 

//CAMBIO IL BADGE DELLA TILE

XmlDocument badgeXml = BadgeUpdateManager.GetTemplateContent(BadgeTemplateType.BadgeNumber);

XmlElement badgeElement = (XmlElement)badgeXml.SelectSingleNode("/badge");

badgeElement.SetAttribute("value", MIOVALORE);

BadgeNotification badge = new BadgeNotification(badgeXml);

BadgeUpdateManager.CreateBadgeUpdaterForApplication().Update(badge);

 

 

//CAMBIARE L'IMMAGINE DELLA TILE

 TileUpdateManager.CreateTileUpdaterForApplication().EnableNotificationQueue(true);

// Create a notification for the Square310x310 tile using one of the available templates for the size.

ITileSquare310x310Image tileContent = TileContentFactory.CreateTileSquare310x310Image();

tileContent.Image.Src = "ms-appx:///assets/Logo.scale-240.png";

tileContent.Image.Alt = "";

// Create a notification for the Wide310x150 tile using one of the available templates for the size.

ITileWide310x150ImageAndText01 wide310x150Content = TileContentFactory.CreateTileWide310x150ImageAndText01();

wide310x150Content.Image.Src = "ms-appx:///assets/WideLogo.scale-240.png";

wide310x150Content.Image.Alt = "";

// Create a notification for the Square150x150 tile using one of the available templates for the size.

ITileSquare150x150Image square150x150Content = TileContentFactory.CreateTileSquare150x150Image();

square150x150Content.Image.Src = "ms-appx:///assets/Logo.scale-240.png";

square150x150Content.Image.Alt = "";

 

// Attach the Square150x150 template to the Wide310x150 template.

wide310x150Content.Square150x150Content = square150x150Content;

// Attach the Wide310x150 to the Square310x310 template.

tileContent.Wide310x150Content = wide310x150Content;

// Send the notification to the application’s tile.

TileUpdateManager.CreateTileUpdaterForApplication().Update(tileContent.CreateNotification());

Notifiche