public Page0(string pageName) : base(pageName) { _TopBar.RAction = async () => { await Navigation.PushAsync(new Page1("page 1")); }; _layout = new MyStackLayout { Orientation = StackOrientation.Vertical, HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Children = { new StackLayout { Orientation = StackOrientation.Horizontal, VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand, Children = {_btnButton, _myLabel, _btnRemobeImage} } } }; Content = new ScrollView { Content = _layout }; _btnButton.Clicked += BtnButtonOnClicked; _btnRemobeImage.Clicked +=BtnRemobeImageOnClicked; }
public TopBar() { _lBtn = new MyButton { Text = "<", HorizontalOptions = LayoutOptions.Start, VerticalOptions = LayoutOptions.FillAndExpand, IsVisible = false, IsEnabled = false }; _rBtn = new MyButton { Text = ">", HorizontalOptions = LayoutOptions.End, VerticalOptions = LayoutOptions.FillAndExpand, IsVisible = false, IsEnabled = false }; var denyAction = new DenyAction<object, EventArgs>(NavigationEvent, 1000); _lBtn.Clicked += denyAction.OnEvent; _rBtn.Clicked += denyAction.OnEvent; Content = new MyStackLayout { Orientation = StackOrientation.Horizontal, HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.Start, Children = { _lBtn, new MyBoxView(), _rBtn } }; HorizontalOptions = Content.HorizontalOptions; VerticalOptions = Content.VerticalOptions; }
public Page4(string pageName) : base(pageName) { _TopBar.LAction = async () => { await Navigation.PopAsync(); }; Content = new MyStackLayout { Children = { new CardView(), new CardView(), new CardView() }, Orientation = StackOrientation.Vertical, Spacing = 4, Padding = new Thickness(10) }; }
public Page3(string pageName) : base(pageName) { _TopBar.LAction = async () => { await Navigation.PopAsync(); }; _TopBar.RAction = async () => { await Navigation.PushAsync(new Page4("Page 4")); }; _btn = new MyButton { Text = "Goto page 1" }; _btn.Clicked += new DenyAction<object, EventArgs> (BtnClicked).OnEvent; Content = new MyStackLayout { Children = { _btn } }; }