One of my most favorite for creating component is playing with colors. With colors, we can create fancy controls for our application and present an "eye candy" application for the user. In this articles, you will find a way to playing with color from using simple basic color to creating advanced gradient color.
Part I: The Brush Object
To make a color, we need a Brush object from Graphics. There are 4 type of brush:
- Solid Brush : A plain color
- Hatch Brush : A color with hatch effect
- Texture Brush : A texture filled object
- Gradient Brush : A gradient color brush
Part II: Simple brush
To apply a color to your drawing, you need a graphic object to draw. It can be a pen or a shape.
GDI+ has so many objects for displaying. They are:
- Arcs (Arc is a portion of ellipse)
GDI+ is a good way for creating nice application UI, components or controls. With learning frequently, you can create any component you want. Your only limit is your creativity. In next section, I'll explain more complex way for manipulating colors using gradients.