Monday, January 28, 2008

SharePoint Silverlight WebPart



A couple of people have asked how to apply filters to the WebPart. By default when you add the webpart to a page in SharePoint it will display an image for ALL documents in ALL Document libraries and Picture libraries in the current SharePoint site (SPWeb). You can apply filters in a number of different ways.

Search Scope
You can change the scope to one of three values.

1) Current_Site. This will display documents in document libraries and picture libraries from the current SharePoint Site (SPWeb)
2) Recursive. This will display documents from the current SharePoint Site AND all sub-sites below the current sharepoint site.
3) Site_Collection. This will display documents from ALL sites and sub-sites in the current site-collection.

List Filter
You can apply a list filter to narrow down the results to only show documents from the document library you specify. You specify a list by entering the list name.

File Type Filter
By default the WebPart will display an image for all files in a document library or image library, by applying a File Type filter which matches the file extension of the files you want to show you can choose which types of files will be displayed.

Examples:
1) DOC
This will only display files with the file extension .doc e.g. word documents.
2) PNG
This will only display files with the file extension .png e.g. image files

Content Type Filter
By default the WebPart will display an image for all SharePoint Content types. By specifying a content type it will only show documents whose content type matches the one you specify.

Examples:
1) Picture
This will only show files whose content type you have specified as Picture
2) Invoice
This will only show files whose content type you have specified as Invoice

I hope this helps a little. the filtering is pretty simple at the moment but by using a combination of the above you should be able to ensure that the WebPart only shows files that you want it to.

Beta1 Silverlight Web Part is now available for download at:
http://www.triplewood.com/silverlight

1 comment:

Frédéric said...

Great Job Ian !

Do you plan to release the source code or part of it ?
--
Fred