Silverlight Hack

Silverlight & related .NET technologies

About Me

Welcome to  This is a site where you can find many articles on Silverlight, Windows Phone 7 and .NET related technologies.  

My name is Bart Czernicki.  I have been working with computers since 1988 and have over 12 professional years in the IT field focusing on architecture, technology strategy and product management.  I currently work as a Sr. Software Architect at a large software development company.

Below is the cover of my new book that shows how Silverlight's unique RIA features can be applied to create next-generation business intelligence (BI 2.0) applications.

Silverlight 4 Business Intelligence Soft 


View Bart Czernickis profile on LinkedIn

NONE of the comments or opinions expressed here should be considered ofmy past or current employer(s).  The code provided is as-is without anyguarantees or warranties.

Office 365 - Using Silverlight in SharePoint Online

Abstract: One of the core features of Office 365 is "SharePoint Online" essentially it is SharePoint 2010 Server in the "cloud" (it does not include a lot of the SharePoint 2010 Enterprise features).  In my Silverlight 4 Business Intelligence book I dedicate a chapter to integrating Silverlight into SharePoint 2010 and I have blogged about it on this site as well.  However, in this blog article I want to show how the same Silverlight integration concepts apply to Office 365 - SharePoint Online.

Background Info: Microsoft launched Office 365 June 28th 2011 as a SaaS BPOS (Business Productivity Online Suite) which offers some great features including: SharePoint, Exchange Online, Lync Server and Office Web Apps.  These services can are completely online delivered in a SaaS model requiring no local infrastructure (think of it as Microsoft Small Business Server in the cloud).

In SharePoint Online you get a basic SharePoint 2010 team site that you can begin adding content.  The most basic way to add content is to upload documents, pictures etc.  and use the SharePoint Online team site as a document library.  Even though SharePoint Online doesn't include all the advanced enterprise SharePoint 2010 Server features, it does have some very powerful integration features such as web parts (which you can develop using SharePoint Online Sandbox Solutions).

Web Parts have been the modular components used as building blocks since SharePoint 2003.  There are some web parts that are provided out of the box in SharePoint that allow you to add content in them or you can create your own.  Creating your own custom web parts even in SharePoint 2010 is not a trivial task (the web part API created in .NET 2.0 has been not updated and creating Ajax-like web parts, that communicate and maintain state is NOT trivial).  This is where Silverlight web part integration in SharePoint 2010 really shines.  SharePoint 2010 and SharePoint Online both include a Silverlight web part, which allows you to host any Silverlight application (XAP file) inside the team site.

Instructions to add a Silverlight Application (internet URL of a XAP file) to Office 365 SharePoint Online:

  1. Log into your SharePoint Team Site
    • You can add a new page or edit the existing one
  2. From the top left menu select "Site Actions" -> "Edit Page"


    • This will put the page in edit mode where you can add aditional content
  3. From the Ribbon menu select "Insert" -> "More Web Parts"



    • A dialog will appear listing all the avaiable web parts.  Select the "Silverlight Web Part"


    • Click the "Add" button located on the top right
  4. You should have an empty Silverlight Web Part located on a SharePoint page.  Now you need to add a Silverlight application (XAP file) to surface on the Silverlight Web Part.
    • With the web part click the "open the tool pane" link
    • On right-hand side click the "Configure..." button
    • Enter a URL location of the Silverlight XAP file (this can be a remote URL or URL of the XAP file within SharePoint Online Document library).  Click OK after entering a valid URL
      • I used a XAP file from my web site:
    • Apply a specific height and width for the web part (otherwise the configuration pane will not let you proceed)


    • Click Apply and then save the page (save diskette icon on the top left) and the Silverlight Web Part should render your Silverlight Application.

What is the big deal with Silverlight and SharePoint Online integration?

  • Silverlight applications you do not have to write custom ASP.NET web parts (which gets complicated real quick mixing Ajax, state, communication, security and deployment).  Silverlight applications are much easier to write since you do not have to learn the web part framework or use the SharePoint Online Sandbox Solutions.
  • Existing Silverlight applications just work with minimal "SharePoint or Web Part" coding required.
  • Silverlight gives you client-side web part communication out of the box.  Web part communication is not trivial in custom web parts and even then you get "old school" post backs if you use the provided web part communication model.  With Silverlight web parts you can use the messaging API or Javascript HTML bridge to communicate between non-Silverlight web parts.

In summary, SharePoint Online is one of the places that Silverlight integration really shines (even over the oncoming HTML5 wave).  Existing Silverlight applications can be easily added to a SharePoint Online team site.  Furthermore, Silverlight allows the easy creation of new web part components that can be hosted externally and connected to other web services (using SharePoint, OData or other).

Posted: Jul 19 2011, 20:40 by Bart Czernicki | Comments (0) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under:
Social Bookmarks: E-mail | Kick it! | DZone it! |
blog comments powered by Disqus