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();
.....
}
}
}