Share via


Exercise 1: Modify the Existing Localized Silverlight Application

In this exercise you modify the competed Silverlight Application from the Silverlight Localization using a Custom Silverlight Web Part exercise.

Task 1 – Modifying the Existing Localized Silverlight Web Part

  1. Open the starter solution using Visual Studio 2010 located at: ◦<Install location>\Labs\SLLocalizationOOTBSLWebPart\Source\Begin\ OOTB_SLWebPart_Localization.sln
  2. Double-click App.Xaml and select View Code.
  3. Locate the Application_Startup event handler.
  4. Use snippet 10.3.1 to add the code to retrieve the UICulture parameter from the InitParam values.

    Figure 1

    Snippet 10.3.1

  5. This method will check for the UICuture key in InitParams. If the key is present in InitParams the method will set the CurrentThread’s CurrentUICulture to the new CultureInfo.
  6. Save and Close App.xaml.cs.