Search code examples
windows-phone-7silverlight-toolkit

WrapPanel for windows phone 7


I'm trying to add a WrapPanel to my app, up to now I found that WrapPanel is only available through SilverLight Toolkit here http://silverlight.codeplex.com/releases

I've downloaded it and installed it, but now what do I do?

I assumed that a reference needed to be added but I can't think of what to add.


Solution

  • Add a reference to Microsoft.Phone.Controls.Toolkit.dll. The WrapPanel control is in the Microsoft.Phone.Controls namespace.

    In your page/user control, add the following XML namespace declaration:

    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"

    Then you can add instances of <toolkit:WrapPanel /> in your XAML.