Beispiel #1
0
        private void UpdateBorder()
        {
            if (_border == null)
            {
                return;
            }

            float width  = _hitArea.Width;
            var   height = _hitArea.Height;

            Quad topLine    = _border.GetChild(0) as Quad;
            Quad rightLine  = _border.GetChild(1) as Quad;
            Quad bottomLine = _border.GetChild(2) as Quad;
            Quad leftLine   = _border.GetChild(3) as Quad;

            topLine.Width    = width; topLine.Height = 1;
            bottomLine.Width = width; bottomLine.Height = 1;
            leftLine.Width   = 1;     leftLine.Height = height;
            rightLine.Width  = 1;     rightLine.Height = height;
            rightLine.X      = width - 1;
            bottomLine.Y     = height - 1;
            topLine.Color    = rightLine.Color = bottomLine.Color = leftLine.Color = _format.Color;
        }