I have a WPF window, which contains a WindowsFormsHost element. I need to draw things on top of this element, but the nature of WindowsFormsHost means that it's always on the top of the drawing pile. As I cannot draw in the same WPF window on top of the WindowsFormsHost component, can I overlay another window on top of it?

I've tried this in a rudimentary way, but I have a few problems:

1) I can't stop windows from other apps going in between the main window, and the overlay window.

2) When I Alt-Tab, the overlay window appears in the window list, which is pretty ugly.

Basically I need the concept of a "child window", and window which to all intents and purposes appears as part of another window. UserControls won't work for me, as the WindowsFormsHost will always draw on top of it.

Any Ideas?


Update [May 23 '11 at 10:13 ]

Thank you both for answers.

I've tried the ChildWindow approach, and the WindowsFormsHost element still draws on top. As I understand it, only a true window can draw on top of a WindowsFormsHost, anything in the same window will go under the WindowsFormsHost.

An element with the WindowsFormsHost will still draw under a WinForms component, they are always drawn on top, and that seems non-negotiable...

I guess what I'm looking for is a way to dock an external window to act as part of the main window. On the Mac, there is the concept of a true "child window", I'm looking for something like that.

Edit
Report