void SendTileNotificationScaledImage_Click(object sender, RoutedEventArgs e) { string scale; ResourceContext.GetForCurrentView().QualifierValues.TryGetValue("Scale", out scale); ITileSquare310x310Image square310x310TileContent = TileContentFactory.CreateTileSquare310x310Image(); square310x310TileContent.Image.Src = "ms-appx:///images/purpleSquare310x310.png"; square310x310TileContent.Image.Alt = "Purple square"; ITileWide310x150SmallImageAndText03 wide310x150TileContent = TileContentFactory.CreateTileWide310x150SmallImageAndText03(); wide310x150TileContent.TextBodyWrap.Text = "blueWide310x150.png in the xml is actually blueWide310x150.scale-" + scale + ".png"; wide310x150TileContent.Image.Src = "ms-appx:///images/blueWide310x150.png"; wide310x150TileContent.Image.Alt = "Blue wide"; ITileSquare150x150Image square150x150TileContent = TileContentFactory.CreateTileSquare150x150Image(); square150x150TileContent.Image.Src = "ms-appx:///images/graySquare150x150.png"; square150x150TileContent.Image.Alt = "Gray square"; wide310x150TileContent.Square150x150Content = square150x150TileContent; square310x310TileContent.Wide310x150Content = wide310x150TileContent; TileUpdateManager.CreateTileUpdaterForApplication().Update(square310x310TileContent.CreateNotification()); OutputTextBlock.Text = MainPage.PrettyPrint(square310x310TileContent.GetContent()); }
private void SendTile_Click(object sender, RoutedEventArgs e) { ITileWide310x150SmallImageAndText03 tileContent = TileContentFactory.CreateTileWide310x150SmallImageAndText03(); tileContent.TextBodyWrap.Text = "This tile notification has an image, but it won't be displayed on the lock screen"; tileContent.Image.Src = "ms-appx:///images/tile-sdk.png"; tileContent.RequireSquare150x150Content = false; TileUpdateManager.CreateTileUpdaterForApplication().Update(tileContent.CreateNotification()); rootPage.NotifyUser("Tile notification sent", NotifyType.StatusMessage); }