зеркало из https://github.com/telerik/xaml-sdk.git
89 строки
4.4 KiB
XML
89 строки
4.4 KiB
XML
<Window x:Class="ShuttleControl.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
|
|
Title="ShuttleControl Example" Width="750" Height="600" Background="#E2E2E2">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel Grid.Row="0" Grid.Column="0" Margin="10">
|
|
<TextBlock Text="Database Objects" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Row="0" Grid.Column="2" Margin="10">
|
|
<TextBlock Text="Selected Database Objects" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Column="0" Grid.Row="1" Background="White" Margin="10 0 10 10" >
|
|
<telerik:RadTreeView x:Name="sourceTree"
|
|
BorderBrush="Black"
|
|
BorderThickness="1"
|
|
IsVirtualizing="True"
|
|
ItemsSource="{Binding TreeViewData}"
|
|
ItemTemplate="{StaticResource dataTemplate}"
|
|
ItemContainerStyle="{StaticResource nodeStyle}"
|
|
SelectionMode="Extended">
|
|
<telerik:EventToCommandBehavior.EventBindings>
|
|
<telerik:EventBinding Command="{Binding SelectionChangedCommand}" EventName="SelectionChanged" PassEventArgsToCommand="True"/>
|
|
</telerik:EventToCommandBehavior.EventBindings>
|
|
</telerik:RadTreeView>
|
|
</Grid>
|
|
|
|
<StackPanel Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" Margin="10 0 10 0">
|
|
<StackPanel Margin="0 0 0 12">
|
|
<telerik:RadButton Click="RadButton_Click_MoveItems" Width="90">
|
|
<Image Source="Images/MoveItems.png" Height="20"/>
|
|
</telerik:RadButton>
|
|
<TextBlock Text="Move" HorizontalAlignment="Center" FontSize="12"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Margin="0 0 0 12">
|
|
<telerik:RadButton Click="RadButton_Click_MoveAllItems" Width="90">
|
|
<Image Source="Images/MoveAllItems.png" Height="20"/>
|
|
</telerik:RadButton>
|
|
<TextBlock Text="Move All" HorizontalAlignment="Center" FontSize="12"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Margin="0 0 0 12">
|
|
<telerik:RadButton Click="RadButton_Click_ReturnAllItems" Width="90">
|
|
<Image Source="Images/RemoveAllItems.png" Height="20"/>
|
|
</telerik:RadButton>
|
|
<TextBlock Text="Remove All" HorizontalAlignment="Center" FontSize="12"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Margin="0 0 0 12">
|
|
<telerik:RadButton Click="RadButton_Click_ReturnItems" Width="90">
|
|
<Image Source="Images/RemoveItems.png" Height="20"/>
|
|
</telerik:RadButton>
|
|
<TextBlock Text="Remove" HorizontalAlignment="Center" FontSize="12"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Column="2" Grid.Row="1" Background="White" Margin="10 0 10 10" >
|
|
<telerik:RadTreeView x:Name="targetTree"
|
|
BorderBrush="Black"
|
|
BorderThickness="1"
|
|
IsVirtualizing="True"
|
|
ItemsSource="{Binding TreeViewData}"
|
|
ItemTemplate="{StaticResource dataTemplate}"
|
|
ItemContainerStyle="{StaticResource nodeStyle}"
|
|
SelectionMode="Extended">
|
|
<telerik:EventToCommandBehavior.EventBindings>
|
|
<telerik:EventBinding Command="{Binding SelectionChangedCommand}" EventName="SelectionChanged" PassEventArgsToCommand="True"/>
|
|
</telerik:EventToCommandBehavior.EventBindings>
|
|
</telerik:RadTreeView>
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|