<UserControl x:Class="Showcase.WPF.DragDrop.Views.Issues"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:customControls="clr-namespace:Showcase.WPF.DragDrop.CustomControls"
             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 Style="{StaticResource ShowcaseTabControlStyle}">
            <TabItem Header="#123">
                <TabItem.Resources>
                    <DataTemplate x:Key="FlowDocDataTemplate">
                        <FlowDocumentScrollViewer HorizontalScrollBarVisibility="Disabled"
                                                  IsHitTestVisible="False"
                                                  IsSelectionEnabled="False"
                                                  VerticalScrollBarVisibility="Disabled">
                            <FlowDocument PagePadding="0">
                                <Paragraph>
                                    <TextBlock Text="FlowDocument for" />
                                    <LineBreak />
                                    <TextBlock Text="{Binding}" />
                                </Paragraph>
                            </FlowDocument>
                        </FlowDocumentScrollViewer>
                    </DataTemplate>
                </TabItem.Resources>
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="FlowDocument in ItemTemplate" />
                        <Button CommandParameter="123"
                                Style="{StaticResource GitHubIssueButtonStyle}"
                                ToolTip="Open #123 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="ListBox with ItemTemplate which contains a FlowDocument." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <ListBox x:Name="LeftIssue123ListBox"
                                         Grid.Column="0"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultDragAdorner="False"
                                         ItemTemplate="{StaticResource FlowDocDataTemplate}"
                                         ItemsSource="{Binding Data.Collection1}" />
                                <ListBox Grid.Column="1"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultDragAdorner="False"
                                         ItemTemplate="{StaticResource FlowDocDataTemplate}"
                                         ItemsSource="{Binding Data.Collection2}" />
                            </Grid>

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

            <TabItem Header="#42">
                <TabItem.Resources>
                    <DataTemplate x:Key="LabelDataTemplate">
                        <Label Content="{Binding}" />
                    </DataTemplate>
                </TabItem.Resources>
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="Crash when using items deriving from ContentControl" />
                        <Button CommandParameter="42"
                                Style="{StaticResource GitHubIssueButtonStyle}"
                                ToolTip="Open #42 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="ListBox with ItemTemplate which contains a Label." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <ListBox x:Name="LeftIssue42ListBox"
                                         Grid.Column="0"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultDragAdorner="True"
                                         ItemTemplate="{StaticResource LabelDataTemplate}"
                                         ItemsSource="{Binding Data.Collection1}" />
                                <ListBox Grid.Column="1"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultDragAdorner="False"
                                         ItemTemplate="{StaticResource LabelDataTemplate}"
                                         ItemsSource="{Binding Data.Collection2}" />
                            </Grid>

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

            <TabItem Header="#37">
                <TabItem.Resources>
                    <DataTemplate x:Key="Issue37DataTemplate" DataType="{x:Type models:ItemModel}">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" SharedSizeGroup="Col01" />
                                <ColumnDefinition Width="Auto" SharedSizeGroup="Col02" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0"
                                       Margin="2"
                                       VerticalAlignment="Center"
                                       Text="{Binding Path=Caption, Mode=OneWay}" />
                            <TextBox Grid.Column="1"
                                     MinWidth="60"
                                     Margin="2"
                                     VerticalAlignment="Center"
                                     Text="{Binding Path=BindableDoubleValue, Mode=OneWay, StringFormat={}{0:n2} %}" />
                            <Slider Grid.Column="2"
                                    Margin="2"
                                    VerticalAlignment="Center"
                                    LargeChange="10"
                                    Maximum="100"
                                    Minimum="0"
                                    SmallChange="5"
                                    Value="{Binding Path=BindableDoubleValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        </Grid>
                    </DataTemplate>
                </TabItem.Resources>
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="Slider in list item can't be changed" />
                        <Button CommandParameter="37"
                                Style="{StaticResource GitHubIssueButtonStyle}"
                                ToolTip="Open #37 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="ListBox with ItemTemplate which contains other controls. This controls also gets the mouse input, so drag action should not be started." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <ListBox x:Name="LeftIssue37ListBox"
                                         Grid.Column="0"
                                         HorizontalContentAlignment="Stretch"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultDragAdorner="True"
                                         Grid.IsSharedSizeScope="True"
                                         ItemTemplate="{StaticResource Issue37DataTemplate}"
                                         ItemsSource="{Binding Data.Collection1}" />
                                <ListBox Grid.Column="1"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultDragAdorner="False"
                                         ItemsSource="{Binding Data.Collection2}" />
                            </Grid>

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

            <TabItem Header="#65">
                <TabItem.Resources>
                    <Style x:Key="CustomTreeViewItemStyle" TargetType="{x:Type TreeViewItem}">
                        <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
                        <Setter Property="Padding" Value="2" />
                    </Style>
                    <HierarchicalDataTemplate x:Key="CustomTreeViewItemTemplate"
                                              DataType="{x:Type models:TreeNode}"
                                              ItemsSource="{Binding Children}">
                        <TextBlock Text="{Binding Caption}" />
                    </HierarchicalDataTemplate>
                </TabItem.Resources>
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="TreeViewItem with ItemSource" />
                        <Button CommandParameter="65"
                                Style="{StaticResource GitHubIssueButtonStyle}"
                                ToolTip="Open #65 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="TreeView with a TreeViewItem which binds the ItemSource to a Collection." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <TreeView x:Name="LeftIssue65TreeView"
                                          Grid.Column="0"
                                          HorizontalContentAlignment="Stretch"
                                          dd:DragDrop.IsDragSource="True"
                                          dd:DragDrop.IsDropTarget="True"
                                          dd:DragDrop.UseDefaultDragAdorner="True"
                                          Grid.IsSharedSizeScope="True"
                                          ItemContainerStyle="{StaticResource CustomTreeViewItemStyle}"
                                          ItemTemplate="{StaticResource CustomTreeViewItemTemplate}">
                                    <TreeViewItem Header="A TreeViewItem with ItemsSource"
                                                  ItemContainerStyle="{StaticResource CustomTreeViewItemStyle}"
                                                  ItemTemplate="{StaticResource CustomTreeViewItemTemplate}"
                                                  ItemsSource="{Binding Data.TreeCollection1}" />
                                </TreeView>
                                <TreeView Grid.Column="1"
                                          dd:DragDrop.IsDragSource="True"
                                          dd:DragDrop.IsDropTarget="True"
                                          dd:DragDrop.UseDefaultDragAdorner="False"
                                          ItemContainerStyle="{StaticResource CustomTreeViewItemStyle}"
                                          ItemTemplate="{StaticResource CustomTreeViewItemTemplate}">
                                    <TreeViewItem Header="A TreeViewItem with sub item"
                                                  ItemContainerStyle="{StaticResource CustomTreeViewItemStyle}"
                                                  ItemTemplate="{StaticResource CustomTreeViewItemTemplate}">
                                        <TreeViewItem Header="Another TreeViewItem with ItemsSource"
                                                      ItemContainerStyle="{StaticResource CustomTreeViewItemStyle}"
                                                      ItemTemplate="{StaticResource CustomTreeViewItemTemplate}"
                                                      ItemsSource="{Binding Data.TreeCollection2}" />
                                    </TreeViewItem>
                                </TreeView>
                            </Grid>

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

            <TabItem Header="#30">
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="No support for derived item container classes" />
                        <Button CommandParameter="30"
                                Style="{StaticResource GitHubIssueButtonStyle}"
                                ToolTip="Open #30 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="Derived ListBox on left side and a original ListView on the right side." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <customControls:CustomListBox x:Name="LeftIssue30ListBox"
                                                              Grid.Column="0"
                                                              dd:DragDrop.IsDragSource="True"
                                                              dd:DragDrop.IsDropTarget="True"
                                                              dd:DragDrop.UseDefaultDragAdorner="True"
                                                              ItemsSource="{Binding Data.Collection1}"
                                                              Style="{StaticResource DefaultListBoxStyle}" />
                                <ListView Grid.Column="1"
                                          dd:DragDrop.IsDragSource="True"
                                          dd:DragDrop.IsDropTarget="True"
                                          dd:DragDrop.UseDefaultDragAdorner="True"
                                          ItemsSource="{Binding Data.Collection2}">
                                    <ListView.View>
                                        <GridView>
                                            <GridViewColumn>
                                                <GridViewColumn.CellTemplate>
                                                    <DataTemplate>
                                                        <iconPacks:PackIconMaterial Focusable="False"
                                                                                    Foreground="Gold"
                                                                                    Kind="Star" />
                                                    </DataTemplate>
                                                </GridViewColumn.CellTemplate>
                                            </GridViewColumn>
                                            <GridViewColumn>
                                                <GridViewColumn.CellTemplate>
                                                    <DataTemplate>
                                                        <TextBlock Text="{Binding}" />
                                                    </DataTemplate>
                                                </GridViewColumn.CellTemplate>
                                            </GridViewColumn>
                                        </GridView>
                                    </ListView.View>
                                </ListView>
                            </Grid>

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

            <TabItem Header="#73">
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="Crash on click inside empty ItemsControl" />
                        <Button CommandParameter="73"
                                Style="{StaticResource GitHubPullRequestButtonStyle}"
                                ToolTip="Open #73 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="Empty ItemsControl with custom template on left side and a ListBox on the right side." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <ItemsControl x:Name="LeftItemsControlIssue73"
                                              Grid.Column="0"
                                              dd:DragDrop.IsDragSource="True"
                                              dd:DragDrop.IsDropTarget="True"
                                              dd:DragDrop.UseDefaultDragAdorner="True"
                                              ItemsSource="{Binding Data.Collection3}">
                                    <ItemsControl.ItemTemplate>
                                        <DataTemplate>
                                            <StackPanel Margin="2"
                                                        Background="Transparent"
                                                        Orientation="Horizontal">
                                                <iconPacks:PackIconMaterial VerticalAlignment="Center" Kind="Cart" />
                                                <Label VerticalAlignment="Center" Content="{Binding}" />
                                            </StackPanel>
                                        </DataTemplate>
                                    </ItemsControl.ItemTemplate>
                                </ItemsControl>
                                <ListBox Grid.Column="1"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultDragAdorner="True"
                                         ItemsSource="{Binding Data.Collection1}" />
                            </Grid>

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

            <TabItem Header="#64">
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="ItemsControl itself doesn't work" />
                        <Button CommandParameter="64"
                                Style="{StaticResource GitHubIssueButtonStyle}"
                                ToolTip="Open #64 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="An ItemsControl with a trigger for mouse over." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <ItemsControl x:Name="LeftItemsControlIssue64"
                                              Grid.Column="0"
                                              dd:DragDrop.IsDragSource="True"
                                              dd:DragDrop.IsDropTarget="True"
                                              ItemsSource="{Binding Data.Collection1}">
                                    <ItemsControl.ItemTemplate>
                                        <DataTemplate>
                                            <Grid Background="Transparent">
                                                <StackPanel Margin="2" Orientation="Horizontal">
                                                    <iconPacks:PackIconMaterial VerticalAlignment="Center" Kind="EmoticonCool" />
                                                    <Label VerticalAlignment="Center" Content="{Binding}" />
                                                </StackPanel>
                                                <Grid x:Name="SpecialMouseOver"
                                                      HorizontalAlignment="Right"
                                                      Background="Silver"
                                                      Opacity="0">
                                                    <iconPacks:PackIconMaterial Margin="10 0 10 0"
                                                                                HorizontalAlignment="Center"
                                                                                VerticalAlignment="Center"
                                                                                Kind="ThumbUp" />
                                                </Grid>
                                            </Grid>
                                            <DataTemplate.Triggers>
                                                <EventTrigger RoutedEvent="Control.MouseEnter">
                                                    <BeginStoryboard>
                                                        <Storyboard>
                                                            <DoubleAnimation Storyboard.TargetName="SpecialMouseOver"
                                                                             Storyboard.TargetProperty="Opacity"
                                                                             To="0.8"
                                                                             Duration="0:0:0.3" />
                                                        </Storyboard>
                                                    </BeginStoryboard>
                                                </EventTrigger>
                                                <EventTrigger RoutedEvent="Control.MouseLeave">
                                                    <BeginStoryboard>
                                                        <Storyboard>
                                                            <DoubleAnimation Storyboard.TargetName="SpecialMouseOver"
                                                                             Storyboard.TargetProperty="Opacity"
                                                                             To="0"
                                                                             Duration="0:0:0.3" />
                                                        </Storyboard>
                                                    </BeginStoryboard>
                                                </EventTrigger>
                                            </DataTemplate.Triggers>
                                        </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>

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

            <TabItem Header="#85">
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="Drop to Control which is not an ItemsControl" />
                        <Button CommandParameter="85"
                                Style="{StaticResource GitHubIssueButtonStyle}"
                                ToolTip="Open #85 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="You can drag and drop items to any other Control with a custom DropHandler." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <ListBox x:Name="LeftIssue85ListBox"
                                         Grid.Column="0"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         ItemsSource="{Binding Data.Collection1}" />
                                <Grid Grid.Column="1" Margin="4">
                                    <TextBox Height="150"
                                             dd:DragDrop.DropHandler="{Binding Data.TextBoxCustomDropHandler}"
                                             dd:DragDrop.IsDropTarget="True"
                                             Text="Drop any item on this TextBox..."
                                             TextWrapping="Wrap"
                                             VerticalScrollBarVisibility="Auto" />
                                </Grid>
                            </Grid>
                        </StackPanel>
                    </ScrollViewer>
                </DockPanel>
            </TabItem>

            <TabItem Header="#84">
                <TabItem.Resources>
                    <DataTemplate x:Key="Issue84DataTemplate" DataType="{x:Type models:ItemModel}">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" SharedSizeGroup="Col01" />
                                <ColumnDefinition Width="Auto" SharedSizeGroup="Col02" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0"
                                       Margin="2"
                                       VerticalAlignment="Center"
                                       Text="{Binding Path=Caption, Mode=OneWay}" />
                            <TextBox Grid.Column="1"
                                     MinWidth="70"
                                     Margin="2"
                                     VerticalAlignment="Center"
                                     Text="{Binding Path=SelectedSubItem, Mode=OneWay}" />
                            <ComboBox Grid.Column="2"
                                      Margin="2"
                                      VerticalAlignment="Center"
                                      ItemsSource="{Binding Path=SubItemCollection, Mode=OneWay}"
                                      SelectedValue="{Binding Path=SelectedSubItem, TargetNullValue={x:Null}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        </Grid>
                    </DataTemplate>
                </TabItem.Resources>
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="ComboBox in list item can't be used" />
                        <Button CommandParameter="84"
                                Style="{StaticResource GitHubIssueButtonStyle}"
                                ToolTip="Open #84 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="ListBox with ItemTemplate which contains other controls. This controls also gets the mouse input, so drag action should not be started." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <ListBox x:Name="LeftIssue84ListBox"
                                         Grid.Column="0"
                                         HorizontalContentAlignment="Stretch"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultDragAdorner="True"
                                         Grid.IsSharedSizeScope="True"
                                         ItemTemplate="{StaticResource Issue84DataTemplate}"
                                         ItemsSource="{Binding Data.Collection1}" />
                                <ListBox Grid.Column="1"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultDragAdorner="False"
                                         ItemsSource="{Binding Data.Collection2}" />
                            </Grid>

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

            <TabItem Header="#88">
                <TabItem.Resources>
                    <Style x:Key="CustomTreeViewItemStyle" TargetType="{x:Type TreeViewItem}">
                        <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
                        <Setter Property="ItemsPanel">
                            <Setter.Value>
                                <ItemsPanelTemplate>
                                    <WrapPanel Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=ItemsPresenter}}" Orientation="Horizontal" />
                                </ItemsPanelTemplate>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="Padding" Value="2" />
                    </Style>
                    <HierarchicalDataTemplate x:Key="CustomTreeViewItemTemplate"
                                              DataType="{x:Type models:TreeNode}"
                                              ItemsSource="{Binding Children}">
                        <TextBlock Text="{Binding Caption}" />
                    </HierarchicalDataTemplate>
                </TabItem.Resources>
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="Complex ItemsPanel inside TreeViewItem" />
                        <Button CommandParameter="88"
                                Style="{StaticResource GitHubIssueButtonStyle}"
                                ToolTip="Open #88 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="TreeView with a TreeViewItem which binds the ItemSource to a Collection." />
                            <TreeView HorizontalContentAlignment="Stretch"
                                      dd:DragDrop.IsDragSource="True"
                                      dd:DragDrop.IsDropTarget="True"
                                      dd:DragDrop.UseDefaultDragAdorner="True"
                                      ItemContainerStyle="{StaticResource CustomTreeViewItemStyle}"
                                      ItemTemplate="{StaticResource CustomTreeViewItemTemplate}"
                                      ItemsSource="{Binding Data.TreeCollection1}"
                                      ScrollViewer.HorizontalScrollBarVisibility="Disabled" />
                        </StackPanel>
                    </ScrollViewer>
                </DockPanel>
            </TabItem>

            <TabItem Header="#188">
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="Wrong item gets dragged on drag start" />
                        <Button CommandParameter="188"
                                Style="{StaticResource GitHubIssueButtonStyle}"
                                ToolTip="Open #188 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="Wrong (next) item gets dragged when starting dragging in lower half of item." />
                            <ItemsControl Height="NaN"
                                          dd:DragDrop.DefaultDragAdornerOpacity="0.6"
                                          dd:DragDrop.IsDragSource="True"
                                          dd:DragDrop.IsDropTarget="True"
                                          dd:DragDrop.UseDefaultDragAdorner="True">
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate DataType="{x:Type models:ItemModel}">
                                        <GroupBox Margin="0 5 0 5" Background="Transparent">
                                            <GroupBox.Header>
                                                <TextBlock>
                                                    <Run Text="Item " />
                                                    <Run Text="{Binding Caption, Mode=OneWay}" />
                                                </TextBlock>
                                            </GroupBox.Header>
                                            <Grid Margin="10">
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto" />
                                                </Grid.RowDefinitions>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="*" />
                                                    <ColumnDefinition Width="Auto" />
                                                </Grid.ColumnDefinitions>

                                                <ComboBox Grid.Column="0"
                                                          Height="25"
                                                          MinWidth="70"
                                                          Margin="10 0 0 0"
                                                          VerticalAlignment="Center"
                                                          ItemsSource="{Binding SubItemCollection, Mode=OneWay}"
                                                          SelectedValue="{Binding Path=SelectedSubItem, TargetNullValue={x:Null}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                                <Button Grid.Column="1"
                                                        Width="70"
                                                        Margin="30 0 0 0"
                                                        HorizontalAlignment="Right"
                                                        VerticalAlignment="Center"
                                                        Content="..." />
                                            </Grid>
                                        </GroupBox>
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>

                                <models:ItemModel Caption="1" />
                                <models:ItemModel Caption="2" />
                                <models:ItemModel Caption="3" />
                                <models:ItemModel Caption="4" />

                            </ItemsControl>
                        </StackPanel>
                    </ScrollViewer>
                </DockPanel>
            </TabItem>

            <TabItem Header="#146">
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="Library throws 'The specified Visual is not an ancestor of this Visual'" />
                        <Button CommandParameter="146"
                                Style="{StaticResource GitHubIssueButtonStyle}"
                                ToolTip="Open #146 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="This is a more complex sample with nested controls." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <ListView Grid.Column="0"
                                          Height="450"
                                          Margin="4"
                                          dd:DragDrop.DragDropContext="OuterContext"
                                          dd:DragDrop.IsDragSource="True"
                                          dd:DragDrop.IsDropTarget="True"
                                          ItemsSource="{Binding Data.TreeCollection1}">
                                    <ListView.ItemTemplate>
                                        <DataTemplate>
                                            <Grid>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition />
                                                    <RowDefinition />
                                                </Grid.RowDefinitions>
                                                <Label Grid.Row="0" Content="{Binding Caption}" />
                                                <!--  This nested ListView contains some items and problem occurs when I start dragging parent item from position in nested ListView OR dragging other item ovet this item  -->
                                                <ListView Grid.Row="1"
                                                          Height="NaN"
                                                          MinWidth="100"
                                                          MinHeight="25"
                                                          AllowDrop="False"
                                                          ItemsSource="{Binding Children}"
                                                          ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                                          ScrollViewer.VerticalScrollBarVisibility="Disabled" />
                                            </Grid>
                                        </DataTemplate>
                                    </ListView.ItemTemplate>
                                </ListView>
                                <ListView Grid.Column="1"
                                          Height="450"
                                          Margin="4"
                                          dd:DragDrop.DragDropContext="OuterContext"
                                          dd:DragDrop.IsDragSource="True"
                                          dd:DragDrop.IsDropTarget="True"
                                          ItemsSource="{Binding Data.TreeCollection2}">
                                    <ListView.ItemTemplate>
                                        <DataTemplate>
                                            <Grid AllowDrop="True">
                                                <Grid.RowDefinitions>
                                                    <RowDefinition />
                                                    <RowDefinition />
                                                </Grid.RowDefinitions>
                                                <Label Grid.Row="0" Content="{Binding Caption}" />
                                                <ListView Grid.Row="1"
                                                          Height="NaN"
                                                          MinWidth="100"
                                                          MinHeight="25"
                                                          dd:DragDrop.DragDropContext="InnerContext"
                                                          dd:DragDrop.IsDragSource="True"
                                                          dd:DragDrop.IsDropTarget="True"
                                                          ItemsSource="{Binding Children}"
                                                          ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                                          ScrollViewer.VerticalScrollBarVisibility="Disabled" />
                                            </Grid>
                                        </DataTemplate>
                                    </ListView.ItemTemplate>
                                </ListView>
                            </Grid>

                        </StackPanel>
                    </ScrollViewer>
                </DockPanel>
            </TabItem>

            <TabItem Header="#58">
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="Always Show DragAdorner While Dragging Regardless of Location" />
                        <Button CommandParameter="58"
                                Style="{StaticResource GitHubIssueButtonStyle}"
                                ToolTip="Open #58 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="This sample shows a workaround for this issue until a better way is available. The left ListBox uses a custom DropHandler to allow always shown DragAdorner and disabled drop." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <ListBox x:Name="LeftBoundListBox"
                                         Grid.Column="0"
                                         dd:DragDrop.DropHandler="{Binding Data.ListBoxCustomDropHandler}"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultDragAdorner="True"
                                         dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                         ItemsSource="{Binding Data.Collection1}" />
                                <ListBox Grid.Column="1"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True"
                                         dd:DragDrop.UseDefaultDragAdorner="True"
                                         dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                         ItemsSource="{Binding Data.Collection2}" />
                            </Grid>

                            <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="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>
                    </ScrollViewer>
                </DockPanel>
            </TabItem>

            <TabItem Header="#248">
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="Fix IDropInfo.Data when dragging from an ItemsControl using a CollectionViewSource with groups" />
                        <Button CommandParameter="248"
                                Style="{StaticResource GitHubPullRequestButtonStyle}"
                                ToolTip="Open #248 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="When dragging an item from an ItemsControl using a CollectionViewSource with groups, IDropInfo.Data was incorrectly referencing the item's group and not the item itself, causing unexpected behavior." />
                            <Grid>
                                <ItemsControl x:Name="LeftItemsControlIssue248"
                                              dd:DragDrop.DropHandler="{Binding Data.GroupedDropHandler}"
                                              dd:DragDrop.IsDragSource="True"
                                              dd:DragDrop.IsDropTarget="True"
                                              dd:DragDrop.UseDefaultEffectDataTemplate="True"
                                              DisplayMemberPath="Caption"
                                              ItemsSource="{Binding Data.GroupedItemsCollectionViewSource}">
                                    <ItemsControl.GroupStyle>
                                        <GroupStyle>
                                            <GroupStyle.HeaderTemplate>
                                                <DataTemplate>
                                                    <TextBlock Text="{Binding Name}" />
                                                </DataTemplate>
                                            </GroupStyle.HeaderTemplate>
                                        </GroupStyle>
                                    </ItemsControl.GroupStyle>
                                </ItemsControl>
                            </Grid>

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

            <TabItem Header="#244">
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="Dragging an item over a nested ListView which is not a DropTarget will use it as target instead of parent" />
                        <Button CommandParameter="244"
                                Style="{StaticResource GitHubIssueButtonStyle}"
                                ToolTip="Open #244 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="This is a more complex sample with nested controls." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <ListView Grid.Column="0"
                                          Height="450"
                                          Margin="4"
                                          dd:DragDrop.DragDropContext="OuterContext"
                                          dd:DragDrop.IsDragSource="True"
                                          dd:DragDrop.IsDropTarget="True"
                                          ItemsSource="{Binding Data.TreeCollection1}">
                                    <ListView.ItemTemplate>
                                        <DataTemplate>
                                            <Grid>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition />
                                                    <RowDefinition />
                                                </Grid.RowDefinitions>
                                                <Label Grid.Row="0" Content="{Binding Caption}" />
                                                <!--  This nested ListView contains some items and problem occurs when I start dragging parent item from position in nested ListView OR dragging other item ovet this item  -->
                                                <ListView Grid.Row="1"
                                                          Height="NaN"
                                                          MinWidth="100"
                                                          MinHeight="25"
                                                          AllowDrop="False"
                                                          ItemsSource="{Binding Children}"
                                                          ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                                          ScrollViewer.VerticalScrollBarVisibility="Disabled" />
                                            </Grid>
                                        </DataTemplate>
                                    </ListView.ItemTemplate>
                                </ListView>
                                <ListView Grid.Column="1"
                                          Height="450"
                                          Margin="4"
                                          dd:DragDrop.DragDropContext="OuterContext"
                                          dd:DragDrop.DropHandler="{Binding Data.NestedDropHandler}"
                                          dd:DragDrop.IsDragSource="True"
                                          dd:DragDrop.IsDropTarget="True"
                                          ItemsSource="{Binding Data.TreeCollection2}">
                                    <ListView.ItemTemplate>
                                        <DataTemplate>
                                            <Grid AllowDrop="True">
                                                <Grid.RowDefinitions>
                                                    <RowDefinition />
                                                    <RowDefinition />
                                                </Grid.RowDefinitions>
                                                <Label Grid.Row="0" Content="{Binding Caption}" />
                                                <ListView Grid.Row="1"
                                                          Height="NaN"
                                                          MinWidth="100"
                                                          MinHeight="25"
                                                          ItemsSource="{Binding Children}"
                                                          ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                                          ScrollViewer.VerticalScrollBarVisibility="Disabled" />
                                            </Grid>
                                        </DataTemplate>
                                    </ListView.ItemTemplate>
                                </ListView>
                            </Grid>

                        </StackPanel>
                    </ScrollViewer>
                </DockPanel>
            </TabItem>

            <TabItem Header="#296">
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="DropTargetInsertionAdorner is too short" />
                        <Button CommandParameter="296"
                                Style="{StaticResource GitHubPullRequestButtonStyle}"
                                ToolTip="Open #296 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="ViewportWidth is sometimes not right at the time of non-indication ScrollBar." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>

                                <ListView MinWidth="150"
                                          dd:DragDrop.IsDragSource="True"
                                          dd:DragDrop.IsDropTarget="True"
                                          dd:DragDrop.UseDefaultEffectDataTemplate="True">
                                    <ListViewItem>Unbound Item1</ListViewItem>
                                    <ListViewItem>Unbound Item2</ListViewItem>
                                    <ListViewItem>Unbound Item3</ListViewItem>
                                    <ListViewItem>Unbound Item4</ListViewItem>
                                    <ListViewItem>Unbound Item5</ListViewItem>
                                </ListView>
                            </Grid>
                        </StackPanel>
                    </ScrollViewer>
                </DockPanel>
            </TabItem>

            <TabItem Header="TLCGen">
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <TextBlock Style="{StaticResource SampleHeaderTextBlockStyle}" Text="TLCGen sample from @mennowo" />
                        <Button CommandParameter="https://github.com/mennowo/TLCGen"
                                Style="{StaticResource OpenLinkButtonStyle}"
                                ToolTip="Open TLCGen on Github" />
                    </Grid>
                    <ListView Margin="2"
                              dd:DragDrop.DropHandler="{Binding}"
                              dd:DragDrop.IsDragSource="True"
                              dd:DragDrop.IsDropTarget="True"
                              dd:DragDrop.UseDefaultDragAdorner="True"
                              dd:DragDrop.UseDefaultEffectDataTemplate="True"
                              AlternationCount="2"
                              ItemsSource="{Binding Path=Data.Collection1}"
                              ScrollViewer.VerticalScrollBarVisibility="Disabled">
                        <ListView.ItemsPanel>
                            <ItemsPanelTemplate>
                                <WrapPanel Orientation="Vertical" />
                            </ItemsPanelTemplate>
                        </ListView.ItemsPanel>
                        <ListView.ItemContainerStyle>
                            <Style TargetType="ListViewItem">
                                <Style.Triggers>
                                    <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                                        <Setter Property="Background" Value="LightGray" />
                                    </Trigger>
                                    <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                                        <Setter Property="Background" Value="DarkGray" />
                                    </Trigger>
                                </Style.Triggers>
                                <Setter Property="BorderThickness" Value="0" />
                                <Setter Property="Margin" Value="2" />
                                <Setter Property="MaxWidth" Value="120" />
                                <Setter Property="MinWidth" Value="120" />
                                <Setter Property="Padding" Value="0" />
                            </Style>
                        </ListView.ItemContainerStyle>
                        <ListView.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Margin="5"
                                           Background="Transparent"
                                           Text="{Binding Path=Caption}" />
                            </DataTemplate>
                        </ListView.ItemTemplate>
                    </ListView>
                </DockPanel>
            </TabItem>

            <TabItem Header="#309">
                <DockPanel LastChildFill="True">
                    <Grid DockPanel.Dock="Top">
                        <Button CommandParameter="309"
                                Style="{StaticResource GitHubPullRequestButtonStyle}"
                                ToolTip="Open #309 on Github" />
                    </Grid>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="Dragdrop tool throws an exception when trying to reorder ListBox items that are themselves collections." />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>

                                <ListBox MinWidth="200"
                                         ItemsSource="{Binding Members}"
                                         DisplayMemberPath="Name"
                                         dd:DragDrop.IsDragSource="True"
                                         dd:DragDrop.IsDropTarget="True" />
                            </Grid>
                        </StackPanel>
                    </ScrollViewer>
                </DockPanel>
            </TabItem>

        </TabControl>

    </Grid>
</UserControl>