Beispiel #1
0
        protected override void OnSizeChanged(int w, int h, int oldw, int oldh)
        {
            base.OnSizeChanged(w, h, oldw, oldh);

            var xpad = (float)(PaddingLeft + PaddingRight);
            var ypad = (float)(PaddingTop + PaddingBottom);

            var ww = w - xpad;
            var hh = h - ypad;

            _bounds = new RectF(0f, 0f, ww, hh);
            _bounds.OffsetTo(PaddingLeft, PaddingTop);
        }