AutomationPeer.GetNameCore Method

Definition

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

C#
protected abstract string GetNameCore();

Returns

The string that contains the label.

Remarks

You can think of this value as a string that users use to explain the control they are referring to. This property is used by tools such as Narrator to tell the user what the control is. For example, a button with a string "OK" should return "OK". A ListBox control that lets users select a color might return "Colors".

Make sure that you have assigned a name to 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.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also