public SquareContentView(Album album) { artView = new AlbumArtView { BindingContext = album }; artView.UpdateArtwork(album); Children.Add(artView); blurView = new BlurView(); Children.Add(blurView); grid = new Grid { ColumnDefinitions = { new ColumnDefinition(), new ColumnDefinition { Width = 30 }, }, Children = { new StackLayout { Orientation = StackOrientation.Horizontal, Children = { new Image { Source = Images.Menu.SongsIcon }, new Label { Text = $"{album.TrackCount} {Strings.Songs}" } }, }, new ImageColorToggleButton { Source = Images.MoreDetails, OnColor = Styles.Styles.CurrentStyle.DisabledColor, OffColor = Styles.Styles.CurrentStyle.AccentColor, Padding = new Thickness(6), Tapped = async(b) => { var item = album; var popupItems = PopupManager.Shared.CreatePopoptions(item); var task = App.Current.MainPage.DisplayActionSheet(item.Name, Strings.Cancel, null, popupItems.Select(x => x.Title).ToArray()); await Task.Delay(100); b.Toggled = false; var result = await task; var selectedItem = popupItems.FirstOrDefault(x => x.Title == result); if (selectedItem.Action != null) { var success = await selectedItem.Action(); } } }.SetColumn(1), }, }; Children.Add(grid); }
void ReleaseDesignerOutlets() { if (AlbumArtView != null) { AlbumArtView.Dispose(); AlbumArtView = null; } if (BlurOverlay != null) { BlurOverlay.Dispose(); BlurOverlay = null; } if (TrackName != null) { TrackName.Dispose(); TrackName = null; } if (ArtistName != null) { ArtistName.Dispose(); ArtistName = null; } if (InstrumentalTag != null) { InstrumentalTag.Dispose(); InstrumentalTag = null; } if (PlayerIcon != null) { PlayerIcon.Dispose(); PlayerIcon = null; } if (ThumbnailView != null) { ThumbnailView.Dispose(); ThumbnailView = null; } if (SettingsButton != null) { SettingsButton.Dispose(); SettingsButton = null; } }
void ReleaseDesignerOutlets() { if (ProgressBar != null) { ProgressBar.Dispose(); ProgressBar = null; } if (ProgressBackground != null) { ProgressBackground.Dispose(); ProgressBackground = null; } if (MainScroll != null) { MainScroll.Dispose(); MainScroll = null; } if (LyricsTextView != null) { LyricsTextView.Dispose(); LyricsTextView = null; } if (AlbumArtView != null) { AlbumArtView.Dispose(); AlbumArtView = null; } if (BlurOverlay != null) { BlurOverlay.Dispose(); BlurOverlay = null; } if (TrackName != null) { TrackName.Dispose(); TrackName = null; } if (ArtistName != null) { ArtistName.Dispose(); ArtistName = null; } if (ThumbnailView != null) { ThumbnailView.Dispose(); ThumbnailView = null; } if (PlayerIcon != null) { PlayerIcon.Dispose(); PlayerIcon = null; } if (ExplicitTag != null) { ExplicitTag.Dispose(); ExplicitTag = null; } if (OpenInBrowserButton != null) { OpenInBrowserButton.Dispose(); OpenInBrowserButton = null; } if (ChangeTextSizeButton != null) { ChangeTextSizeButton.Dispose(); ChangeTextSizeButton = null; } if (SettingsButton != null) { SettingsButton.Dispose(); SettingsButton = null; } }