C# .NET - WPF Treeview Item Drag and Drop - Asked By Roopa Chellappan on 06-Mar-14 05:58 AM

How to drag and Drop HierarchicalDataTemplate Item in Treeview

See my below structure.


  <TreeView Name="TreeViewResult"  ItemsSource="{Binding}" AllowDrop="True"  VerticalAlignment="Stretch"  Background="#FFA8B2BC"  Foreground="White" DragOver="TreeViewResult_DragOver" Drop="TreeViewResult_Drop" MouseMove="TreeViewResult_MouseMove">
              <TreeView.ItemTemplate>
                  <HierarchicalDataTemplate ItemsSource="{Binding Path=rsParentChild1}" >
                    <!--<TreeViewItem Header="{Binding CategoryName}"/>-->
                  <StackPanel Orientation="Horizontal" >
                    <TextBlock Text="{Binding CategoryName}" AllowDrop="True" />
                  </StackPanel>
                </HierarchicalDataTemplate>
                </TreeView.ItemTemplate>
            </TreeView>
Robbe Morris replied to Roopa Chellappan on 06-Mar-14 10:26 AM
http://www.nullskull.com/a/10476684/xaml-treeview-with-context-menu-drag-and-drop-features.aspx