Export (0) Print
Expand All
Expand Minimize

Control.AccessibleDescription Property

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

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

'Declaration
<LocalizableAttribute(True)> _
Public Property AccessibleDescription As String
'Usage
Dim instance As Control
Dim value As String

value = instance.AccessibleDescription

instance.AccessibleDescription = value
/** @property */
public String get_AccessibleDescription ()

/** @property */
public void set_AccessibleDescription (String value)

public function get AccessibleDescription () : String

public function set AccessibleDescription (value : String)

Not applicable.

Property Value

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

An object's AccessibleDescription property provides a textual description about an object's visual appearance. The description is primarily used to provide greater context for low-vision or blind users, but 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 object's AccessibleName, AccessibleRole, State, and Value properties. For example, a button with "OK" would not need additional information, but a button that shows a picture of a cactus would. The AccessibleName, and AccessibleRole (and perhaps Help) properties for the cactus button would describe its purpose, but the AccessibleDescription property would convey information that is less tangible, such as "A button that shows a picture of a cactus."

For more information about properties of accessible objects, see the "Content of Descriptive Properties" topic in the MSDN library at http://msdn.microsoft.com/library.

The following code example creates an instance of a CheckBox derived class, MyCheckBox, assigns it an Image to its Image property and sets the AccessibleName and AccessibleDescription properties, because the Text property is a null reference (Nothing in Visual Basic). This example requires that you have a Form named MyForm.

Public Sub New()
   ' Create a 'MyCheckBox' control and 
   ' display an image on it. 
   Dim myCheckBox As New MyCustomControls.MyCheckBox()
   myCheckBox.Location = New Point(5, 5)
   myCheckBox.Image = Image.FromFile( _
     Application.CommonAppDataPath + "\Preview.jpg")

   ' Set the AccessibleName property
   ' since there is no Text displayed. 
   myCheckBox.AccessibleName = "Preview"

   ' Set the AccessibleDescription text.
   myCheckBox.AccessibleDescription = _
     "A toggle button used to show the document preview."
   Me.Controls.Add(myCheckBox)
End Sub

public MyForm()
{
    // Create a 'MyCheckBox' control and 
    // display an image on it.
    MyCustomControls.MyCheckBox myCheckBox = 
        new MyCustomControls.MyCheckBox();
    myCheckBox.set_Location(new Point(5, 5));
    myCheckBox.set_Image(Image.FromFile(Application.get_CommonAppDataPath() 
        + "\\Preview.jpg"));
    // Set the AccessibleName property
    // since there is no Text displayed.
    myCheckBox.set_AccessibleName("Preview");
    myCheckBox.set_AccessibleDescription(
        "A toggle button used to show the document preview.");
    this.get_Controls().Add(myCheckBox);
} //MyForm

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft