Anonymous 9 years ago 0
This discussion was imported from CodePlex

hulahoops wrote at 2012-11-01 10:10:



Is it possible to use ContainerUIElement3D in conjunction with SortingVisual3D?  I would like sorted visuals that have the power of the ContainerUIElement3D class.


Best regards


objo wrote at 2012-11-02 22:33:

Hi Simon! I have not tried this, but I guess it should be possible. Let us know if there is a bug. And remember that the SortingVisual3D is only a 'basic' work-around for the transparency problem... 

hulahoops wrote at 2012-11-05 10:08:

Hi Objo

Thanks for replying.  I was asking if it is possible as I can't get it to work.  If I add a ModelUIElement3D object as a child of a ContainerUIElement3D object, and add the ContainerUIElement3D object as a child of a SortingVisual3D object, I find that the mouse events are not fired.

e.g.  (geometry code excluded)

var element = new ModelUIElement3D();
element.Model = geometry;
element.MouseDown += this.ContainerElementMouseDown;
var containerUI = new ContainerUIElement3D();
var uiTransparentElements = new SortingVisual3D();

It is not too big a deal since I could use VisualTreeHelper.HitTest instead of  ContainerUIElement3D, but I was wondering if I was missing something simple.



objo wrote at 2012-11-05 10:28:

ok, could changing the base class of HelixToolkit.Wpf.RenderingModelVisual help? Try replace ModelVisual3D by ContainerUIElement3D (I am guessing - no time to test right now).

hulahoops wrote at 2012-11-05 13:33:

I did start to try that but unfortunately abandoned as didn't resolve all the build errors.  I will use HitTest workaround for now.  Is it possible to add to future enhancement list?

Thanks, Simon

objo wrote at 2012-11-06 19:29:

added http://helixtoolkit.codeplex.com/workitem/9971

bennasi wrote at 2012-11-26 11:48:

ContainerUIElement3D is a noniheritable class...


objo wrote at 2012-11-26 11:53:

Then try to add a ContainerUIElement3D to the ModelVisual3D.