'宣言 Protected Overrides NotOverridable Sub DrawBackColor( _ ByRef drawParams As UIElementDrawParams _ )
protected override void DrawBackColor( ref UIElementDrawParams drawParams )
Imports System.Drawing Imports System.Drawing.Drawing2D Imports Infragistics.Win Protected Overrides Sub DrawBackColor(ByRef drawParams As UIElementDrawParams) ' 背景を描画します MyBase.DrawBackColor(drawParams) ' コントロールの上にハッチ パターンを描画します Dim brush As HatchBrush = New HatchBrush(HatchStyle.Percent50, Color.White, Color.Transparent) drawParams.Graphics.FillRectangle(brush, drawParams.InvalidRect) brush.Dispose() End Sub
using System.Drawing; using System.Drawing.Drawing2D; using Infragistics.Win; protected override void DrawBackColor(ref UIElementDrawParams drawParams) { //背景を描画します base.DrawBackColor( ref drawParams ); //コントロールの上にハッチ パターンを描画します HatchBrush brush = new Drawing2D.HatchBrush( HatchStyle.Percent50, Color.White, Color.Transparent ); drawParams.Graphics.FillRectangle( brush, drawParams.InvalidRect ); brush.Dispose(); }