[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

ModelUIElement3D PreviewMouseDown Outer/Inner Object

ClearlyDotNet

8/25/2008 7:14:00 PM

Let's say I have 2 cubes; "OuterCube" and "InnerCube". Both are
ModelUIElement3D objects. The inner one is .8 scaled on each axis compared to
the outer cube which makes it the inner cube. The outer has a rather
translucent material so you can see through it easily. Both InnerCube as well
as OuterCube both have PreviewMouseDown event handlers. If the user clicks at
a place on OuterCube that overlaps InnerCube it's PreviewMouseDown routed
event handler gets called and e.handled is set to false. By my understanding,
this event should continue being tunneled down to the InnerCube but it isn't.
I've tried to do my own hit testing at the viewport but when I RaiseEvent
myself for the ModelUIElemenent3D the PreviewMouseDown handler for the
viewport get's called again so a stack overflow occurs due to the cycle.

My goal is to let my application/model logic determine if mouse clicks
should be stopped at the OuterCube or the InnerCube. I know I could create my
own events but I would like to use the infrastructure that is there for other
features.

Please advise.