Example #1
0
        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);
        }
Example #2
0
        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);
        }