AutomationFactory.IsAvailable Property


Gets a value that indicates whether the Automation feature in Silverlight is available to the application.

Namespace:  System.Runtime.InteropServices.Automation
Assembly:  System.Windows (in System.Windows.dll)

public static bool IsAvailable { get; }

Property Value

Type: System.Boolean
true if the Automation feature in Silverlight is available to the application; otherwise, false.

You should always check this property before using the AutomationFactory class to access an Automation server.

For more information about Automation, see Automation.

The following code example demonstrates how to use this property.

This example is part of a larger example in How to: Use Automation in Trusted Applications.

public MainPage()
    if (AutomationFactory.IsAvailable)
        // Use Outlook on a background thread to keep the UI responsive.
        BackgroundWorker worker = new BackgroundWorker();
        worker.DoWork += (sender, e) =>
            if (InitializeOutlook()) SearchEmail();
            else Dispatcher.BeginInvoke(() =>
                MessageBox.Show("Outlook is not available.");
        MessageBox.Show("Automation is not available.");


Supported in: 5, 4

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

Community Additions