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)
Syntax
'Declaration
<BrowsableAttribute(True)> _
Public Property AccessibleDescription As String
Get
Set
[BrowsableAttribute(true)]
public string AccessibleDescription { get; set; }
[BrowsableAttribute(true)]
public:
property String^ AccessibleDescription {
String^ get ();
void set (String^ value);
}
[<BrowsableAttribute(true)>]
member AccessibleDescription : string with get, set
function get AccessibleDescription () : String
function set AccessibleDescription (value : String)
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).
Remarks
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."
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)