February 11th, 2009

How to use the Wrap Panel in the Silverlight ToolKit

All Silverlight Examples, Silverlight 2 tutorials, Silverlight Blend Tutorials, by Gavin Wignall.

If you want to use the controls talked about in this article you will need to get the free Custom Control Toolkit from Codeplex. You can read how to do this and install them in my post here.

You can download the example files for this article here.

This week I want to show the benefits of using the Wrap Panel. The Wrap Panel is an extension of the Stack Panel, with the additional feature of wrapping content either vertically or horizontally. Just like the Stack Panel the content can be switched on and off while the control updates the positioning visually.


The command for changing the orientation is exactly the same as the Stack Panel when looking at the XAML.

Orientation=“Horizontal”
Orientation=“Vertical”

However, when using the Expression Blend interface the option to switch between the two has been moved into the Common Properties area.

The only additional control that differs from the Stack Panel is also located within the Common Properties area. ‘ItemWidth‘ and ‘ItemHeight‘ are set by default to ‘Auto‘ but can be changed to set a maximum area for the items inside the Wrap Panel to adhere to.

Back Top

Responses to “How to use the Wrap Panel in the Silverlight ToolKit”

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Back Top