AutomationPeer.GetNameCore Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

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


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

Return Value

Type: System..::.String
The name.


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".

Windows Phone 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 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

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0


Windows Phone

See Also


AutomationPeer Class

System.Windows.Automation.Peers Namespace