AccessibleObject.Value Property

Definition

Gets or sets the value of an accessible object.

C#
public virtual string Value { get; set; }
C#
public virtual string? Value { get; set; }

Property Value

The value of an accessible object, or null if the object has no value set.

Exceptions

The value cannot be set or retrieved.

Remarks

Typically, the Value property represents visual information contained by the object. Not all objects support the Value property.

In most cases, the Value property is used to tell the client about what visual information an object contains. For example, the value for an edit control is the text it contains, but a menu item has no value.

The Value property can provide hierarchical information in cases such as a tree view control. Although the parent object in the tree view control does not provide information in the Value property, each item within the control has a zero-based value that represents its level within the hierarchy. Top-level items have a value of zero, second-level items have a value of one, and so on.

Note

The values returned from scroll bar and trackbar accessible objects indicate percentages, so they are integers between 0 and 100, inclusive.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 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

See also