For those who know I have been creating Silverlight project demos that work in conjunction with sharepoint. Some, like the template, just exist inside a webpart, others like the photoviewer and more lately the videolibrary read sharepoint lists to get their data.

So far all of these have been silverlight 1.0. There are a variety of reasons for this, mainly I don’t have vis studio 8 and all the extras. I still don’t, but I was curious as to if it were possible to embed 1.1 projects as part of a webpart.  Today I got my answer.  Yes.  It is possible to get 1.1 parts as part of a sharepoint part.

I took the silverlight 1.1 clock from the sdk as my control of choice.  Using my sharepoint silverlight template as a base I modified various parts to suit.

First was the createsilverlight function. I no longer pass in the localscene (what was the jscript main silverlight object as its not required in 1.1).

I copied the clock.xaml and the slclock.dll into my webpart project. This is where it becomes less elegant than 1.0 as two projects are required a vis studio 8 project for a standalone silverlight app and the vis studio 2003 project for webparts.  Editing the manifest.xml file in the webpart project you include the xaml and the dll.  My initial concern was that sharepoint would not deliver a dll but from wpresources it allows it.

The only really bad thing I don’t like or haven’t had time to workaround yet is that you need to edit the xaml to change the path of the dll to the wpresources folder that will store it once installed in sharepoint.  For those using moss you will have the luxury of using .net 2 webparts directly and could create a solution containing both types of projects.

Due to MS licensing I can’t publish the example and as I can’t create my own 1.1 apps it will have to wait.  I used to manage it in blend but the later release removed that 1.1 project definition so I can’t do that now either. 

Hopefully you can take the webpart project template I did and figure it out from the steps here.  Please let me know how you get one.