Silverlight 3 - 我可以在另一个应用程序中运行浏览器外吗
新的 Silverlight 3 beta 包括运行浏览器外应用程序的能力。 到目前为止的演示仅在特殊框架内展示了这一点。 有谁知道如何在 (WPF) 应用程序中运行 Siverlight 3 控件?
The new Silverlight 3 beta includes the ability to run Out-of-Browser applications. The demos so far show this only inside a special frame. Does anyone know how I can run Siverlight 3 controls inside a (WPF) application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我猜想(是的,真丢脸!),但您可能可以在窗口上放置一个 WPF Web 浏览器并导航到其中的 Silverlight 应用程序。
这是受支持的场景; 最近的一篇 MSDN 文章指出,这种情况是受支持的,这样的情况迫使 CLR 团队允许将多个 CLR 加载到单个进程中。
I'm guessing (yes, shame on me!) but you can probably put a WPF web browser on your window and navigate to the Silverlight app inside it.
This is a supported scenario; a recent MSDN article stated this scenario was supported, and scenarios like this forced the CLR team to allow multiple CLRs loaded into a single process.
SLOOB 应用程序似乎在主机进程内运行(C:\Program Files\Microsoft Silverlight\3.0.40307.0\sllauncher.exe)。 这将托管和沙箱应用程序。
我怀疑自己不可能托管它 - 抱歉,如果这有点接近猜测,但如果没有在 WPF 应用程序中运行托管 Web 浏览器,我想不出解决沙箱要求的方法。
华泰
It seems that SLOOB apps run inside a host process (C:\Program Files\Microsoft Silverlight\3.0.40307.0\sllauncher.exe). This hosts and sandboxes the app.
I suspect that it will not be possible to host it yourself - sorry if that's a little close to guessing, but short of running a hosting web browser in your WPF app I can't think of a way around the sandboxing requirement.
HTH
您可以在 Windows 应用程序内托管浏览器控件,并在浏览器控件内加载 silverlight。 这就是实时网格的实现方式。
You can host a browser control inside a windows app, and load silverlight inside the browser control. This is how live mesh is going to do it.
不,您不能将浏览器外的 silverlight 嵌入到 WPF 中。 sllauncher.exe 独立框架有一个特殊的处理程序,用于处理offline://(hostname).(revision)/ url,以允许应用程序具有浏览器外模式的所有功能(例如额外的键盘访问) 。 除非您能找到一种方法将此应用程序嵌入到您的应用程序中,否则您将无法退出浏览器; 如果您知道某种方法来执行此操作,则此应用程序的地址是:
C:\Program Files\Microsoft Silverlight\3.0.40307.0\sllauncher.exe
然而,正如其他人所说,您可以在 html 页面中嵌入 silverlight 控件,然后在 WebBrowser 元素内。 不过,请谨慎使用此方法,因为目前 Silverlight 不支持 x64,如果您绝对必须这样做,请确保专门针对 x86 进行编译。
No, you can not embed out-of-browser silverlight into WPF. The sllauncher.exe standalone frame has a special handler for the offline://(hostname).(revision)/ url given to it to allow the app to have all the features of out-of-browser mode (like extra keyboard access). Unless you can find a way to embed this app into your app, you won't be able to get out-of-browser; if you know some way to do this the address for this app is:
C:\Program Files\Microsoft Silverlight\3.0.40307.0\sllauncher.exe
As others have said, however, you can embed a silverlight control inside of an html page and that inside a WebBrowser element. Be cautious with this method, however, since there is currently no x64 support for Silverlight and if you absolutely must do this make sure to compile specifically for x86.