Exemple #1
0
        public MainPage()
        {
            Title = "Fly 360";
            NavigationPage.SetBackButtonTitle(this, string.Empty);

            BackgroundColor = Color.Black;

            var entry = new Entry
            {
                BackgroundColor  = Color.Transparent,
                TextColor        = Color.White,
                Placeholder      = "Search",
                PlaceholderColor = Color.LightGray,
                Margin           = 25
            };
            var frame = new Frame
            {
                BackgroundColor = Color.LightGray,
                BorderColor     = Color.LightGray,
                CornerRadius    = 15,
                Opacity         = 0.33,
                Margin          = 25
            };

            var button = new Button
            {
                BackgroundColor   = Color.White,
                TextColor         = Color.Blue,
                Text              = "   Suggested Destinations   ",
                HorizontalOptions = LayoutOptions.Center,
                Margin            = 40
            };

            Grid.SetRow(button, 2);
            button.Clicked += async(s, a) => {
                await Navigation.PushPopupAsync(popupPage);
            };

            urhoSurface = new UrhoSurface();
            urhoSurface.VerticalOptions = LayoutOptions.FillAndExpand;
            Grid.SetRowSpan(urhoSurface, 3);

            popupPage            = new MenuPopupPage();
            popupPage.Appearing += (s, a) =>
            {
                frame.IsVisible  = false;
                entry.IsVisible  = false;
                button.IsVisible = false;
            };
            popupPage.Disappearing += (s, a) =>
            {
                frame.IsVisible  = true;
                entry.IsVisible  = true;
                button.IsVisible = true;
            };

            Content = new Grid
            {
                RowDefinitions =
                {
                    new RowDefinition {
                        Height = GridLength.Auto
                    },
                    new RowDefinition {
                        Height = GridLength.Star
                    },
                    new RowDefinition {
                        Height = GridLength.Auto
                    }
                },
                Children =
                {
                    urhoSurface,
                    frame,
                    entry,
                    button,
                }
            };
        }
Exemple #2
0
        public MainPage()
        {
            Title = "Fly 360";
            NavigationPage.SetBackButtonTitle(this, string.Empty);

            BackgroundColor = Color.Black;

            var entry = new IconEntry
            {
                Margin = new Thickness(25, 0),
            };

            Grid.SetRow(entry, 1);

            urhoSurface = new UrhoSurface();
            urhoSurface.VerticalOptions = LayoutOptions.FillAndExpand;
            Grid.SetRowSpan(urhoSurface, 4);

            var profileView = GetProfileView();

            Grid.SetRow(profileView, 3);

            popupPage            = new MenuPopupPage();
            popupPage.Appearing += (s, a) =>
            {
                entry.Opacity       = 0.2f;
                urhoSurface.Opacity = 0.2f;
                profileView.Opacity = 0.2f;
            };
            popupPage.Disappearing += (s, a) =>
            {
                entry.Opacity       = 1f;
                urhoSurface.Opacity = 1f;
                profileView.Opacity = 1f;
            };


            Content = new Grid
            {
                RowDefinitions =
                {
                    new RowDefinition {
                        Height = 15
                    },
                    new RowDefinition {
                        Height = 40
                    },
                    new RowDefinition {
                        Height = GridLength.Star
                    },
                    new RowDefinition {
                        Height = 80
                    }
                },
                Children =
                {
                    urhoSurface,
                    entry,
                    profileView,
                }
            };
        }
Exemple #3
0
        public MainPage()
        {
            Title = "Fly 360";
            NavigationPage.SetBackButtonTitle(this, string.Empty);

            BackgroundColor = Color.Black;

            var entry = new IconEntry
            {
                Margin = new Thickness(25, 0),
            };

            Grid.SetRow(entry, 1);
            var button = new Button
            {
                BackgroundColor   = Color.FromHex("#F2F6F8"),
                TextColor         = Color.FromHex("#5887F9"),
                Text              = "Suggested Destinations",
                HorizontalOptions = LayoutOptions.Center,
                Margin            = new Thickness(40, 0),
                WidthRequest      = 250,
                CornerRadius      = 5
            };

            Grid.SetRow(button, 3);
            button.Clicked += async(s, a) =>
            {
                await Navigation.PushPopupAsync(popupPage);
            };

            urhoSurface = new UrhoSurface();
            urhoSurface.VerticalOptions = LayoutOptions.FillAndExpand;
            Grid.SetRowSpan(urhoSurface, 5);

            popupPage            = new MenuPopupPage();
            popupPage.Appearing += (s, a) =>
            {
                entry.Opacity    = 0.25f;
                button.IsVisible = false;
            };
            popupPage.Disappearing += (s, a) =>
            {
                entry.Opacity    = 1f;
                button.IsVisible = true;
            };

            Content = new Grid
            {
                RowDefinitions =
                {
                    new RowDefinition {
                        Height = 15
                    },
                    new RowDefinition {
                        Height = 40
                    },
                    new RowDefinition {
                        Height = GridLength.Star
                    },
                    new RowDefinition {
                        Height = 40
                    },
                    new RowDefinition {
                        Height = 40
                    }
                },
                Children =
                {
                    urhoSurface,
                    entry,
                    button,
                }
            };
        }