What's the difference between a Pen and Pencil in Expression Blend?
Saturday, October 31, 2009 2:27 PM
Since you were little, you probably knew what the difference between a pen and pencil was right? But on the computer, what's the diff? Different tools have different impressions, so what's the diff with Expression Blend?
Somethings always bugged me about drawing tools, especially Expression Blend today. They usually have a Pen and a Pencil. Since I was a kid, I always knew what the difference was, but what's the difference when it comes to a computer program/screen? You can usually change the colours on both of them, likewise the thickness, so what's the difference with Expression Blend?
Pen (shortcut = P)
Besides being the default tool off the Toolbox, the pen lets you draw paths, continuously. It lets you connect those paths by clicking on your design surface and setting points.
Pencil (shortcut = Y)
The Pencil lets you click and draw (ala freehand) on your design surface to create the points.
Sample, the Pen is on the left and the Pencil is on the right.
So what's all this give you in XAML? Good question, let's go look.
Notice how much shorter the Pen path Data attribute is? That's cause you're only storing single points and letting WPF "connect the dots." Technically you're doing the same thing with the Pencil, BUT since you're drawing on the surface, it's going to store all the unique and individual points and then connect them. Naturally there's going to be more of them to connect.
The Pen lets you click to set points, where the Pencil makes you draw the lines free hand.
Now that you know the difference between an Expression Blend Pen and Pencil, now it's time to grab a coffee and get coding!
Foundation Expression Blend 3 with Silverlight by Victor Gaudioso