private async Task ReloadReportsFromCacheAsync()
{
// setup a load operation to populate the collection from the cache...
using (this.EnterBusy())
{
var reports = await ReportItem.GetAllFromCacheAsync();
// update the model...
this.Items.Clear();
foreach (ReportItem report in reports)
{
this.Items.Add(report);
}
// update the badge...
var badge = new BadgeNotificationBuilder(this.Items.Count);
badge.Update();
// update the tile...
string message = "1 report";
if (this.Items.Count != 1)
{
message = string.Format("{0} reports", this.Items.Count);
}
var tile = new TileNotificationBuilder(new string[] { "StreetFoo", message },
// TileTemplateType.TileWidePeekImage01);
TileTemplateType.TileWide310x150PeekImage01);
tile.ImageUris.Add("ms-appx:///Assets/Toast.jpg");
// tile.UpdateAndReplicate(TileTemplateType.TileSquarePeekImageAndText02);
tile.UpdateAndReplicate(TileTemplateType.TileSquare150x150PeekImageAndText02);
}
}