#521 – Pen and Pencil Tools Both Generate Path Elements

Whether you use the Pen tool or the Pencil tool in Blend, you’re generating a Path element, which just defines a series of line segments or curves.  Using either tool in Blend results in the Data attribute of a Path element being set to a string containing markup that represents individual drawing commands.

In the example below, the first Path was created using the Pen tool, while the second Path was created using the Pencil tool.  Looking at the Path elements in XAML, there’s no information telling you which tool Blend used to create the corresponding XAML.

You can also use the Direct Selection tool on either Path to modify individual points.  The path created using the Pencil tool will typically have more points, since it puts down a series of points as you drag your mouse pointer.

#520 – Drawing a Path with the Pencil Tool

The Pen tool lets you create a new Path element by drawing the path as a series of line segments or connected curves.  You can also create a Path using the Pencil tool, which allows freehand drawing.

To use the Pencil tool, first left-click to select the Pencil on the tools panel.  If the Pen is currently visible, you’ll need to left-click and hold the left mouse button down until you see the popup menu showing the Pencil.

Once you select the Pencil, the cursor will change to look like a pencil and you can draw a freehand path by left-clicking and holding the left mouse button down.

Notice that this tool creates a Path element in XAML, just like the Pen tool.