Aero 主窗体上 WPF MDI 中的 WindowsFormsHost (C#)
我的疯狂问题:我在带有航空玻璃风格背景(看起来非常漂亮)的 WPF 表单上使用对接系统(AvalonDock)。在一个可停靠 MDI 中,我需要一个 WinForms 自定义控件,因此我只使用了 WindowsFormsHost
来成功加载我的控件。但有一个问题:
WindowsFormsHost
显示主窗体的玻璃背景,以显示自定义控件中使用的所有颜色的黑色量。
更改 MDI 背景没有任何帮助,因为 WindowsFormsHost
会在 WPF MDI 中的所有内容中切出一个洞。
既不尝试在黑色背景上显示白色文本,也不尝试相反的方式使我的自定义控件中的文本框清晰可读。
有什么建议吗?
My crazy problem: I'm using a docking system (AvalonDock) on a WPF form with aero glass style background (what looks really nice). In one dockable MDI I need a WinForms custom control, so I just used the WindowsFormsHost
that loads my control successfully. But there is one problem:
The WindowsFormsHost
shows the glass background of the main form for the amount of black for all colors used in the custom control.
Changing the MDI background doesn't help because the WindowsFormsHost
cuts a hole through everything in the WPF MDI.
Concluding neither trying to have white text on a black background nor the other way round makes the textbox in my custom control clearly readable.
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论