views:

264

answers:

1

I create a simple WPF UserControl (any control will do) and insert it into a Winform (using an ElementHost). This works fine. The WPF control is embedded in the WinForm and when the WinForm is moved around the WPF control moves with it just like a WinForm control will do. When I change the WinForm to transparent by setting the TranparencyKey to the same value as the BackColor some problems occur: - The WPF control is not displayed - instead a black rectangle is displayed in its place.. - If the WinForm is moved around the screen then on its original place the WPF control appears - as if it was covered by the WinForm.

Changing properties of the ElementHost (such as BackColorTransparent) did not change the behavior. Setting both the BackColor and the TransparencyKey of the WinForm to Black got rid of the black rectangle problem but still when the WinForm was moved the WPF control was left in the original place.

Note also that these problems occurs under Windows XP SP3 (which is our target OS) but not on Windows 2003. (We did not check on Vista and Windows 7).

Any ideas how to have a transparent Winform with a WPF control inside and still get a normal behavior?

A: 

Hello we have the same problem. Have you found the solution? Thank you!

Nono