Jose Fajardo
Silverlight and WPF
Tuesday March 25, 2008
How to create a spiral xAML asset
This is going to be a simple post BUT I thought I'd share it because I have been racking my brain for so long working out how to do something like this in pure xAML.
[Thanks to Germain from over at the expression forums for showing me how to do this]
1: Start up Design and create a new Canvas, mine was a 800 x 600 sized one.
2. Turn on Grid lines ( View --> Show --> Grid )
3. Turn on "Snap to grid" ( View --> Snap to grid)
4. Choose the Pen tool
5. Start drawing points on the canvas corresponding to the grid points. Follow the pattern outlined in the pictures following (each pointy end is where you click your pen tool on the canvas)
6. Choose the tool "convert anchor point"
7. Leave the 1st vertex alone, click the 2nd to the last vertex with the selected tool. The act of clicking on the vertex actually converts it to an anchor point causing the line to bend into a spiral like shape :)
(second vertex clicked)
(third vertex clicked)
(8th vertex clicked)
(last vertex clicked)
Conclusion:
Using design you can create a whole bunch of great shapes that you can then copy and paste into blend. I've grown to appreciate the powerful relationship between design and blend. I feel like there's nothing I can't achieve between these two tools.
I'll try to post more of these design tips over time, to-date I've been keeping them to myself BUT I'm starting to think that some of you guys out there may find them useful!
If you want the design file for my spiral here it is you lazy things :)
Till next time!






