示例#1
0
        /// <summary>Construct visual gradient.</summary>
        /// <param name="gradientSize">The size of the gradient.</param>
        /// <param name="bottomLeft">The bottom Left.</param>
        /// <param name="bottomRight">The bottom Right.</param>
        /// <param name="topLeft">The top Left.</param>
        /// <param name="topRight">The top Right.</param>
        private void ConstructVisualGradient(Size gradientSize, Color bottomLeft, Color bottomRight, Color topLeft, Color topRight)
        {
            _bottomLeft  = bottomLeft;
            _bottomRight = bottomRight;
            _topLeft     = topLeft;
            _topRight    = topRight;
            Size _gradientSize = gradientSize;

            if (_control == null)
            {
                return;
            }

            GraphicsManager.ApplyGradientBackground(_control, _gradientSize, _topLeft, _topRight, _bottomLeft, _bottomRight);
        }