tags:

views:

414

answers:

3

I was looking over old MIX-videos from 2007 and saw a nice presentation showing Hand Drawn Shapes in WPF. My question is if these exist in the standard shipped package or if i have to create these myself.

I imagine that I have to create them, so here comes the "real" programming question: How do you start when you want to create a "hand drawn"-looking shape which is "portable"? I want to be able to re-use as much code as possible for Rectangle, Elipse, Line etc.

A: 

When I want to draw a custom shape, I use a tool like Expression Designer, Expression Blend, Adobe Fireworks or Illustrator to design the shape (there's a plugin for Fireworks and one for Illustrator that saves vectors out to XAML). This takes care of the hard part of laying things out in XAML, and this shape is reusable later on.

Pete OHanlon
A: 

Draw the shape in Expression Designer and then choose "Export..." as XAML. When the export dialog appears, choose "Resource Dictionary" as the document format, then you can switch to the XAML tab and copy the code from the dialog box into a Resource Dictionary in your Visual Studio project. Now you have a DrawingBrush that you can use to place your shapes anywhere in your application.

gbc
This is just too abstract, do you have anything more concrete to my actual question about the "hand drawn shapes"? I want shapes that look like i've written on paper. Just like the once used on Mix07.
Filip Ekberg
The shapes that I use in my WPF applications I have drawn in Expression Designer, by hand, and then exported the XAML as a re-useable brush. To answer your question more directly, you have to create these yourself. Whilst you could generate the XAML manually, it seems more effective to just draw the basic shapes in Expression Design and grab the XAML it generates.If that doesn't help, I'm sorry, I must misunderstand what you are trying to achieve.
gbc
+1  A: 

I think this may be what you're looking for: Hand drawn shapes is near the bottom of the page.

JowSithm
Perfect! And even with source-code. Thank you
Filip Ekberg