Application.Host Property
Gets various details about the Silverlight application's host.
Namespace: System.Windows
Assembly: System.Windows (in System.Windows.dll)
Property Value
Type: System.Windows.Interop.SilverlightHostA SilverlightHost that provides various details about the Silverlight host application.
Much of the information that is reported by a SilverlightHost object is the same information that could be obtained from properties of the Silverlight plug-in object in the JavaScript API. For instance, the Background color that was set as part of the Silverlight plug-in instantiation can be obtained from the Host.Background property. The "sub-objects" (Content and Settings) of the Silverlight plug-in in the JavaScript API are properties with object values (Content and Settings) in the managed API.
The following example shows how to use Host to get the path to the Silverlight application package.
<UserControl x:Class="SilverlightApplication.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Grid> <TextBlock Text="{Binding Source}" /> </Grid> </UserControl>
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.