Esempio n. 1
0
        public override async Task OnInitializing()
        {
            await base.OnInitializing();

            BodyScroller.Background(Colors.White);
            await WhenShown(() => new MenuDisplayer().Setup());
        }
        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();
        }