WindowsFormsHost始终是WPF元素中最重要的元素 [英] WindowsFormsHost is always the most top from WPF element

查看:358
本文介绍了WindowsFormsHost始终是WPF元素中最重要的元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将z-index Windowsformhost设置为不总是位于WPF元素的顶部?

how to set the z-index windowsformhost that they are not always at the top of the WPF element ?

推荐答案

根据MSDN (WindowsFormsHost元素的布局注意事项)

一个托管的Windows窗体控件是在单独的HWND中绘制的,因此它是 总是绘制在WPF元素之上.

A hosted Windows Forms control is drawn in a separate HWND, so it is always drawn on top of WPF elements.

这是设计限制

MSDN上的另一篇好文章是

Another good article from MSDN that explains possible issues when using different graphical technologies in Windows is Technology Regions Overview

但是在谷歌搜索中我发现似乎有一些黑客行为(称为空域限制)

However googling I found that there seem to be some hackings for this (known as airspace restriction)

一个hack(从来没有亲自尝试过,所以不确定是否可行) 此链接

One hack (never tried it personally so not sure if it works) is at this link

这篇关于WindowsFormsHost始终是WPF元素中最重要的元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆