Mar
25
Written by:
New Age Solution
3/25/2010 10:04 AM
PathListBox control comes with Blend 4 SDK in Silverlight 4. PathListBox allows any elements to be layed out along the path. Just imagine putting letters around the circle and then animating it.
DONWLOAD SOURCE
- Create SilverlightApplication project and open in Blend 4 and in Visual Studio 2010
- Add PathList Box control

- Add Ellipse control
- Right Click on Ellipse and convert it to path. (This is nice trick to use if you have control and want to convert to path so that it can be used by PathList Box)

- Click on PathListBox named pbox and choose Ellipse Path from above step as LayoutPath. NOTE here that when you choose Ellipse as LayoutPath it will ne RENAMED automatically called "path"

- In MainPage Add Following code
public MainPage()
{
InitializeComponent();
this.Loaded += (s, e) =>
{
string data = @"New Age Solution LLC";
pbox.ItemsSource = data.ToCharArray();
Storyboard1.Begin();
};
}
- F5 and run and see

- Go back to Blend 4 and let's animate the path
- Add Storyboard and create keyframes of about 3 seconds and change the scale to 2

- Right click on Keyframe at 3 second

- Choose your favorite Easing function

- F5 and RUN
2 comment(s) so far...
Re: Silverlight 4 PathListBox
I have visual studio 2010, do you have to have expression blend to execute the above code? Thanks.
By Flood Damage Cleanup on
10/25/2011 5:08 PM
|
Re: Silverlight 4 PathListBox
Nope you dont need blend.
By New Age Solution on
10/25/2011 5:08 PM
|