Application.InstallState Property


Gets the current out-of-browser installation state of the application.

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

public InstallState InstallState { get; }

Property Value

Type: System.Windows.InstallState
The out-of-browser installation state of the application.

Use this property to determine whether a user has installed the application for use outside the browser. To determine whether the current application instance is running outside the browser, use the IsRunningOutOfBrowser property.

The following code example demonstrates how to use this property. This example is part of a larger example available in How to: Implement Offline Support for Out-of-Browser Applications.

private void UpdateUI()

    installButton.Visibility =
        app.InstallState == InstallState.NotInstalled ?
        Visibility.Visible : Visibility.Collapsed;

    updateButton.Visibility =
        app.IsRunningOutOfBrowser ? 
        Visibility.Visible : Visibility.Collapsed;

    isRunningOutOfBrowserTextBlock.Text = 

    installStateTextBlock.Text = app.InstallState.ToString();

private void UpdateNetworkIndicator()
    networkIndicator.Visibility =
        app.IsRunningOutOfBrowser ?
        Visibility.Visible : Visibility.Collapsed;

    bool online = NetworkInterface.GetIsNetworkAvailable();

    networkIndicator.Text = online ?
        "ONLINE" : "OFFLINE";

    updateButton.Visibility = online ?
        Visibility.Visible : Visibility.Collapsed;


Supported in: 5, 4, 3

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

Community Additions