Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty treeviewitem and common moving support #128

Merged
merged 13 commits into from
Apr 9, 2015

Conversation

punker76
Copy link
Owner

@punker76 punker76 commented Apr 3, 2015

yes... now it's time to support empty TreeViewItem's ...

  • it's now possible to drop data on empty treeview items
  • re-create the EffectAdorner if drag&drop Effects are changed
  • the drop target adorner is now expanded to the right
  • it's now also possible to move any data to another ItemsControl
  • change default behavior (move or copy, now default is copy)

drag drop_on_empty_treeview_item

grab the latest alpha: https://www.nuget.org/packages/gong-wpf-dragdrop/

Closes #31

@punker76
Copy link
Owner Author

punker76 commented Apr 3, 2015

@christianhuening @dudiam @chandramouleswaran @AnnekeHeelsum @AnnekeHeelsum @Toprakete testable with gong-wpf-dragdrop 1.0.0-ALPHA002

@punker76 punker76 added this to the v1.0.0 milestone Apr 3, 2015
@punker76
Copy link
Owner Author

punker76 commented Apr 5, 2015

next change would be (yes a breaking change)

  • change default behavior to Move for drag&drop to another control
  • use SHIFT drag&drop for copy drag&drop

/cc @thoemmi what do you think?

/cc @christianhuening @dudiam @chandramouleswaran @AnnekeHeelsum @AnnekeHeelsum @Toprakete

@christianhuening
Copy link

@punker76 Thanks for updating this solution! The project I used it for has long gone into production and is no longer maintained by me. But I nonetheless appreciate the new stuff and the fixes for future projects! Great!
The behavior regarding moving and copying sounds reasonable! Should be configurable though.

Cheers,
Christian

@phil-scott-78
Copy link

ran into a bug testing this out. easy to reproduce using the Issue 65 view. Dragging an item with children to a top level position will cause it to lose the children of that item.

bug

@punker76
Copy link
Owner Author

punker76 commented Apr 6, 2015

@enkafan ups, i should fix this 8-D

@punker76
Copy link
Owner Author

punker76 commented Apr 6, 2015

@enkafan it's now fixed in 1.0.0-ALPHA003

but you should noticed, issue #65 example is a very special example...

<TreeView Grid.Column="0"
          Grid.Row="1"
          dd:DragDrop.IsDropTarget="True"
          dd:DragDrop.IsDragSource="True"
          dd:DragDrop.UseDefaultDragAdorner="True">
  <TreeViewItem Header="A TreeViewItem with ItemsSource"
                ItemsSource="{Binding TreeCollection}">
    <TreeViewItem.ItemTemplate>
      <HierarchicalDataTemplate ItemsSource="{Binding Children}">
        <TextBlock Text="{Binding Caption}" />
      </HierarchicalDataTemplate>
    </TreeViewItem.ItemTemplate>
  </TreeViewItem>
  <TreeView.ItemTemplate>
    <HierarchicalDataTemplate ItemsSource="{Binding Children}">
      <TextBlock Text="{Binding Caption}" />
    </HierarchicalDataTemplate>
  </TreeView.ItemTemplate>
</TreeView>

punker76 added a commit that referenced this pull request Apr 9, 2015
…oving-support

Empty treeviewitem and common moving support
@punker76 punker76 merged commit a4136f1 into master Apr 9, 2015
@punker76 punker76 deleted the empty-treeviewitem-and-common-moving-support branch April 11, 2015 20:42
@Toprakete
Copy link

Hi,
thx for updating. Works very fine for my need.
Still one thing: Start Sample, Select Bound TreeView and click below the tree-items.
It crashes in ItemsControlExtensions.cs because the SelectedItemProperty is read only.

Thx and best regards
Toprakete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants