-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
Comments
@punker76 any chance this could be addressed? It would be great to have a solution for this. |
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 And why not here? |
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 😅 |
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.
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
The text was updated successfully, but these errors were encountered: