Telerik UI for Windows Phone by Progress

The RadWrapPanel control works as a StackPanel - it arranges its children one after another. The difference between the two is that when the available space in the order direction is exceeded, the RadWrapPanel control begins to place its child elements on the next line.

Tip
The RadWrapPanel control allows you to choose its order direction. To learn more read here.
Note

To use the RadWrapPanel control in your application you have to reference the following assembly:

  • Telerik.Windows.Controls.Primitives.dll

After adding references to the aforementioned dll, you can declare a new RadWrapPanel instance as any normal Silverlight control.

Note
Note that placing the RadWrapPanel control inside a ScrollViewer control will disable it from wrapping its children, as the ScrollViewer control provides the controls inside of it with additional space and thus will not limit the panel neither in height nor in width.
Note

To use the RadWrapPanel control in the XAML you have to add the following namespace declaration:

xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
CopyXAML
<telerikPrimitives:RadWrapPanel x:Name="radWrapPanel">
</telerikPrimitives:RadWrapPanel>

Here is an example of a RadWrapPanel control having several children and a Width of 300.

CopyXAML
<telerikPrimitives:RadWrapPanel x:Name="radWrapPanel" Width="300">
<Border BorderBrush="White" BorderThickness="1" Width="100" Height="100" />
<Border BorderBrush="White" BorderThickness="1" Width="100" Height="100" />
<Border BorderBrush="White" BorderThickness="1" Width="100" Height="100" />
<Border BorderBrush="White" BorderThickness="1" Width="100" Height="100" />
<Border BorderBrush="White" BorderThickness="1" Width="100" Height="100" />
</telerikPrimitives:RadWrapPanel>

Here is a snapshot of the result.

Wrap Panel-Getting Started-01