Application.Host Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets various details about the Silverlight application's host.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)


Public ReadOnly Property Host As SilverlightHost
public SilverlightHost Host { get; }

Property Value

Type: System.Windows.Interop.SilverlightHost
A 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.

Run this sample

<UserControl x:Class="SilverlightApplication.Page"

        <TextBlock Text="{Binding Source}" />

Partial Public Class Page
    Inherits UserControl

    Public Sub New()


        Me.DataContext = App.Current.Host

    End Sub

End Class
using System.Windows.Controls; // UserControl

namespace SilverlightApplication
    public partial class Page : UserControl
        public Page()

            this.DataContext = App.Current.Host;

Version Information


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0


For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.