Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AutomationPeer.GetName Method

Gets the text string describing the element that is associated with this automation peer.

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

public string GetName ()
public String GetName ()
public function GetName () : String
You cannot use methods in XAML.

Return Value

The string that contains the name.

You can think of the name property as if it were a string of text that users use to explain the control they are referring to. This property is used by tools like Narrator to tell the user what the control is. For example, a button with a string "OK" should return "OK". A ListBox for selecting a color from a list should return "Colors".

Make certain that you have a textual representation for all controls in the graphical user interface (GUI) so that you can programmatically refer to the control in a localized manner.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

Show:
© 2014 Microsoft