Shape.AccessibleDescription Property


Gets or sets the description of the control that is used by accessibility client applications.

Namespace:   Microsoft.VisualBasic.PowerPacks
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)

public string AccessibleDescription { get; set; }

Property Value

Type: System.String

A String that contains the description of the control that is used by accessibility client applications. The default is a null reference (Nothing in Visual Basic).

The AccessibleDescription property provides a textual description of the visual appearance of an object. The description is primarily used to provide better context for low-vision or blind users, but it can also be used for context searching or other applications.

The AccessibleDescription property is needed if the description is not obvious, or if it is redundant based on the AccessibleName or AccessibleRole of the object. For example, a shape displaying the text "Click here" would not need additional information, but a shape that shows a picture of a cactus would. The AccessibleName and AccessibleRole properties for the cactus shape would describe its purpose, but the AccessibleDescription property would communicate information that is less tangible, such as "A shape that shows a picture of a cactus."

The following example demonstrates how to set the AccessibleName and AccessibleDescription properties for an OvalShape control. Assume that you have added a picture file that is named "cactus" as a resource in your project.

OvalShape OvalShape1 = new OvalShape();
ShapeContainer canvas = new ShapeContainer();
// Set the form as the parent of the ShapeContainer.
canvas.Parent = this;
// Set the ShapeContainer as the parent of the OvalShape.
OvalShape1.Parent = canvas;
// Assign an image resource to the BackgroundImage property.
OvalShape1.BackgroundImage = VbPowerPacksShapeAccessibleCS.Properties.Resources.cactus;
OvalShape1.Size = new Size(VbPowerPacksShapeAccessibleCS.Properties.Resources.cactus.Height, 
// Assign the AccessibleName and AccessibleDescription text.
OvalShape1.AccessibleName = "Image";
OvalShape1.AccessibleDescription = "A picture of a cactus";
Return to top