Пример #1
0
        public override Bound Apply(StyleSheet.StyleSheet stylesheet, Bound styleBound, Bound maxBound)
        {
            base.Apply(stylesheet, styleBound, maxBound);

            var   app   = UIScreen.MainScreen.ApplicationFrame;
            Bound bound = new Bound(app.Width, app.Height);

            LayoutBehaviour.Screen(stylesheet, this, _child, bound);

            Rectangle old = _child.Frame;

            _child.Frame = new Rectangle(old.Left + app.Left, old.Top + app.Top, old.Width, old.Height);

            // background color
            _view.BackgroundColor = stylesheet.GetHelper <StyleHelper> ().ColorOrClear <BackgroundColor> (this);

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

            Frame = new Rectangle(app.Left, app.Top, bound);

            return(bound);
        }
Пример #2
0
        bool InvokeClickAction()
        {
            if (_onClick != null)
            {
                _view.PlaySoundEffect(SoundEffects.Click);
                _onClick.Execute();
                return(true);
            }

            if (_onClickAction != null)
            {
                _view.PlaySoundEffect(SoundEffects.Click);
                _onClickAction.Execute();
                return(true);
            }
            return(false);
        }
Пример #3
0
        public override Bound Apply(StyleSheet.StyleSheet stylesheet, Bound styleBound, Bound maxBound)
        {
            var bound = new Bound(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 = new Rectangle(0, 0, bound);

            return(bound);
        }