Exemplo n.º 1
0
        public GrainsGuidePage()
        {
            //Set the title on the navigation bar to the selected hop
            Title = "Grains Grains Grains";
            //Set the StyleId for Xamarin Test Cloud
            StyleId = "GrainsGrainsGrainsPage";

            //Create header and listview from generic view created in "Views" folder
            StackLayout grainHeader = new GrainListHeader();

            grainList = new GrainListView {
                StyleId = "grainListView"
            };

            search = new SearchBar {
                StyleId           = "searchBar",
                Placeholder       = "Search Grains",
                HorizontalOptions = LayoutOptions.FillAndExpand
            };

            //Set contents of page
            Content = new StackLayout {
                Spacing  = 0,
                Children =
                {
                    search,
                    grainHeader,
                    grainList
                }
            };
        }
        public MashCalcAddGrainPage()
        {
            //Set the title on the navigation bar to the selected hop
            Title = "Add Grains";
            //Set the StyleId for Xamarin Test Cloud
            StyleId = "AddGrainsPage";

            //Create generic views from "Views" folder
            StackLayout grainHeader = new GrainListHeader();

            grainList = new GrainListView {
                StyleId = "grainListView"
            };

            search = new SearchBar {
                StyleId           = "searchBar",
                Placeholder       = "Search Grains",
                HorizontalOptions = LayoutOptions.FillAndExpand
            };

            cancel = new GrainThemedButton {
                StyleId       = "cancelButton",
                Text          = "Cancel",
                WidthRequest  = (double)(App.ScreenWidth),
                BorderColor   = Color.Transparent,
                BorderRadius  = 0,
                HeightRequest = 50,
                Font          = Font.SystemFontOfSize(NamedSize.Large)
            };

            Content = new StackLayout {
                Spacing  = 0,
                Children =
                {
                    search,
                    grainHeader,
                    grainList,
                    cancel
                }
            };
        }