Exemple #1
0
        public App()
        {
            ContentPage master = new ContentPage();

            Button searchTopicsButton = new Button
            {
                Text              = "Search Topics",
                Font              = Font.SystemFontOfSize(NamedSize.Large),
                BorderWidth       = 1,
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions   = LayoutOptions.CenterAndExpand
            };

            searchTopicsButton.Clicked += loadSearchTopics;

            Button connectDatabaseButton = new Button
            {
                Text              = "Connect to Database",
                Font              = Font.SystemFontOfSize(NamedSize.Large),
                BorderWidth       = 1,
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions   = LayoutOptions.CenterAndExpand
            };
            //connectDatabaseButton.Clicked += connectDatabase;

            Button webViewButton = new Button
            {
                Text              = "Display Web Page",
                Font              = Font.SystemFontOfSize(NamedSize.Large),
                BorderWidth       = 1,
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions   = LayoutOptions.CenterAndExpand
            };

            webViewButton.Clicked += loadWebPage;

            ViewReference webContent = new ViewReference();

            // The root page of your application
            var content = new ContentPage
            {
                Title   = "Sage",
                Content = new StackLayout
                {
                    VerticalOptions = LayoutOptions.Center,
                    Children        =
                    {
                        webContent, webViewButton, searchTopicsButton,
                    }
                }
            };

            MainPage = new NavigationPage(content);
        }
Exemple #2
0
        private async void loadWebPage(object sender, EventArgs e)
        {
            ViewReference webContent = new ViewReference();
//            await MainPage.Navigation.PushAsync();
        }