DashStyle


DashStyleHierarchy: DependencyObject Freezable Animatable

     <Element Dashes="2,3,2,5,2,3,2,5" /> 

DashStyle defines the series of dashes and gaps drawn by a Pen element. It is an array of Double elements interpreted as a pair of dash,gap values. The actual length of the dash or gap is determined by multiplying the declared size of the dash or gap by the Pen's Thickness. DashStyle is rarely directly used; rather, it is used primarily to describe the StrokeDashArray attribute used by Path and other geometries when drawing Path elements.

Example 10-1shows the use of a DashStyle when defining the StrokeDashArray attribute of a Path. This example (shown in Figure 10-2) draws a Line with a series of dashes of length 5*StrokeThickness (5*4), a gap of length 2*StrokeThickness (2*4), a dash of length 6*StrokeThickness (6*4), and so on, according to the StrokeDashArray attribute.




XAML in a Nutshell
XAML in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596526733
EAN: 2147483647
Year: 2007
Pages: 217

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net