February 2015
Intermediate to advanced
768 pages
26h 24m
English
All the preceding shapes are just special cases of a powerful shape called Path. Path adds only a single Data property to Shape, which can be set to an instance of any geometry, for example:
<Path StrokeThickness="10" Fill="Red"> <Path.Data> <RectangleGeometry Rect="0,0,100,100"/> </Path.Data> </Path>
Path made its first appearance in C# code back in Chapter 5, “Handling Input: Touch, Mouse, Pen, and Keyboard,” for rendering ink strokes. This C# code revealed much more about geometries than the preceding XAML snippet, but geometries are covered in the next section. First, let’s look at a number of ways to alter the appearance of any shape’s strokes.
Read now
Unlock full access