SpiralText in Silverlight 4

By Fons Sonnemans, 31-5-2010

Blend 4.0 includes a new PathListBox control. In Silverlight 4 you can create your own shapes by deriving from the Path class. I have used these two techniques to create this SpiralText sample.

The Spiral class uses ArcSegment objects to create a spiral illusion. It isn't a perfect spiral but it is good enough for me.

The LayoutPath of the PathListBox is set to the Spiral. The ItemsSource is databound to the TextBox.

You can also select the Font, Color, Font Size, Font Spacing and the number of Spirals.

Get Microsoft Silverlight

The Spiral class was all the code I hade to write. Everything else is done using XAML. You can download the sourcecode from here

Cheers,

Fons

Leave a Comment

Leave a Comment
Name
Comment
5 + 8 =

0 Comments

All postings/content on this blog are provided "AS IS" with no warranties, and confer no rights. All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer or sponsors. The content on this site is licensed under a Creative Commons Attribution By license.