有没有办法以编程方式弹出“Microsoft Silverlight 配置”对话?
我正在为 Silverlight 4 进行构建,我处理 MouseRightButtonDown 事件并构建我自己的 ContextMenu(Silverlight 工具包中的一个类)。我想将经典的“Silverlight”菜单项添加到我的菜单中,并为用户提供启动“Microsoft Silverlight 配置”对话框的熟悉选项。该对话框允许用户管理更新、网络摄像头、权限和应用程序存储。因此,我需要一种在单击菜单项时以编程方式启动对话框的方法。
Flash 我可以完成,而且微软似乎希望鼓励开发人员支持该选项。
能做到吗?
I am building for Silverlight 4, and I handle MouseRightButtonDown events and build my own ContextMenu's (a class from the Silverlight Toolkit). I would like to add the classic "Silverlight" menu item to my menus, and give the user the familiar option of launching the "Microsoft Silverlight Configuration" dialog. This is the dialog lets users manage Updates, Webcams, Permissions, and Application Storage. So I need a way to programatically launch the dialog when the menu item is clicked.
I can be done for Flash, and it would seem that Microsoft would want to encourage developers to support that option.
Can it be done?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是没人愿意给出的答案:不。目前,Silverlight API 中还没有公开调用 Silverlight 配置对话框的显示。
我同意这样的功能应该存在。
编辑
回答您的附加问题。在提升的 SL4 OOB 应用程序中,可以让脚本 shell 启动
Silverlight.Configuration.exe
。您可以在以下位置找到该文件:-Here is the answer no likes to give: no. Currently there is no exposure in the Silverlight API to invoke the display of the Silverlight configuration dialog.
I would agree that such a feature ought to exist.
Edit
In response to your additional question. In an elevated SL4 OOB app it may be possible to get the scripting shell to launch the
Silverlight.Configuration.exe
. You find this file at:-请注意 http://msdn.microsoft.com/ en-us/library/cc645084(v=vs.95).aspx 说:
据我了解,您也可以在 Mac OS X 上拥有 Elevated Trust OOB 应用程序(以访问文件系统),但不确定这是否可以让您启动某些本地应用程序,或者您需要 COM 互操作(仅适用于 Silverlight Elevated Trust) Windows 上的应用程序(OOB 或浏览器内的 Silverlight 5)
Note that http://msdn.microsoft.com/en-us/library/cc645084(v=vs.95).aspx says:
From what I understand you can have Elevated Trust OOB apps on Mac OS X too (to access the filesystem), but not sure if that gives you a way to launch some local app or you need COM interop which is only available for Silverlight Elevated Trust apps on Windows (either OOB or in-browser too with Silverlight 5)