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

Viewport 3D #167

Closed
rdegelo opened this issue Feb 17, 2016 · 7 comments
Closed

Viewport 3D #167

rdegelo opened this issue Feb 17, 2016 · 7 comments
Milestone

Comments

@rdegelo
Copy link

rdegelo commented Feb 17, 2016

I have an ItemsControl using dragdrop.
All works fine. But when I flip one of the items inside ItemsControl using Viewport3D, drop does not work in some area of the ItemsControl, and if I click ItemsControl I get some HitTest Exceptions.

I wonder if HitTest stops working after a 3D animation.
Can you help me?

If you need more info please ask me.

@punker76
Copy link
Owner

@rdegelo maybe same as here? #146

@rdegelo
Copy link
Author

rdegelo commented Feb 17, 2016

Thank you for the fast answer!

I don't think it is the same problem.
Please check the video below, so you can have an better idea of my problem.

http://screencast-o-matic.com/watch/cDnbIy1VR9

Thank you in advance.

@punker76
Copy link
Owner

@rdegelo can you show me the hit test exceptions?

@rdegelo
Copy link
Author

rdegelo commented Feb 17, 2016

image

@rdegelo
Copy link
Author

rdegelo commented Feb 17, 2016

Hello,
I believe if you modify GetContainerAt method to filter ViewPort3D it will work

                                    VisualTreeHelper.HitTest(itemsControl, 
                                    o => 
                                    {
                                        if (o is System.Windows.Controls.Viewport3D)
                                            return HitTestFilterBehavior.ContinueSkipSelfAndChildren;

                                        return HitTestFilterBehavior.Continue;
                                    },
                                     result =>
                                     {
                                         var itemContainer = isItemContainer
                                                               ? GongSolutions.Wpf.DragDrop.Utilities.VisualTreeExtensions.GetVisualAncestor(result.VisualHit, itemContainerType, itemsControl)
                                                               : GongSolutions.Wpf.DragDrop.Utilities.VisualTreeExtensions.GetVisualAncestor(result.VisualHit, itemContainerType);
                                         if (itemContainer != null && !hits.Contains(itemContainer) && ((UIElement)itemContainer).IsVisible == true)
                                         {
                                             hits.Add(itemContainer);
                                         }
                                         return HitTestResultBehavior.Continue;
                                     },
                                     new GeometryHitTestParameters(hitTestGeometry));

Can you confirm it won't break anything else?

@punker76
Copy link
Owner

@rdegelo i will change this in current source (alpha version), so you can test it out

@rdegelo
Copy link
Author

rdegelo commented Feb 17, 2016

Ok, thanks.

@punker76 punker76 added this to the v1.0.0 milestone Aug 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants