Share via


Exercise 1: Enabling Out of Browser

The out-of-browser feature in Silverlight opens a new world of possibilities. Silverlight 4 extends out-of-browser functionality by enabling trusted applications. This makes it closer to programming for WinForms. This lab focuses on core out-of-browser functionality. To get started you must first enable your Silverlight project to run in an out-of-browser window, which this exercise outlines.

  1. Open the solution for this lab, and run the project. The application will run in a browser, and you’ll notice WebBrowser control saying “HTML is enabled only in Out-of-Browser mode”.
  2. To enable out of browser, stop debugging, and open the Properties page in Visual Studio. Here click the “Enable running application out of the browser”.

    Figure 1

    Enable running application out of the browser

  3. Before running the project, right click the Silverlight project and select Set as Startup Project.

    Figure 2

    Set as Startup Project

  4. Run the project. Your application is now running in Out-of-Browser mode. If you’re coming from WinForms you should feel at home now…no browser!
    Note:
    Notice you can see HTML, Flash, and Silverlight running inside the app!