Share via


Exercise 2: Deploy and Test the Modified Silverlight Application

In this exercise, you will deploy the solution to the intranet.contoso.com site and configure the out-of-the-box Silverlight Web Part to display in French on the English site.

Task 1 – Deploying and Test the Modified Silverlight Application Without Additional Initialization Parameters

The Silverlight application will use the client’s culture information when UICulture key is not found in InitParams.

  1. Right-click OOTB_SLWebPart_Localization project in Solution Explorer and click Set as StartUp Project.
  2. Press F5 to build and deploy the solution.
  3. After Visual Studio launches Internet Explorer and the site renders in the browser, navigate to https://intranet.contoso.com/SitePages/SilverlightCultureWebPartPage.aspx.
  4. Click the Display Culture button and verify the Silverlight application displays the text in English for the English language site.
  5. Close Internet Explorer.

Task 2 – Testing the Modified Silverlight Application with Additional Initialization Parameters

In this task we will supply the UICulture value using the OOTB Silverlight Web Part’s Additional Initialization Parameters.

  1. Right-click OOTB_SLWebPart_Localization project in Solution Explorer and click Set as StartUp Project.
  2. Press F5 to build and deploy the solution.
  3. After Visual Studio launches Internet Explorer and the site renders in the browser, navigate to https://intranet.contoso.com/SitePages/SilverlightCultureWebPartPage.aspx.
  4. Click the Edit icon.

    Figure 2

    Edit icon

  5. Click the Web Part Drop Down arrow and select Edit Web Part.

    Figure 3

    Edit Web Part

  6. Expand the Other Settings category.
  7. Add UICulture=fr to the Custom Initialization Parameters property.
  8. Click OK.
  9. Verify the Silverlight application located on an English-language site is now displaying French resources.

    Figure 4

    French dialog