/// <summary> /// 在指定的区域内,用指定的状态来绘制一个列头的背景 /// </summary> /// <param name="g">The Graphics to draw on</param> /// <param name="headerRect">The Rectangle that represents the dimensions /// of the column header</param> /// <param name="clipRect">The Rectangle that represents the clipping area</param> /// <param name="state">A ColumnHeaderStates value that specifies the /// state to draw the column header in</param> public static void DrawColumnHeader(Graphics g, Rectangle headerRect, Rectangle clipRect, I3ColumnHeaderStates state) { if (g == null || headerRect.Width <= 0 || headerRect.Height <= 0 || clipRect.Width <= 0 || clipRect.Height <= 0) { return; } if (I3ThemeManager.VisualStylesEnabled) { I3ThemeManager.DrawThemeBackground(g, I3ThemeClasses.ColumnHeader, (int)I3ColumnHeaderParts.HeaderItem, (int)state, headerRect, clipRect); } else { g.FillRectangle(SystemBrushes.Control, headerRect); if (state == I3ColumnHeaderStates.Pressed) { g.DrawRectangle(SystemPens.ControlDark, headerRect.X, headerRect.Y, headerRect.Width - 1, headerRect.Height - 1); } else { ControlPaint.DrawBorder3D(g, headerRect.X, headerRect.Y, headerRect.Width, headerRect.Height, Border3DStyle.RaisedInner); } } }
/// <summary> /// 在指定的区域内,用指定的状态来绘制一个列头的背景 /// </summary> /// <param name="g">The Graphics to draw on</param> /// <param name="headerRect">The Rectangle that represents the dimensions /// of the column header</param> /// <param name="state">A ColumnHeaderStates value that specifies the /// state to draw the column header in</param> public static void DrawColumnHeader(Graphics g, Rectangle headerRect, I3ColumnHeaderStates state) { I3ThemeManager.DrawColumnHeader(g, headerRect, headerRect, state); }