Beispiel #1
0
        protected override IBound Apply(IStyleSheet stylesheet, IBound styleBound, IBound maxBound)
        {
            var bound = StyleSheetContext.Current.CreateBound(BitBrowserApp.Current.Width, BitBrowserApp.Current.Height);

            base.Apply(stylesheet, bound, bound);

            //background color
            _view.SetBackgroundColor(Android.Graphics.Color.White);

            if (OnLoad != null)
            {
                OnLoad.Execute();
            }

            Frame = ControlsContext.Current.CreateRectangle(0, 0, bound);

            return(bound);
        }
Beispiel #2
0
        protected override IBound Apply(IStyleSheet stylesheet, IBound styleBound, IBound maxBound)
        {
            base.Apply(stylesheet, styleBound, maxBound);

            // background color
            _view.BackgroundColor = stylesheet.Helper.BackgroundColor(this).ToColorOrClear();

            IBound bound = ApplyChild(stylesheet);

            RectangleF app = UIScreen.MainScreen.ApplicationFrame;

            Frame = ControlsContext.Current.CreateRectangle(app.Left, app.Top, bound);

            if (OnLoad != null)
            {
                OnLoad.Execute();
            }

            return(bound);
        }