如何防止用户调整浏览器窗口Silverlight的大小? [英] How can I prevent the user from resizing the silverlight out-of-browser window?

查看:80
本文介绍了如何防止用户调整浏览器窗口Silverlight的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 silverlight 应用,可以作为浏览器外安装.

I have a silverlight app which can be installed as out-of-browser.

我已经在主 UserControl 中定义了高度和宽度.

I've defined the Height and Width in the main UserControl.

我在 OutOfBrowserSettings.xml 文件中定义了相同的高度和宽度.

I've defined the same Height and Width in the OutOfBrowserSettings.xml file.

但是用户仍然可以调整浏览器外框架窗口的大小.如何防止这种情况?

推荐答案

以正常权限运行的应用程序无法控制承载Silverlight应用程序的窗口,这是一个安全问题.

The window hosting the Silverlight application cannot be controlled by the application when it is running with normal permissions, that would be a security issue.

但是,如果您以提升的权限安装OOB应用程序,则可以更改窗口的镶边并定义自己的窗口.这将防止调整大小(当然,除非您明确地使用自定义镶边实现调整大小).

However, if you install the OOB application with elevated permissions, you can change the chrome of the window and define your own. This will prevent the resizing (except of course if you explicitly implement resizing with the custom chrome).

要更改镶边选项,请使用项目属性中的OOB设置.

To change the chrome options, use the OOB Settings in the project properties.

这篇关于如何防止用户调整浏览器窗口Silverlight的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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