public void PinToStart() { string activationArguments = "Playlist:" + ID.ToString(); string appbarTileId = "ModernMusic." + activationArguments.Replace(':', '.'); Uri square150x150Logo = new Uri("ms-appx:///Assets/Transparent.png"); SecondaryTileManager.PinSecondaryTile(appbarTileId, Name, square150x150Logo, activationArguments, true); }
public async Task PinToStart() { string activationArguments = "Album:" + ID.ToString(); string appbarTileId = "ModernMusic." + activationArguments.Replace(':', '.'); Uri square150x150Logo = await Utilities.ResizeImageFileToFile(new Uri(CachedImagePath), 150); SecondaryTileManager.PinSecondaryTile(appbarTileId, AlbumName, square150x150Logo, activationArguments, true); }
private async void pinToStart_Click(object sender, RoutedEventArgs e) { if (SecondaryTileManager.TileExists(appbarTileId)) { ToggleAppBarButton(await SecondaryTileManager.UnpinSecondaryTile(appbarTileId)); } else { // Prepare package images for all four tile sizes in our tile to be pinned as well as for the square30x30 logo used in the Apps view. Uri square150x150Logo = new Uri("ms-appx:///Assets/Square150x150Logo.scale-240.png"); SecondaryTileManager.PinSecondaryTile(appbarTileId, "Modern Music", square150x150Logo, showName: true); } }
public async Task PinToStart() { string activationArguments = "Artist:" + ID.ToString(); string appbarTileId = "ModernMusic." + activationArguments.Replace(':', '.'); await MusicLibrary.Instance.DownloadAlbumArt(this); Uri square150x150Logo = new Uri("ms-appx:///Assets/Square150x150Logo.scale-240.png"); if (ImagePath != null) { Uri source = new Uri(ImagePath); if (!source.IsFile) { square150x150Logo = await Utilities.ResizeImage(new Uri(ImagePath), 150); } } SecondaryTileManager.PinSecondaryTile(appbarTileId, "Modern Music", square150x150Logo, activationArguments); }