views:

1320

answers:

4

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?

+1  A: 

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.

Judah Himango
Thanks for guessing. Now the question is answered and has less of a chance of being seen by someone who knows the answer. Please delete this.
Peter
I'm not going to delete this just because it isn't the answer you're looking for. I suspect the answer you're looking for isn't possible. I posted a way to host SL content inside WPF; others may find this information useful.
Judah Himango
A: 

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

Gordon Mackie JoanMiro
A: 

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.

thijs
+1  A: 

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.

matthews