Silverlight Web浏览器控件 [英] Silverlight webbrowser control

查看:95
本文介绍了Silverlight Web浏览器控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有一些html的webbrowser控件,现在当我打开Silverlight子窗口时,
silverlight子窗口位于webbrowser控件的后面.这似乎确实扭曲了UI.

I have a webbrowser control with some html inside it, now when i open a silverlight child window,
the silverlight child window goes behind the webbrowser control. This seems to really distort the UI.
Any solution for this.

推荐答案

WebBrowser控件不是Silverlight对象,它位于所有内容的顶部.您需要在子窗口可见时翻转WebBrowser控件与填充设置为WebBrowserBrush的矩形之间的可见性,而在子窗口不可见时将其翻转.像这样的东西:

The WebBrowser control is not a silverlight object and sits on top of all content. You need to flip Visibility between the WebBrowser control and a rectangle with the fill set to WebBrowserBrush when the child window is visible and back when it''s not. Something like:

<webbrowser x:name="browserControl" source="{Binding URL}" xmlns:x="#unknown" />
<rectangle x:name="browserControlRect" xmlns:x="#unknown">
    <rectangle.fill>
        <webbrowserbrush sourcename="browserControl" />
    </rectangle.fill>
</rectangle>



然后使用VSM,行为或代码进行切换.



Then either VSM, Behaviours, or code to do the toggling.


这篇关于Silverlight Web浏览器控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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