I have a visual tree with UIElement3D objects that get focus and fire keyboard events. I would like to catch them at their parent level which is of type ModelVisual3D. However WPF does not allow me to subscribe for Keyboard.KeyDown events on ModelVisual3D (it throws an exception at runtime).
The开发者_StackOverflow environment (shell) which this 'parent' lives in does not know anything about its children, which means it does not know anything about the events they will be expecting. So it cannot subscribe for this event and call a method on the relevant child.
Does anybody have an elegant solution for this problem?
Alex.
I solved it. Changed the parent to be ContentUIElement3D and the problem was solved.
精彩评论