Compartir a través de


AutomationPeer.GetNameCore Method

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

When overridden in a derived class, is called by GetName.

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

Syntax

'Declaration
Protected MustOverride Function GetNameCore As String
protected abstract string GetNameCore()

Return Value

Type: System.String
The name.

Remarks

You can think of this value as a string that UI Automation clients can use to explain or describe the control they are referring to. This property is used by UI Automation clients such as Narrator to tell the user what the control is. For example, a button where the text content is "OK" should return "OK" as its UI Automation Name. A ListBox control that lets users select a color might return "Colors".

Silverlight has default behavior that walks into the automation tree of a control and attempts to find plain text strings in the content, which are then forwarded as the name for UI Automation. However, this behavior is not implemented at this level. For more information, see Silverlight Accessibility Overview or FrameworkElementAutomationPeer.GetNameCore.

As part of general application support for accessibility, make sure that you have a valid UI Automation Name for all controls in the graphical user interface (GUI) so that accessibility tools such as screen readers can refer to each control in a localized manner. In some cases, a UI Automation Name can be composited by the control's peer behavior, but in other cases it is necessary to specify instance values for UI Automation Name by applying the AutomationProperties.Name attached property.

Notes to Inheritors

The initial implementation is empty.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

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

Platforms

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