Gets or sets the object name.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The GetChild with the index of the child whose name you are retrieving.property is a string used by clients to identify, find, or announce an object for the user. To access the name of a child object, you must first call
Notes to Inheritors:
All objects should support this property. An object's name should be intuitive so that users understand the object's meaning or purpose. Also, ensure that the Name property is unique relative to any sibling objects in the parent. Navigation within tables presents especially difficult problems for some users. Therefore, server developers should make table cell names as descriptive as possible. For example, you might create a cell name by combining the names of the row and column it occupies, such as "A1." However, it is generally better to use more descriptive names, such as "Karin, February." Many objects, such as icons, menus, check boxes, combo boxes, and other controls, have labels that are displayed to users. Any label displayed to users should be used for the object'sproperty. For more information, see the Property.
If you are using menu or button text for theproperty, strip out the ampersands (&) that mark the keyboard access keys.
The following example demonstrates the creation of an accessibility-aware chart control, using the AccessibleObject and Control.ControlAccessibleObject classes to expose accessible information. The control plots two curves along with a legend. The ChartControlAccessibleObject class, which derives from ControlAccessibleObject, is used in the CreateAccessibilityInstance method to provide custom accessible information for the chart control. Since the chart legend is not an actual Control -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the ChartControlAccessibleObject class overrides the GetChild method to return the CurveLegendAccessibleObject that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information.
This code excerpt demonstrates overriding the AccessibleObject class overview for the complete code example.property. See the
Available since 1.1