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, } }; }
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, } }; }