<UserControl x:Class="Showcase.WPF.DragDrop.Views.MixedSamples"
             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:dd="urn:gong-wpf-dragdrop"
             xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:models="clr-namespace:Showcase.WPF.DragDrop.Models"
             xmlns:viewModels="clr-namespace:Showcase.WPF.DragDrop.ViewModels"
             d:DataContext="{d:DesignInstance viewModels:MainViewModel}"
             d:DesignHeight="400"
             d:DesignWidth="600"
             mc:Ignorable="d">
    <Grid>
        <Grid.Resources>
            <Style BasedOn="{StaticResource DefaultItemsControl}" TargetType="{x:Type ItemsControl}" />
            <Style BasedOn="{StaticResource DefaultListBoxStyle}" TargetType="{x:Type ListBox}" />
            <Style BasedOn="{StaticResource DefaultListViewStyle}" TargetType="{x:Type ListView}" />
            <Style BasedOn="{StaticResource DefaultTreeViewStyle}" TargetType="{x:Type TreeView}" />
        </Grid.Resources>

        <TabControl x:Name="MixedTabControl" Style="{StaticResource ShowcaseTabControlStyle}">

            <TabControl.Resources>
                <DataTemplate x:Key="DragAdorner">
                    <Border Background="Silver"
                            BorderBrush="Gray"
                            BorderThickness="1"
                            CornerRadius="2"
                            SnapsToDevicePixels="True">
                        <StackPanel Margin="4" Orientation="Horizontal">
                            <iconPacks:PackIconMaterial VerticalAlignment="Center" Kind="MoveResizeVariant" />
                            <TextBlock Margin="6 0 0 0"
                                       VerticalAlignment="Center"
                                       Text="{Binding}" />
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </TabControl.Resources>

            <TabItem Header="DragAdorner">
                <DockPanel LastChildFill="True">
                    <TextBlock DockPanel.Dock="Top"
                               Style="{StaticResource SampleHeaderTextBlockStyle}"
                               Text="DragAdorner" />
                    <UniformGrid Columns="2" Rows="1">

                        <DockPanel LastChildFill="True">
                            <TextBlock DockPanel.Dock="Top"
                                       Style="{StaticResource DefaultTextBlockStyle}"
                                       Text="ListBox" />
                            <ListBox Height="Auto"
                                     dd:DragDrop.DragAdornerTemplate="{StaticResource DragAdorner}"
                                     dd:DragDrop.IsDragSource="True"
                                     dd:DragDrop.IsDropTarget="True"
                                     dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                     ItemsSource="{Binding Data.Collection1}" />
                        </DockPanel>

                        <DockPanel LastChildFill="True">
                            <TextBlock DockPanel.Dock="Top"
                                       Style="{StaticResource DefaultTextBlockStyle}"
                                       Text="ListView" />
                            <ListView Height="Auto"
                                      dd:DragDrop.DragAdornerTemplate="{StaticResource DragAdorner}"
                                      dd:DragDrop.IsDragSource="True"
                                      dd:DragDrop.IsDropTarget="True"
                                      dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                      ItemsSource="{Binding Data.Collection2}" />
                        </DockPanel>

                    </UniformGrid>
                </DockPanel>
            </TabItem>

            <TabItem Header="DragDropContext">
                <TabItem.Resources>
                    <Style BasedOn="{StaticResource DefaultListBoxStyle}" TargetType="{x:Type ListBox}">
                        <Setter Property="Height" Value="Auto" />
                    </Style>
                </TabItem.Resources>
                <DockPanel LastChildFill="True">
                    <TextBlock DockPanel.Dock="Top"
                               Style="{StaticResource SampleHeaderTextBlockStyle}"
                               Text="DragDropContext sample" />
                    <UniformGrid Columns="2" Rows="2">

                        <DockPanel LastChildFill="True">
                            <TextBlock DockPanel.Dock="Top"
                                       Style="{StaticResource DefaultTextBlockStyle}"
                                       Text="DragDropContext = MainContext" />
                            <ListBox Height="Auto"
                                     dd:DragDrop.DragDropContext="MainContext"
                                     dd:DragDrop.IsDragSource="True"
                                     dd:DragDrop.IsDropTarget="True"
                                     dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                     ItemsSource="{Binding Data.Collection1}" />
                        </DockPanel>

                        <DockPanel LastChildFill="True">
                            <TextBlock DockPanel.Dock="Top"
                                       Style="{StaticResource DefaultTextBlockStyle}"
                                       Text="DragDropContext = MainContext" />
                            <ListBox Height="Auto"
                                     dd:DragDrop.DragDropContext="MainContext"
                                     dd:DragDrop.IsDragSource="True"
                                     dd:DragDrop.IsDropTarget="True"
                                     dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                     ItemsSource="{Binding Data.Collection2}" />
                        </DockPanel>

                        <DockPanel LastChildFill="True">
                            <TextBlock DockPanel.Dock="Top"
                                       Style="{StaticResource DefaultTextBlockStyle}"
                                       Text="DragDropContext = DifferentContext" />
                            <ListBox Height="Auto"
                                     dd:DragDrop.DragDropContext="DifferentContext"
                                     dd:DragDrop.IsDragSource="True"
                                     dd:DragDrop.IsDropTarget="True"
                                     dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                     ItemsSource="{Binding Data.Collection2}" />
                        </DockPanel>

                        <DockPanel LastChildFill="True">
                            <TextBlock DockPanel.Dock="Top"
                                       Style="{StaticResource DefaultTextBlockStyle}"
                                       Text="No DragDropContext" />
                            <ListBox Height="Auto"
                                     dd:DragDrop.IsDragSource="True"
                                     dd:DragDrop.IsDropTarget="True"
                                     dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                     ItemsSource="{Binding Data.Collection4}" />
                        </DockPanel>

                    </UniformGrid>
                </DockPanel>
            </TabItem>

            <TabItem Header="Filtered">
                <DockPanel LastChildFill="True">
                    <TextBlock DockPanel.Dock="Top"
                               Style="{StaticResource SampleHeaderTextBlockStyle}"
                               Text="Filtered ListBox" />
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="Demonstrates the behaviour with a filtered and unfiltered ListBox bound to two collections of the same type." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <ListBox x:Name="LeftFilterListBox"
                                         Grid.Column="0"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                         ItemsSource="{Binding Data.FilterCollection1}" />
                                <ListBox Grid.Column="1"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         ItemsSource="{Binding Data.FilterCollection2}" />
                            </Grid>

                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="Customization (for left ListBox)" />
                            <CheckBox Margin="10 5"
                                      Command="{Binding FilterCollectionCommand, Mode=OneWay}"
                                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                                      Content="Filter by %2" />
                            <CheckBox Margin="10 5"
                                      Content="IsDragSource"
                                      IsChecked="{Binding ElementName=LeftFilterListBox, Path=(dd:DragDrop.IsDragSource), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <CheckBox Margin="10 5"
                                      Content="IsDropTarget"
                                      IsChecked="{Binding ElementName=LeftFilterListBox, Path=(dd:DragDrop.IsDropTarget), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <CheckBox Margin="10 5"
                                      Content="UseDefaultDragAdorner"
                                      IsChecked="{Binding ElementName=LeftFilterListBox, Path=(dd:DragDrop.UseDefaultDragAdorner), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <CheckBox Margin="10 5"
                                      Content="UseDefaultEffectDataTemplate"
                                      IsChecked="{Binding ElementName=LeftFilterListBox, Path=(dd:DragDrop.UseDefaultEffectDataTemplate), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        </StackPanel>
                    </ScrollViewer>
                </DockPanel>
            </TabItem>

            <TabItem Header="Custom styled ItemsControl">
                <DockPanel LastChildFill="True">
                    <TextBlock DockPanel.Dock="Top"
                               Style="{StaticResource SampleHeaderTextBlockStyle}"
                               Text="Custom styled ItemsControl" />
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="A custom styles ItemsControl on the left side. It's here to check if it works... yes, really." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <ItemsControl Grid.Column="0"
                                              dd:DragDrop.IsDragSource="True"
                                              dd:DragDrop.IsDropTarget="True"
                                              dd:DragDrop.UseDefaultDragAdorner="True"
                                              ItemsSource="{Binding Data.Collection1}">
                                    <ItemsControl.Style>
                                        <Style BasedOn="{StaticResource DefaultItemsControl}" TargetType="{x:Type ItemsControl}">
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="{x:Type ItemsControl}">
                                                        <Border Background="WhiteSmoke">
                                                            <ScrollViewer>
                                                                <ItemsPresenter />
                                                            </ScrollViewer>
                                                        </Border>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Style>
                                    </ItemsControl.Style>
                                    <ItemsControl.ItemTemplate>
                                        <DataTemplate>
                                            <Border Margin="4" Background="Bisque">
                                                <TextBlock Text="{Binding}" />
                                            </Border>
                                        </DataTemplate>
                                    </ItemsControl.ItemTemplate>
                                </ItemsControl>
                                <ListBox Grid.Column="1"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultDragAdorner="True"
                                         ItemsSource="{Binding Data.Collection2}" />
                            </Grid>
                        </StackPanel>
                    </ScrollViewer>
                </DockPanel>
            </TabItem>

            <TabItem Header="DragAdornerTemplateSelector">
                <TabItem.Resources>
                    <DataTemplate x:Key="Even">
                        <Border Background="Gainsboro"
                                BorderBrush="Silver"
                                BorderThickness="1"
                                CornerRadius="2">
                            <TextBlock Margin="2"
                                       FontWeight="Bold"
                                       Foreground="Green"
                                       Text="{Binding}" />
                        </Border>
                    </DataTemplate>
                    <DataTemplate x:Key="Odd">
                        <Border Background="Gainsboro"
                                BorderBrush="Silver"
                                BorderThickness="1"
                                CornerRadius="2">
                            <TextBlock Margin="2"
                                       FontWeight="Bold"
                                       Foreground="DodgerBlue"
                                       Text="{Binding}" />
                        </Border>
                    </DataTemplate>
                    <models:DragAdornerTemplateSelector x:Key="DragAdornerTemplateSelector"
                                                        TemplateEven="{StaticResource Even}"
                                                        TemplateOdd="{StaticResource Odd}" />
                    <DataTemplate x:Key="DropAdornerTemplate">
                        <Border Background="GhostWhite"
                                BorderBrush="Black"
                                BorderThickness="1">
                            <DockPanel LastChildFill="True">
                                <iconPacks:PackIconOcticons Margin="4"
                                                            VerticalAlignment="Center"
                                                            DockPanel.Dock="Left"
                                                            Kind="Hubot" />
                                <TextBlock Margin="4"
                                           FontSize="14"
                                           FontWeight="Bold"
                                           Foreground="Crimson"
                                           Text="{Binding}" />
                            </DockPanel>
                        </Border>
                    </DataTemplate>
                </TabItem.Resources>
                <DockPanel LastChildFill="True">
                    <TextBlock DockPanel.Dock="Top"
                               Style="{StaticResource SampleHeaderTextBlockStyle}"
                               Text="DragAdornerTemplateSelector" />
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="Demonstrates the usage of a DataTemplateSelector for the drag adorner." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <ListBox x:Name="LeftDataTemplateSelectorSampleListBox"
                                         Grid.Column="0"
                                         dd:DragDrop.DragAdornerTemplateSelector="{StaticResource DragAdornerTemplateSelector}"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                         ItemsSource="{Binding Data.Collection1}" />
                                <ListBox Grid.Column="1"
                                         dd:DragDrop.DropAdornerTemplate="{StaticResource DropAdornerTemplate}"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultDragAdorner="True"
                                         ItemsSource="{Binding Data.Collection2}" />
                            </Grid>

                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="Customization (for left ListBox)" />
                            <CheckBox Margin="10 5"
                                      Content="IsDragSource"
                                      IsChecked="{Binding ElementName=LeftDataTemplateSelectorSampleListBox, Path=(dd:DragDrop.IsDragSource), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <CheckBox Margin="10 5"
                                      Content="IsDropTarget"
                                      IsChecked="{Binding ElementName=LeftDataTemplateSelectorSampleListBox, Path=(dd:DragDrop.IsDropTarget), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <CheckBox Margin="10 5"
                                      Content="UseDefaultEffectDataTemplate"
                                      IsChecked="{Binding ElementName=LeftDataTemplateSelectorSampleListBox, Path=(dd:DragDrop.UseDefaultEffectDataTemplate), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        </StackPanel>
                    </ScrollViewer>
                </DockPanel>
            </TabItem>

            <TabItem Header="Cloning">
                <TabItem.Resources>
                    <Style x:Key="ClonableListBoxItemStyle"
                           BasedOn="{StaticResource DefaultListBoxItemStyle}"
                           TargetType="{x:Type ListBoxItem}">
                        <Setter Property="dd:DragDrop.DragSourceIgnore" Value="True" />
                    </Style>
                    <DataTemplate x:Key="CloningTemplate" DataType="{x:Type models:ClonableItemModel}">
                        <Border Background="Gainsboro"
                                BorderBrush="Gray"
                                BorderThickness="1"
                                CornerRadius="2"
                                SnapsToDevicePixels="True">
                            <StackPanel Margin="4" Orientation="Horizontal">
                                <iconPacks:PackIconMaterial dd:DragDrop.DragSourceIgnore="False"
                                                            Background="Transparent"
                                                            Cursor="SizeAll"
                                                            Kind="Drag" />
                                <TextBlock Margin="6 0 0 0"
                                           VerticalAlignment="Center"
                                           Text="{Binding Caption}" />
                            </StackPanel>
                        </Border>
                    </DataTemplate>
                </TabItem.Resources>
                <DockPanel LastChildFill="True">
                    <TextBlock DockPanel.Dock="Top"
                               Style="{StaticResource SampleHeaderTextBlockStyle}"
                               Text="Cloning" />
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="Demonstrates the cloning behaviour with 2 ListBoxes bound to collections of the same type. The Model of the collections implements the ICloneable interface. You can clone an Item by holding the CTRL key while drag and drop." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <ListBox x:Name="LeftClonableListBox"
                                         Grid.Column="0"
                                         HorizontalContentAlignment="Stretch"
                                         dd:DragDrop.DragAdornerTemplate="{StaticResource CloningTemplate}"
                                         dd:DragDrop.DragDropCopyKeyState="ControlKey"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                         ItemContainerStyle="{StaticResource ClonableListBoxItemStyle}"
                                         ItemTemplate="{StaticResource CloningTemplate}"
                                         ItemsSource="{Binding Data.ClonableCollection1}" />
                                <ListBox Grid.Column="1"
                                         HorizontalContentAlignment="Stretch"
                                         dd:DragDrop.DragAdornerTemplate="{StaticResource CloningTemplate}"
                                         dd:DragDrop.DragDropCopyKeyState="ControlKey"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         ItemContainerStyle="{StaticResource ClonableListBoxItemStyle}"
                                         ItemTemplate="{StaticResource CloningTemplate}"
                                         ItemsSource="{Binding Data.ClonableCollection2}" />
                            </Grid>

                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="Customization (for left ListBox)" />
                            <CheckBox Margin="10 5"
                                      Content="IsDragSource"
                                      IsChecked="{Binding ElementName=LeftClonableListBox, Path=(dd:DragDrop.IsDragSource), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <CheckBox Margin="10 5"
                                      Content="IsDropTarget"
                                      IsChecked="{Binding ElementName=LeftClonableListBox, Path=(dd:DragDrop.IsDropTarget), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <CheckBox Margin="10 5"
                                      Content="UseDefaultEffectDataTemplate"
                                      IsChecked="{Binding ElementName=LeftClonableListBox, Path=(dd:DragDrop.UseDefaultEffectDataTemplate), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        </StackPanel>
                    </ScrollViewer>
                </DockPanel>
            </TabItem>

            <TabItem Header="ItemsControl">
                <TabItem.Resources />
                <DockPanel LastChildFill="True">
                    <TextBlock DockPanel.Dock="Top"
                               Style="{StaticResource SampleHeaderTextBlockStyle}"
                               Text="Another ItemsControl sample" />
                    <DockPanel LastChildFill="True">
                        <TextBlock DockPanel.Dock="Top"
                                   Style="{StaticResource DefaultTextBlockStyle}"
                                   Text="Demonstrates the behaviour with an ItemsControl that has a DataTemplate with an ItemsControl and Buttons inside." />
                        <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                            <ItemsControl Height="Auto"
                                          dd:DragDrop.DragAdornerTemplate="{StaticResource DragAdorner}"
                                          dd:DragDrop.DragDropContext="OuterContext"
                                          dd:DragDrop.IsDragSource="True"
                                          dd:DragDrop.IsDropTarget="True"
                                          dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                          ItemsSource="{Binding Data.Collection1}">
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <Grid Margin="0 1 0 1" Background="Coral">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="Auto" />
                                            </Grid.RowDefinitions>
                                            <TextBlock Grid.Row="0"
                                                       Margin="2"
                                                       FontSize="16"
                                                       Text="{Binding}" />
                                            <ItemsControl Grid.Row="1"
                                                          Height="Auto"
                                                          dd:DragDrop.DragDropContext="InnerContext"
                                                          dd:DragDrop.IsDragSource="True"
                                                          dd:DragDrop.IsDropTarget="True"
                                                          ItemsSource="{Binding SubItemCollection, Mode=OneWay}">
                                                <ItemsControl.ItemTemplate>
                                                    <DataTemplate DataType="{x:Type models:SubItemModel}">
                                                        <Grid Background="#FDA07E">
                                                            <StackPanel Orientation="Horizontal">
                                                                <Button Margin="20 0 10 0"
                                                                        VerticalAlignment="Center"
                                                                        Command="{Binding ButtonTestCommand}"
                                                                        Content="{Binding Caption}" />
                                                                <RadioButton VerticalAlignment="Center"
                                                                             Content="Option A"
                                                                             IsChecked="{Binding BindableOptionA}" />
                                                                <RadioButton VerticalAlignment="Center"
                                                                             Content="Option B"
                                                                             IsChecked="{Binding BindableOptionB}" />
                                                                <TextBlock VerticalAlignment="Center" Text="{Binding BindableValue}" />
                                                            </StackPanel>
                                                        </Grid>
                                                    </DataTemplate>
                                                </ItemsControl.ItemTemplate>
                                            </ItemsControl>
                                        </Grid>
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </ItemsControl>
                        </ScrollViewer>
                    </DockPanel>
                </DockPanel>
            </TabItem>

            <TabItem Header="Outside">
                <TabItem.Resources />
                <DockPanel LastChildFill="True">
                    <StackPanel DockPanel.Dock="Top" Orientation="Vertical">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="Drag and drop from one App to another one." />
                        <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="Demonstrates drag and drop action bewteen one application to another one. Just open the other app and try to drag one or more items to this app or vice versa." />
                        <Button Margin="2"
                                Click="ButtonOpenAnotherAppOnClick"
                                Content="Open another application..." />
                    </StackPanel>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <Grid Grid.Row="0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <ListBox x:Name="LeftBoundListBox"
                                     Grid.Column="0"
                                     Height="Auto"
                                     dd:DragDrop.DragHandler="{Binding Data.SerializableDragHandler}"
                                     dd:DragDrop.DropHandler="{Binding Data.SerializableDropHandler}"
                                     dd:DragDrop.DropTargetAdornerBrush="BlueViolet"
                                     dd:DragDrop.IsDragSource="True"
                                     dd:DragDrop.IsDropTarget="True"
                                     dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                     ItemsSource="{Binding Data.SerializableCollection1}" />
                            <ListBox Grid.Column="1"
                                     Height="Auto"
                                     dd:DragDrop.DragHandler="{Binding Data.SerializableDragHandler}"
                                     dd:DragDrop.DropHandler="{Binding Data.SerializableDropHandler}"
                                     dd:DragDrop.DropTargetAdornerBrush="BlueViolet"
                                     dd:DragDrop.IsDragSource="True"
                                     dd:DragDrop.IsDropTarget="True"
                                     dd:DragDrop.ShowAlwaysDropTargetAdorner="True"
                                     dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                     ItemsSource="{Binding Data.SerializableCollection2}" />
                        </Grid>

                        <StackPanel Grid.Row="1">
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="Customization (for left ListBox)" />
                            <CheckBox Margin="10 5"
                                      Content="IsDragSource"
                                      IsChecked="{Binding ElementName=LeftBoundListBox, Path=(dd:DragDrop.IsDragSource), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <CheckBox Margin="10 5"
                                      Content="CanDragWithMouseRightButton"
                                      IsChecked="{Binding ElementName=LeftBoundListBox, Path=(dd:DragDrop.CanDragWithMouseRightButton), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <CheckBox Margin="10 5"
                                      Content="IsDropTarget"
                                      IsChecked="{Binding ElementName=LeftBoundListBox, Path=(dd:DragDrop.IsDropTarget), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <CheckBox Margin="10 5"
                                      Content="UseDefaultDragAdorner"
                                      IsChecked="{Binding ElementName=LeftBoundListBox, Path=(dd:DragDrop.UseDefaultDragAdorner), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <CheckBox Margin="10 5"
                                      Content="UseDefaultEffectDataTemplate"
                                      IsChecked="{Binding ElementName=LeftBoundListBox, Path=(dd:DragDrop.UseDefaultEffectDataTemplate), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        </StackPanel>
                    </Grid>
                </DockPanel>
            </TabItem>

            <TabItem Header="Keep Selection">
                <TabItem.Resources />
                <DockPanel LastChildFill="True">
                    <StackPanel DockPanel.Dock="Top" Orientation="Vertical">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="Keep selection after Drag and drop action." />
                    </StackPanel>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <Grid Grid.Row="0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <ListBox x:Name="LeftBoundKeepSelListBox"
                                     Grid.Column="0"
                                     Height="Auto"
                                     dd:DragDrop.DropTargetAdornerBrush="Crimson"
                                     dd:DragDrop.IsDragSource="True"
                                     dd:DragDrop.IsDropTarget="True"
                                     dd:DragDrop.SelectDroppedItems="True"
                                     dd:DragDrop.ShowAlwaysDropTargetAdorner="True"
                                     dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                     ItemsSource="{Binding Data.Collection1}" />
                            <ListView Grid.Column="1"
                                      Height="Auto"
                                      dd:DragDrop.DropTargetAdornerBrush="Crimson"
                                      dd:DragDrop.IsDragSource="True"
                                      dd:DragDrop.IsDropTarget="True"
                                      dd:DragDrop.SelectDroppedItems="True"
                                      dd:DragDrop.ShowAlwaysDropTargetAdorner="True"
                                      dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                      ItemsSource="{Binding Data.Collection2}">
                                <ListView.ItemTemplate>
                                    <DataTemplate>
                                        <DockPanel LastChildFill="True">
                                            <iconPacks:PackIconMaterial Margin="2"
                                                                        Focusable="False"
                                                                        Foreground="DarkOrange"
                                                                        Kind="CheckboxMarkedOutline" />
                                            <TextBlock Margin="2" Text="{Binding}" />
                                        </DockPanel>
                                    </DataTemplate>
                                </ListView.ItemTemplate>
                            </ListView>
                        </Grid>

                        <StackPanel Grid.Row="1">
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="Customization (for left ListBox)" />
                            <CheckBox Margin="10 5"
                                      Content="IsDragSource"
                                      IsChecked="{Binding ElementName=LeftBoundKeepSelListBox, Path=(dd:DragDrop.IsDragSource), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <CheckBox Margin="10 5"
                                      Content="UseDefaultDragAdorner"
                                      IsChecked="{Binding ElementName=LeftBoundKeepSelListBox, Path=(dd:DragDrop.UseDefaultDragAdorner), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <CheckBox Margin="10 5"
                                      Content="UseDefaultEffectDataTemplate"
                                      IsChecked="{Binding ElementName=LeftBoundKeepSelListBox, Path=(dd:DragDrop.UseDefaultEffectDataTemplate), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <CheckBox Margin="10 5"
                                      Content="ShowAlwaysDropTargetAdorner"
                                      IsChecked="{Binding ElementName=LeftBoundKeepSelListBox, Path=(dd:DragDrop.ShowAlwaysDropTargetAdorner), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <CheckBox Margin="10 5"
                                      Content="SelectDroppedItems"
                                      IsChecked="{Binding ElementName=LeftBoundKeepSelListBox, Path=(dd:DragDrop.SelectDroppedItems), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        </StackPanel>
                    </Grid>
                </DockPanel>
            </TabItem>

        </TabControl>

    </Grid>
</UserControl>