<window x:class="MainWindow" xmlns:x="#unknown"> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <window.resources> <Style TargetType="Viewbox" x:Key="StyleViewBox"> <Style.Triggers> <trigger property="IsMouseOver" value="True"> <setter property="Width" value="100" /> <setter property="Height" value="100" /> </trigger> </Style.Triggers> </Style> </window.resources> <grid> <grid.rowdefinitions> <rowdefinition></rowdefinition> <rowdefinition></rowdefinition> <rowdefinition></rowdefinition> </grid.rowdefinitions> <toolbartray x:name="ToolTray" grid.row="0" grid.rowspan="2" removed="SkyBlue"> <toolbar band="0" bandindex="0"> <Button Background="Aqua" Height="25" Width="25" >0</Button> <Button Background="BlueViolet" Height="25" Width="25" >0</Button> <Button Background="CornflowerBlue" Height="25" Width="25">0</Button> </toolbar> <toolbar band="0" bandindex="1"> <Button Background="Aqua" Height="25" Width="25">1</Button> <Button Background="BlueViolet" Height="25" Width="25">1</Button> <Button Background="CornflowerBlue" Height="25" Width="25">1</Button> </toolbar> <toolbar band="0" bandindex="2"> <Button Background="Aqua" Height="25" Width="25">2</Button> <Button Background="BlueViolet" Height="25" Width="25">2</Button> <Button Background="CornflowerBlue" Height="25" Width="25">2</Button> </toolbar> <toolbar band="0" bandindex="3"> <Button Background="Aqua" Height="25" Width="25">3</Button> <Button Background="BlueViolet" Height="25" Width="25">3</Button> <Button Background="CornflowerBlue" Height="25" Width="25">3</Button> </toolbar> </toolbartray> <Button Grid.Row="2" Height="25" Width="80" Click="Button_Click_1">Orientation</Button> </grid> </window>
Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs) If (ToolTray.Orientation = Orientation.Horizontal) Then ToolTray.Orientation = Orientation.Vertical Else ToolTray.Orientation = Orientation.Horizontal End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)