SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
Unfortunately, the Page Viewer web part is a sealed class.… – Matthew 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 Monkan Jan 27 '11 at 16:18
This link will show you how to create a property for users to edit. – Neil Richards Jan 27 '11 at 19:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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