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

TreeView insert index is wrong when item can't have children #344

Closed
jizc opened this issue Mar 12, 2020 · 4 comments · May be fixed by #453
Closed

TreeView insert index is wrong when item can't have children #344

jizc opened this issue Mar 12, 2020 · 4 comments · May be fixed by #453

Comments

@jizc
Copy link
Contributor

jizc commented Mar 12, 2020

What steps will reproduce this issue?

I have a tree view where some items are containers and others are not. When dragging an item onto a non-container, the library still assumes I want to add the item as a child of the target. This causes the target collection and the insert index in the drop info to not be what I need. I can't find a built-in way of handling this issue. The sample repo below demonstrates the issue.

TreeViewIssue

Expected outcome

I need a way to tell the library that a tree view item should not be considered a valid parent, so that non-container items can be inserted as siblings.

I have a working solution that I will submit as a PR. I'm very open to solving this in a different way if anyone has a better idea! 😃

Repo

https://github.com/jizc/gong-wpf-dragdrop-treeview-issue

Environment

  • GongSolutions.WPF.DragDrop v2.2.0
  • Windows OS 10
  • Visual Studio 2019
  • .NET Framework 4.6.2 / .NET Core 3.1
@RobertBeekman
Copy link

@punker76 any chance this could be addressed? It would be great to have a solution for this.

@jizc
Copy link
Contributor Author

jizc commented Jun 22, 2020

I'm closing this as I'm currently working on a new fork that will address this and some other niche issues we have in our project.

@jizc jizc closed this as completed Jun 22, 2020
@punker76
Copy link
Owner

@jizc And why not here?

@jizc
Copy link
Contributor Author

jizc commented Jun 22, 2020

If my current plan works and I can do it in a clean enough way, I'll submit a new PR. Right now I just need to get it working in our project, so it might be a little messy at first 😅

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