Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

5.6. The Host

Working with individual XAML elements is useful, but there are occasions when you will need to work directly with the object that hosts the XAML in the browser. Every XAML object supports a getHost method that will return the host object, as shown in Example 9.

Example 5-4. Retrieving the host from a XAML element

function root_Loaded(sender, args) {
  var theHost = sender.getHost();
}


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint