Can I use a WPF control in WinForms to achieve transparency effects?
Is it possible to use WPF in WinForms, to implement the idea used in开发者_Go百科 this question. I am trying to create a semi-transparent panel.
Technically yes - there are ways of hosting WPF in WinForms using ElementHost
.
However, you're likely to run into problems with the transparency. WPF's rendering is different to WinForms and, while you can make the WPF control transparent, the WinForms underneath aren't going to respect that.
You can use Opacity
property of your WinForm to make it semitransparent.
精彩评论