<UserControl x:Class="DragCanvasTest.MainPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
             xmlns:dragDrop="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls"
             xmlns:local="clr-namespace:DragCanvasTest"
             mc:Ignorable="d"
             d:DesignWidth="640"
             d:DesignHeight="480">
    <Grid x:Name="LayoutRoot" Background="Black">
        <Grid.Resources>
            <DataTemplate x:Key="DragTemplate">
                <Image Source="{Binding ImgSource}"
                       Height="100"
                       Width="100"
                       Stretch="Fill" 
                       Opacity=".7"/>
            </DataTemplate>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="3*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" MinHeight="40" />
            <RowDefinition Height="6*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <TextBlock FontSize="24"
                   Margin="20,5,0,0"
                   Foreground="Red"
                   HorizontalAlignment="Left"
                   VerticalAlignment="Center"
                   Text="Drag and Drop Canvas" />

        <Canvas x:Name="CanvasOne"
                Margin="20"
                Background="Gray"
                Grid.Row="1"
                dragDrop:RadDragAndDropManager.AllowDrop="True">
        </Canvas>

        <ListBox x:Name="SourceBox"
                 Grid.Column="1"
                 Grid.Row="1"
                 Margin="20"
                 dragDrop:RadDragAndDropManager.AllowDrag="True">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding ItemName}"
                                   VerticalAlignment="Center"
                                   Margin="4" />
                        <Image Height="20"
                               Width="20"
                               Stretch="Fill"
                               VerticalAlignment="Center"
                               Source="{Binding ImgSource}"
                               Margin="4" />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        
    </Grid>
</UserControl>
