I have a Silverlight 4 web application that needs to be added to an already-existing SharePoint application. SharePoint and the silverlight web app could be on the same server or different servers. Right, now the web app works fine by adding a Page Viewer web part to SharePoint and putting in the appropriate URL.

I would like to also get the theme color that is currently set in SharePoint and also its locale. The web app URL can take parameters for theme and locale, but this would require a user to manually change the URL in the Page Viewer web part. What is the best way to grab this information dynamically for my web app?


Extend the Page Viewer web part to grab the theme & locale of the site and then dynamically modify the url passed to the silverlight app by appending both to the page viewer url.

|improve this answer|||||
  • Unfortunately, the Page Viewer web part is a sealed class. msdn.microsoft.com/en-us/library/… – Matthew Steven Monkan Jan 27 '11 at 15:59
  • I found a solution where I could create my own web part, and then I could add code like: PageViewerWebPart myWebPart = new PageViewerWebPart(); myWebPart.ContentLink = "mycustomurl"; But I also need to have the user enter in a URL, kind of like when the user must put in a URL when selecting the Page Viewer web part. Basically, they are providing the url to the application, and I need to append values to it. So I'd have code like myWebPart.ContentLink += "?parameter=something"; – Matthew Steven Monkan Jan 27 '11 at 16:18
  • 1
    This link will show you how to create a property for users to edit. 15seconds.com/issue/040218.htm – Neil Richards Jan 27 '11 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.