|
|
|
WPF
offers a set of drawing primitive elements. These can be used in your user
interface tree like any other element. They are fully integrated into WPF, so
they participate in layout, and work just like any other element in your UI.
|
|
|
|
This
means graphics can be created entirely in markup – there is no need to use
code to use graphics primitives. (Although you can use code if you like.)
|
|
|
|
The Path
shape is particularly powerful. In fact it offers a superset of the
functionality of all the other shapes – the rest are really only present for
convenience. Path supports shapes made up out of any combination of Bezier
curves, elliptical arcs, and straight lines. You can use any number of any of
these types of line to define the outline of a shape. You can also add multiple ‘figures’ to a
Path – this means a shape can have more than one outline, making it possible
to define shapes with holes in.
|