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)
Syntax
'Declaration
<BrowsableAttribute(True)> _
Public Property AccessibleName As String
'Usage
Dim instance As Shape
Dim value As String
value = instance.AccessibleName
instance.AccessibleName = value
[BrowsableAttribute(true)]
public string AccessibleName { get; set; }
[BrowsableAttribute(true)]
public:
property String^ AccessibleName {
String^ get ();
void set (String^ value);
}
public function get AccessibleName () : String
public function set AccessibleName (value : String)
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).
Remarks
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."
For more information about properties of accessible objects, see Content of Descriptive Properties in the Active Accessibility section of the MSDN Library.
Examples
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.
Dim OvalShape1 As New OvalShape
Dim canvas As New ShapeContainer
' Set the form as the parent of the ShapeContainer.
canvas.Parent = Me
' Set the ShapeContainer as the parent of the OvalShape.
OvalShape1.Parent = canvas
' Assign an image resource to the BackgroundImage property.
OvalShape1.BackgroundImage = My.Resources.cactus
OvalShape1.Size = New Size(My.Resources.cactus.Size)
' Assign the AccessibleName and AccessibleDescription text.
OvalShape1.AccessibleName = "Image"
OvalShape1.AccessibleDescription = "A picture of a cactus"
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";
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.VisualBasic.PowerPacks Namespace
Other Resources
How to: Draw Lines with the LineShape Control (Visual Studio)
How to: Draw Shapes with the OvalShape and RectangleShape Controls (Visual Studio)