Partager via


LabelAutomationPeer.GetNameCore Method

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

Gets the UI Automation Name of the element that is associated with this LabelAutomationPeer. Called by GetName().

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

Syntax

'Declaration
Protected Overrides Function GetNameCore As String
protected override string GetNameCore()

Return Value

Type: System.String
The UI Automation Nameof the element that is associated with this automation peer.

Remarks

This implementation first checks for a Name value from base implementations. If no value exists, the implementation attempts to process the TextBlock content of the Label owner and treat it as a string. This promotes the visible text of the Label to serve as the UI Automation Name for automation and accessibility purposes.

Version Information

Silverlight

Supported in: 5

Platforms

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