Allows you to switch between panels with the same children on the fly with animation support.
A SwitchPanel example. You change the current layout by setting ActiveLayoutIndex property to a new value.
<Window x:Class="SwitchPanelSample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
Title="SwitchPanelSample">
<Grid>
<xctk:SwitchPanel>
<xctk:SwitchPanel.Layouts>
<xctk:AutoStretchStackPanel Orientation="Horizontal" />
<xctk:AutoStretchStackPanel Orientation="Vertical" />
<xctk:Canvas />
<xctk:RadialCanvas />
<xctk:RandomPanel MinimumHeight="80"
MaximumHeight="300"
MaximumWidth="400"
MinimumWidth="80" />
<xctk:StackPanel Orientation="Horizontal"
Width="200" />
<xctk:StackPanel Orientation="Vertical" />
<xctk:WrapPanel Orientation="Horizontal" />
<xctk:WrapPanel Orientation="Vertical" />
</xctk:SwitchPanel.Layouts>
<Rectangle Margin="2, 2, 2, 2"
Width="300"
Height="300"
Fill="Red" />
<Rectangle Margin="2, 2, 2, 2"
Width="300"
Height="300"
Fill="Blue" />
<Rectangle Margin="2, 2, 2, 2"
Width="300"
Height="300"
Fill="Green" />
<Rectangle Margin="2, 2, 2, 2"
Width="300"
Height="300"
Fill="Orange" />
<Rectangle Margin="2, 2, 2, 2"
Width="300"
Height="300"
Fill="Purple" />
<Rectangle Margin="2, 2, 2, 2"
Width="300"
Height="300"
Fill="Yellow" />
</xctk:SwitchPanel>
</Grid>
</Window>
Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2