Viewport 3D
rdegelo opened this issue · 7 comments
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.
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.
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?
@rdegelo i will change this in current source (alpha version), so you can test it out
Ok, thanks.