Ejemplo n.º 1
0
 /// <summary>
 /// Show the details page according the type of the element (news, conference, member or show)
 /// </summary>
 /// <param name="item">Item to show. Can be a news, a conference, a member or a show</param>
 private void ShowDetailsPage(VisualGenericItem item)
 {
     if (item != null)
     {
         if (App.IsInternetAvailable)
         {
             string url = string.Format("/{0}Page.xaml?Id={1}", item.Type, item.Id);
             Uri uri = new Uri(url, UriKind.Relative);
             NavigationService.Navigate(uri);
         }
         else
         {
             MessageBox.Show(AppResources.MSG_CHECK_NETWORK);
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Informs the view the user wants to show selected item's details
 /// </summary>
 /// <param name="item"></param>
 private void GoToDetailsPage(VisualGenericItem item)
 {
     Messenger.Default.Send(item);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Open the selected item in the related details page
        /// </summary>
        /// <param name="item">Item to display</param>
        private void GoToDetailsPage(VisualGenericItem item)
        {
            IDictionary<string, Func<Type>> pages = new Dictionary<string, Func<Type>>
                {
                    { "News", () => typeof(NewsDetailsPage) },
                    { "Member", () => typeof(MemberDetailsPage) },
                    { "Project", () => typeof(ProjectDetailsPage) },
                    { "Conference", () => typeof(ConferenceDetailsPage) },
                    { "Show", () => typeof(ShowDetailsPage) }
                };

            Type type = pages[item.Type]();
            Frame.Navigate(type, item);
        }