Using the WrapPanel from the Silverlight Toolkit on Windows Phone 7

by brad 20. March 2010 21:21

Update: You can now download a version of the Silverlight Toolkit that is specifically targeted towards Phone development at http://silverlight.codeplex.com/

I never get too far on a Silverlight project before I find myself reaching for a WrapPanel.  Unlike WPF, Silverlight does not come with a WrapPanel when you open the box from the store.  BUT … the Silverlight Toolkit has a great WrapPanel, along with a plethora of other great controls.

When I found myself wanting a WrapPanel for a Windows Phone 7 app, I was a bit worried that the Silverlight Toolkit might not work on the phone.  But my fears were unfounded … the WrapPanel works just great on a phone!  Well, to be fair, it runs great on a phone emulator. 

Here are the simple steps to get your WrapPanel, and anything else you might want from the Silverlight Toolkit, into your Windows Phone 7 app.

First, download and install the Silverlight 3 Toolkit from CodePlex.  There’s also a beta for Silverlight 4, but the phone runs 3, not 4.

The next step is to add a reference to the Toolkit assembly

image

On my machine, the default install path for the toolkit was C:\Program Files (x86)\Microsoft SDKs\Silverlight\v3.0\Toolkit\Nov09\Bin.  I would imagine you’ll find it in much the same place.  For the WrapPanel, the assembly you want is System.Windows.Controls.Toolkit.

image

That’s it!  After adding the reference, the WrapPanel will be available in your assets list, in the Controls category.  If for some odd reason it’s not there, you can expand the “Locations” tree and search directly in the “System.Windows.Controls.Toolkit.dll”.

image

Hooray … all the fun of the Silverlight Toolkit on the phone!

Tags:

Silverlight | Windows Phone

Comments

3/31/2010 9:57:04 AM #

trackback

Windows Phone 7 Series – Experiência para programadores (VII)

O manancial de informação sobre o desenvolvimento de aplicações para Windows Phone 7 não para de crescer

Alberto Silva

6/28/2010 11:31:36 PM #

pingback

Pingback from designersilverlight.com

Designer Silverlight  » Blog Archive   » Using WrapPanel and DockPanel in Windows Phone 7 With Blend

designersilverlight.com

11/27/2010 10:43:11 PM #

pingback

Pingback from cbmachinations.wordpress.com

Delayed but working | cbMachinations

cbmachinations.wordpress.com

Comments are closed

About Brad

Brad Tutterow lives in Illinois and works in Missouri. He has 12 years of experience developing web sites and Windows applications using a variety of technologies and is most excited currently about Silverlight, Windows Phone 7, Halo Reach, and Visual Studio 2010.