
Defines a rectangular brush with a hatch style, a foreground color, and a background color. This class cannot be inherited.
Assembly: System.Drawing (in System.Drawing.dll)
A hatch pattern is made from two colors: one defined by the BackgroundColor, which fills the background and one for the lines that form the pattern over the background defined by the ForegroundColor property. The HatchStyle property defines what type of pattern the brush has and can be any value from the HatchStyle enumeration. There are more than fifty elements in the HatchStyle enumeration.
The following illustration shows an ellipse filled with a horizontal hatch pattern.

The following example shows how to create the HatchBrush shown in the previous illustration.
System.MarshalByRefObject
System.Drawing.Brush
System.Drawing.Drawing2D.HatchBrush
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.