Charla en el evento Hel10 Windows 10, hablando de las nuevas notificaciones interactivas de Windows 10 y los nuevos templates para crear Tiles y notificaciones toast
7. Plantillas heredadas
• Si una plantilla se adapta a
nuestras necesidades,
podemos seguir usándola.
• Las plantillas anteriores se
mantienen
• Las plantillas de Phone y Windows se han
fusionado.
• Hay mas de 80 plantillas disponibles
8.
9. Responsive tiles
• Los tiles no son
siempre del mismo tamaño
• Los tiles se adaptan a
la pantalla en la que están
Dado que el grid de la pantalla de start tiene diferentes
densidades y se adapta al tamaño de la pantalla del
dispositivo, también lo hacen los tiles y su contenido.
High density exampleLow density example
10. Tiles adaptables – Estructura XML
Min. Med Size Max Med. Size
<tile>
<visual>
<binding template="TileSmall">
...
</binding>
<binding template="TileMedium">
...
</binding>
<binding template="TileWide">
...
</binding>
<binding template="TileLarge">
...
</binding>
</visual>
</tile>
11. Tiles adaptables – Código C#
Min. Med Size Max Med. Size
TileContent content = new TileContent()
{
Visual = new TileVisual()
{
TileMedium = new TileBinding()
{
....
},
TileWide = new TileBinding()
{
....
},
TileLarge = new TileBinding()
{
....
}
}
};
32. Action Center
• Manage app notifications
• Developers can:
• Remove one or many notifications
• Tag and group notifications
• Replace a notification with a new one
• Set an expiration on notifications
ToastNotificationHistory tnh = ToastNotificationManager.History;
tnh.Remove(“T1“, “G2“);
tnh.RemoveGroup(“G1");
33. Action Center
• ToastNotificationHistoryChangedTrigger
• Fires whenever a user dismisses a notification from Action Center
• Or when an app adds or removes or replaces a notification
public sealed class ToastChanged : IBackgroundTask
{
public void Run(IBackgroundTaskInstance taskInstance)
{
var toasts = ToastNotificationManager.History.GetHistory();
if (toasts != null)
{
var count = toasts.Select(t => t.Group == "G2").Count();
.....
}
}
}