UI Automation Support

Telerik UI for Silverlight provides built-in support for Microsoft UI Automation – the accessibility framework for Microsoft Windows. UI Automation support is implemented through a tree of peer classes that derive from FrameworkElementAutomationPeer. We follow the convention about naming the peer classes – they begin with the control class name and end with “AutomationPeer”.

For detailed information on the UI Automation check the UI Automation Fundamentals section on MSDN.

AutomationMode

With Q2 2014 SP release of Telerik UI for Silverlight you will have the option to turn off the generating of the automation peers through the new global AutomationMode property of the AutomationManager.

Creating the automation peers can be turned off only for the whole application, not for separate controls.

AutomationMode property is of enum type and accepts the following values:

  • Disabled: This option will disable creating of automation peers of Telerik controls;
  • FrameworkOnly: This option will include only the base methods of AutomationPeers of MS classes;

  • Advanced: Will create the full AutomationPeer implementation for Telerik UI controls. This is the default value.

The next code snippet shows how the AutomationMode property can be set:

Example 1: Setting AutomationMode

using Telerik.Windows.Automation.Peers;  
 
public partial class App : Application 
{ 
    public App() 
    { 
        AutomationManager.AutomationMode = AutomationMode.Disabled; 
        this.InitializeComponent(); 
    } 
} 

UseDefaultHelpText

By default, most Telerik UI for Silverlight controls will return their class name as the HelpText when using UI automation.

With R1 2019 SP1 we introduced a new boolean UseDefaultHelpText property of the AutomationManager which determines whether the automation peer of the controls will return a predefined string (the class name) as HelpText.

The default value is true - the class name of the control will be returned as the HelpText if the GetHelpTextCore method is overridden in the respective automation peer class. When set to false, however, the value set as the AutomationProperties.HelpText will be returned.

The UseDefaultHelpText can be set similarly to the AutomationMode as demonstrated in Example 2.

Example 2: Setting UseDefaultHelpText

using Telerik.Windows.Automation.Peers;  
 
public partial class App : Application 
{ 
    public App() 
    { 
        AutomationManager.UseDefaultHelpText = false; 
        this.InitializeComponent(); 
    } 
} 
In this article