February 2015
Intermediate to advanced
768 pages
26h 24m
English
Representing each segment in a Geometry with a separate element is fine for simple shapes and paths or geometries formed dynamically in C#. For complicated artwork in XAML, however, it can get extremely verbose. Although most people use a design tool to emit XAML-based geometries rather than craft them by hand, it makes sense to keep the resultant file size as small as reasonably possible.
Therefore, XAML supports a flexible syntax for representing just about any PathGeometry as a string. The PathGeometry representing the simple triangle displayed in Figure 15.11:
<Path Fill="Orange" Stroke="Black" StrokeThickness="10"> <Path.Data> < PathGeometry > < PathFigure IsClosed ...
Read now
Unlock full access