コード例 #1
0
        void OnLayout()
        {
            var x     = Control.Geometry.X + horizontalPadding;
            var y     = Control.Geometry.Y;
            var w     = (int)(Control.Geometry.Width - (horizontalPadding * 3)) / 2;
            var h     = Control.Geometry.Height;
            var rectL = new Rect(x, y, w, h);

            _borderL.Draw(rectL);
            _buttonL.Geometry = rectL;

            var x2    = Control.Geometry.X + w + (horizontalPadding * 2);
            var rectR = new Rect(x2, y, w, h);

            _borderR.Draw(rectR);
            _buttonR.Geometry = rectR;
        }
コード例 #2
0
 private void OnLayout()
 {
     _roundRectangle.Draw(Control.Geometry);
     _borderRectangle.Draw(Control.Geometry);
     UpdateBackgroundColor(false);
 }