/// <summary> /// 绘制按钮 /// </summary> /// <param name="g">The Graphics.</param> /// User:Ryan CreateTime:2011-08-02 14:23. private void DrawButton(Graphics g) { Rectangle btnRect; EnumControlState btnState = this.GetComboBoxButtonPressed() ? EnumControlState.HeightLight : EnumControlState.Default; btnRect = new Rectangle(this.ButtonRect.X, this.ButtonRect.Y - 1, this.ButtonRect.Width + 1 + this._Margin, this.ButtonRect.Height + 2); RoundRectangle btnRoundRect = new RoundRectangle(btnRect, new CornerRadius(0)); //Blend blend = new Blend(3); //blend.Positions = new float[] { 0f, 0.5f, 1f }; //blend.Factors = new float[] { 0f, 1f, 0f }; GDIHelper.FillRectangle(g, btnRoundRect, SkinManager.CurrentSkin.DefaultControlColor); Size btnSize = new Size(12, 7); GDIHelper.DrawArrow(g, ArrowDirection.Down, btnRect, btnSize, 0f, Color.FromArgb(30, 178, 239)); Color lineColor = SkinManager.CurrentSkin.BorderColor; GDIHelper.DrawGradientLine(g, lineColor, 90, btnRect.X, btnRect.Y, btnRect.X, btnRect.Bottom - 1); }