Friday, October 7, 2011

How to access Init Parameters for SharePoint Silverlight Web Part

Custom initialisation parameters are accessible from within the silverlight web part, these values, are values passed from the Sharepoint Silverlight web part into the Silverlight application.

These values are passed in the form of a Dictionairy object and they are passed as follows:

These values can be accessed by using the following code:

private void Application_Startup(object sender, StartupEventArgs e)
 string value = e.InitParams["Key"];
Please let me know if this post has helped you, and if you have any improvements or comments please feel free to post them.