Shape.AccessibleName Property

 

Gets or sets the name 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)

[BrowsableAttribute(true)]
public string AccessibleName { get; set; }

Property Value

Type: System.String

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

The AccessibleName property is a label that briefly describes and identifies the object within its container. For example, a shape might have an AccessibleName of "small oval" or "blue square." A line might have an AccessibleName of "vertical line" or "diagonal red line."

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, 
    VbPowerPacksShapeAccessibleCS.Properties.Resources.cactus.Width);
// Assign the AccessibleName and AccessibleDescription text.
OvalShape1.AccessibleName = "Image";
OvalShape1.AccessibleDescription = "A picture of a cactus";
Return to top
Show: