Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF WindowChrome WindowsFormsHost: Opacity

since WPF has no month calendar that allows displaying multiple months I am trying to use the classic WindowsForms MonthCalendar inside a WindowsFormsHost. Doing this in a "normal" WPF window works fine. I am trying to use a templated window with WindowChrome. The result looks like the MonthCalendar has an opacity value of 0.5 although it hasn't (left/first picture) In the VS designer it looks as expected (right/second picture)

monthcalendarmonthcalendarInIDE

How can I get rid of this effect?

like image 883
Llarian Avatar asked May 07 '26 00:05

Llarian


1 Answers

<WindowChrome GlassFrameThickness="0"/>

If your GlassFrameThickness is set to -1 (or some other value that results in the inner glass border being large enough to underlay the control) the WindowsFormsHost picks up the glassy transparency.

like image 136
roken Avatar answered May 09 '26 14:05

roken



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!