有没有办法以编程方式弹出“Microsoft Silverlight 配置”对话?

发布于 2024-08-30 17:21:59 字数 322 浏览 1 评论 0原文

我正在为 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧时模样 2024-09-06 17:21:59

这是没人愿意给出的答案:不。目前,Silverlight API 中还没有公开调用 Silverlight 配置对话框的显示。

我同意这样的功能应该存在。

编辑

回答您的附加问题。在提升的 SL4 OOB 应用程序中,可以让脚本 shell 启动 Silverlight.Configuration.exe。您可以在以下位置找到该文件:-

%programfiles%\Microsoft Silverlight\4.0.50401.0\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:-

%programfiles%\Microsoft Silverlight\4.0.50401.0\Silverlight.Configuration.exe

你好,陌生人 2024-09-06 17:21:59

请注意 http://msdn.microsoft.com/ en-us/library/cc645084(v=vs.95).aspx 说:

用户还可以从“开始”菜单上的 Microsoft Silverlight 文件夹访问此对话框,或者
通过配置应用程序。在 Windows 上,此应用程序位于以下位置之一
地点:

在 32 位操作系统上:C:\Program Files\Microsoft
Silverlight\版本号\Silverlight.Configuration.exe

在 64 位操作系统上:C:\Program Files (x86)\Microsoft
Silverlight\版本号\Silverlight.Configuration.exe

在 Macintosh 计算机上,用户可以按照以下步骤访问配置应用程序:
1. 在 Finder 中,导航至 /Library/Internet Plug-Ins。

  1. 右键单击(或按 CTRL 键然后单击)Silverlight.plugin,然后选择“显示包内容”。

  2. 导航到内容/资源,然后双击 Silverlight.Preferences.app。

据我了解,您也可以在 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:

Users can also access this dialog box from the Microsoft Silverlight folder on the Start menu or
through a configuration application. On Windows, this application is found in one of the following
locations:

On 32-bit operating systems: C:\Program Files\Microsoft
Silverlight\versionNumber\Silverlight.Configuration.exe

On 64-bit operating systems: C:\Program Files (x86)\Microsoft
Silverlight\versionNumber\Silverlight.Configuration.exe

On Macintosh computers, users can access the configuration application by following these steps:
1. In Finder, navigate to /Library/Internet Plug-Ins.

  1. Right-click (or press CTRL and then click) Silverlight.plugin and then select Show package contents.

  2. Navigate to Contents/Resources and then double-click Silverlight.Preferences.app.

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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文