예제 #1
0
파일: Page0.cs 프로젝트: manhvvhtth/xm-form
        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;
        }
예제 #2
0
        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;
        }
예제 #3
0
파일: Page4.cs 프로젝트: manhvvhtth/xm-form
        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)
            };
        }
예제 #4
0
파일: Page3.cs 프로젝트: manhvvhtth/xm-form
        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
				}
			};
        }