async void OnElementClick(object sender, ItemTappedEventArgs e) { if (!UserId.Equals(AccountManager.GetAccountId())) { return; } IElement element = (IElement)e.Item; Page page = null; switch ((int)element.TypeElement) { case (int)ElementType.Book: page = new BookDetails((Book)element, this); break; case (int)ElementType.Movie: page = new MovieDetails((Movie)element, this); break; case (int)ElementType.Song: page = new SongDetails((Song)element, this); break; } page.Title = element.MainTitle; this.MainPage.SetDetailPage(page); }
async void OnSongClick(object sender, ItemTappedEventArgs e) { Page page = new SongDetails((Song)e.Item, this); page.Title = ((Song)e.Item).MainTitle; this.MainPage.SetDetailPage(page); }