OpenGL 控件覆盖 WPF 元素
OpenGL control overlays WPF elements
我使用 DevExpress 控件库在 WPF 中开发了富客户端应用程序。
在其中一个面板中,我使用 OpenTK(OpenGL 的 .net 包装器库)渲染了一些视觉元素。
问题是,OpenGL 渲染表面在应用程序中似乎是最重要的。因此,如果我将一个面板移到另一个面板上,OpenGL 的控件会覆盖 WPF 元素:
我不确定这是 WPF 的一般问题,还是 DevExpress 或 OpenTK 的问题。
我想知道,我能做些什么来解决这个问题?
编辑:我正在使用 WindowsFormsHost 控件将 OpenTK 的 GLControl 放入 WPF UserControl。我正在使用 .Net 4.5。
DockLayoutManager 有 known limitations when working with WindowsFormsHost. These limitations are general for WPF platform and they are powered by the current implementation of HwndHost (see WPF and Win32 Interoperation MSDN 文章了解详情)。
您可以尝试通过将 DockLayoutManager.EnableWin32Compatibility property to true
and the DockLayoutManager.FloatingMode 属性 设置为 FloatingMode.Desktop
。
来解决停靠面板与 OpenGL (WinForms) 控件重叠的可能问题。
我使用 DevExpress 控件库在 WPF 中开发了富客户端应用程序。
在其中一个面板中,我使用 OpenTK(OpenGL 的 .net 包装器库)渲染了一些视觉元素。
问题是,OpenGL 渲染表面在应用程序中似乎是最重要的。因此,如果我将一个面板移到另一个面板上,OpenGL 的控件会覆盖 WPF 元素:
我不确定这是 WPF 的一般问题,还是 DevExpress 或 OpenTK 的问题。
我想知道,我能做些什么来解决这个问题?
编辑:我正在使用 WindowsFormsHost 控件将 OpenTK 的 GLControl 放入 WPF UserControl。我正在使用 .Net 4.5。
DockLayoutManager 有 known limitations when working with WindowsFormsHost. These limitations are general for WPF platform and they are powered by the current implementation of HwndHost (see WPF and Win32 Interoperation MSDN 文章了解详情)。
您可以尝试通过将 DockLayoutManager.EnableWin32Compatibility property to true
and the DockLayoutManager.FloatingMode 属性 设置为 FloatingMode.Desktop
。