Exemplo n.º 1
0
        public NewsTabletPage()
        {
            Title  = "News";
            Master = new NewsPhonePage();
            Detail = new ContentPage
            {
                Content = new StackLayout
                {
                    VerticalOptions   = LayoutOptions.Center,
                    HorizontalOptions = LayoutOptions.Center,
                    Children          =
                    {
                        new Label {
                            Text = "Select a News", FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label))
                        }
                    }
                }
            };
            ((NewsPhonePage)Master).ItemSelected = (news) =>
            {
                Detail = new WebViewPage(news.url);
                if (Device.OS != TargetPlatform.Windows)
                {
                    IsPresented = false;
                }
            };

            IsPresented = true;
        }
Exemplo n.º 2
0
        public NewsTabletPage()
        {
            Title       = "News";
            Master      = new NewsPhonePage();
            IsPresented = true;
            try
            {
                Detail = new WebViewPage(db.GetNewsListItem().content, false);
            }
            catch (Exception ex)
            {
            }

            MasterBehavior = MasterBehavior.Popover;



            ((NewsPhonePage)Master).ItemSelected = (news) =>
            {
                Detail = new WebViewPage(news.content, false);
                //if (Device.OS != TargetPlatform.Windows)
                //IsPresented = false;
            };


            //TappedEventArgs
        }