Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WindowsFormsHost ZOrder

Tags:

wpf

z-order

It appears WindowsFormsHost control is set to display on top. Is there any way to change its z-order to allow other WPF controls on the same window to be visible on top of the WindowsFormsHost control?

like image 958
Void Avatar asked Aug 24 '10 11:08

Void


1 Answers

Unfortunately no, because of the way the winformshost is composited into a WPF window it must appear on top.

See the z-order paragraph from here.

In a WPF user interface, you can change the z-order of elements to control overlapping behavior. A hosted Windows Forms control is drawn in a separate HWND, so it is always drawn on top of WPF elements.

A hosted Windows Forms control is also drawn on top of any Adorner elements.

like image 167
Martin Harris Avatar answered Oct 24 '22 01:10

Martin Harris