O'Reilly logo

Mastering LOB Development for Silverlight 5: A Case Study in Action by Rocío Serrano, Braulio Díez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Accessing JavaScript from Silverlight

It is now time to perform the reverse process. We will access the functions defined in JavaScript from our Silverlight application. In this sense, the working is a little bit simpler, since we do not have to do anything special to define functions in JavaScript. They only have to be accessible for the page in general.

HtmlPage object

Before continuing, let's look in detail at the HtmlPage object. This class offers functionality to access and handle the DOM of the page. Through the HtmlPage object, it is possible to:

  • Access/Invoke JavaScript functions
  • Register a Silverlight object in the HTML page, making it accessible from JavaScript
  • Obtain an HtmlDocument object to manipulate the page DOM

From the HtmlPage object, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required