예제 #1
0
        public override async Task OnPreRender()
        {
            await base.OnPreRender();

            if (ShowTabsAtTheTop())
            {
                Height.BindTo(Root.Height);
                Tabs.Y.BindTo(NavBarBackground.Height);
                Tabs.Height.Changed.Event += () => BodyScroller.Margin(top: Tabs.ActualBottom);
                Tabs.Y.Changed.Event += () => BodyScroller.Margin(top: Tabs.ActualBottom);
                BodyScroller.Y.BindTo(Tabs.Y, Tabs.Height, (y, h) => y + h);
            }
            else
            {
                if (HasKeyboardLayout()) Height.BindTo(Root.Height);
                else Height.BindTo(Root.Height, Tabs.Height, (x, y) => x - y);

                Tabs.Y.BindTo(Root.Height, Tabs.Height, (x, y) => x - y);
                BodyScroller.Y.BindTo(NavBarBackground.Height);
            }

            BodyScroller.Height.BindTo(Root.Height, NavBarBackground.Height, Tabs.Height, (x, y, z) => x - y - z);

            await Tabs.Visible().BringToFront();
        }
예제 #2
0
        public override async Task OnPreRender()
        {
            await base.OnPreRender();

            await Tabs.Current.Attach();

            Height.BindTo(Root.Height, Tabs.Current.Height, (x, y) => x - y);
        }
예제 #3
0
        public override async Task OnInitializing()
        {
            await base.OnInitializing();

            Height.BindTo(Root.Height);

            await Add(HeaderBar = new Stack(RepeatDirection.Horizontal).Id("HeaderBar"));

            Row = await Add(new Stack(RepeatDirection.Horizontal).Id("Row"));

            Row.Height.BindTo(Height, HeaderBar.Height, (x, y) => x - y);

            await AddPageContainer();

            Shown.Handle(OnShown);
        }