As I have been toying with Silverlight webparts I thought it about time that I created a base template that would respect multiple instances of a webpart on the same page using Silverlight. Also multiple Silverlight parts on that page.
Well I have done that now. It’s not bad, it’s not brilliant, in fact its not much at all, but its a good start.
This template is for Sharepoint 2003 and written for Studio 2003. It would not take much to convert it to 2007 I’m sure, but I don’t have 2007 currently. It targets the Beta not the Alpha.
Its a really simple part, it just displays a control of a fixed size (determined in the webpart (could be made to utilize webpart settings easily)). I took the time to put in the fullscreen resize as used in the video library example.
To achieve this I have taken the MS generated Sharepoint code and modified it. I left the MS copyright notices in etc, but some of these files are modified to work better with Sharepoint. The Web Template is based on MS’s webpart template.
I point you to the Silverlight Ts&Cs. These changes to this code are not endorsed by MS. As for me, if you use this then use it at own risk. I will not be providing support for this code. You may ask a question, I may answer.
The Sample 2003 project can be found here . This was built on an X64 Platform so change the References to suit. Also use your own SNK file the one in the project is a dummy.
If this is helpful then leave a comment.
Update: ** RC1 SourceCode **
Technorati tags: Silverlight, Sharepoint, Webpart template
Fantastic, amazing.. I used in Sharepoint 2007.
hi. was juz wondering.
i have successfully install the above web part into my sharepoint site.
However, i do not see anything when i add the webpart into my site.
do i have to add any codes to see something? or would i have to insall some program to see silverlight?please advice
i’m pretty new at this.
thanks.
chevy.
if you want to try something out try the photoviewer webpart instead.
however you would be best starting with a normal silverlight project test there is also a standalone ie not sharepoint photoviewer project on this blog
currently all the silverlight projects are pre-release candidate and need modifications.
the examples are intended for developers who can rip the code apart themselves and I don’t have time to support them.
I suggest writing a silverlight project yourself first before tackling a sharepoint silverlight combo like this, once you have it sussed the webpart template should be self evident.
Hi,
i have a big problem! i should create a silverlight webpart that shows shows some data out of a sharepoint-list. I used the silverlight alpha 1.1 and write the silverlight controll dll as an c# file.
do you now any way to load list-entries from sharepoint in the silverlight control, out of the c#-file?
thanks
slyder
well i’ve not tried it. first how do you run a 1.1 version on sharepoint I read somewhere that perhaps you can use the downloader to get the dll from the sharepoint unless of course your not running your part on sharepoint but hosting it outside of sharepoint and you want the data.
first I will assume that if hosted insharepoint you already solved that dll download.
in bothe cases the answer is webservices. there are sharepoint list webservices search on “uksug sharepoint list webservices” you should find some examples on how to use them by nick swan.
once you have that under your belt then comes using them in sharepoint.
if you are hosting on sharepoint then great as there is no crossdomain security issue. the url will start “_layouts” (i think or close enough) notice no preceding “/”.
if you are not then you need to get crafty. here you need to search for the examples people have done for this there are many links to this in the silverlight forums.
sorry no links here as I’m typing this in my phone.
I don’t use 1.1 yet I like the sound of it but I can’t stick orcas on my machine with sharepoint on it for a while so I’m sticking with the 1.0 version
good luck hope that gives you some pointers.
Hi,
I want to develop a webpart where the Images and related news of that images should be displayed like slideshow with next ,Play,Previous buttoon
Sounds nice, have fun with that