|
|
|
The
DrawingBrush is conceptually very similar to the ImageBrush, in that both
allow you to fill an area with a picture. The difference with the
DrawingBrush is that you don’t have to use a bitmap. You can pass in any
Drawing object. For example, if you use a GeometryDrawing, you can perform
all the same drawing operations as the Path shape. And you can use a
DrawingGroup to bring multiple GeometryDrawing elements together. You are free to use any Brush and Pen for each
individual GeometryDrawing within the drawing, so you can build up
sophisticated imagery and then use it as a pen.
|
|
The
VisualBrush has similar capabilities to DrawingBrush – it allows an imagery,
vector or bitmap, to be used as a brush. The difference is that the
VisualBrush takes any UI element as its source. You can even point it at a UI
element that is already in use in the application. This means you can use a
VisualBrush to replicate part of the UI.
|
|
|
|
This can
be used for tricks such as making a reflection of part of the UI by painting
it somewhere else. (This can be done in conjunction with opacity to make the
reflection fade.)
|
|
|