Freigeben über


Control.AccessibleDescription-Eigenschaft

Ruft die Beschreibung des von Clientprogrammen für Eingabehilfen verwendeten Steuerelements ab oder legt diese fest.

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

Syntax

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

value = instance.AccessibleDescription

instance.AccessibleDescription = value
[LocalizableAttribute(true)] 
public string AccessibleDescription { get; set; }
[LocalizableAttribute(true)] 
public:
property String^ AccessibleDescription {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_AccessibleDescription ()

/** @property */
public void set_AccessibleDescription (String value)
public function get AccessibleDescription () : String

public function set AccessibleDescription (value : String)

Eigenschaftenwert

Die Beschreibung des von Clientprogrammen für Eingabehilfen verwendeten Steuerelements. Der Standardwert ist NULL (Nothing in Visual Basic).

Hinweise

Die AccessibleDescription-Eigenschaft eines Objekts stellt eine Textbeschreibung der visuellen Darstellung eines Objekts bereit. Die Beschreibung wird hauptsächlich verwendet, um sehbehinderten oder blinden Benutzern mehr Kontextinformationen zur Verfügung zu stellen. Sie kann aber auch für Kontextsuche oder andere Anwendungen verwendet werden.

Die AccessibleDescription-Eigenschaft wird benötigt, wenn die Beschreibung des Objekts nicht sinnfällig oder aufgrund der Eigenschaften AccessibleName, AccessibleRole, State und Value des Objekts redundant ist. Für eine Schaltfläche mit dem Text "OK" sind z. B. keine zusätzlichen Informationen erforderlich, während für eine Schaltfläche mit dem Bild eines Kaktus eine Erklärung benötigt würde. Die AccessibleName-Eigenschaft, die AccessibleRole-Eigenschaft und möglicherweise die Help-Eigenschaft der Kaktusschaltfläche würden deren Zweck beschreiben, während die AccessibleDescription-Eigenschaft weniger konkrete Informationen übermitteln würde, z. B. "Eine Schaltfläche, die das Bild eines Kaktus zeigt."

Weitere Informationen zu Eigenschaften von zugreifbaren Objekten finden Sie in der MSDN Library unter https://msdn.microsoft.com/library/deu. im Thema "Content of Descriptive Properties".

Beispiel

Im folgenden Codebeispiel wird eine Instanz der von einer CheckBox abgeleiteten Klasse MyCheckBox erstellt. Deren Image-Eigenschaft wird ein Image zugewiesen sowie die AccessibleName-Eigenschaft und die AccessibleDescription-Eigenschaft festgelegt, da die Text-Eigenschaft NULL (Nothing in Visual Basic) ist. In diesem Beispiel muss ein Form mit der Bezeichnung MyForm vorhanden sein.

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.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";
   myCheckBox.AccessibleDescription =
     "A toggle button used to show the document preview.";
   this.Controls.Add(myCheckBox);
}
public:
   MyForm()
   {
      // Create a 'MyCheckBox' control and
      // display an image on it.
      MyCustomControls::MyCheckBox^ myCheckBox = gcnew MyCustomControls::MyCheckBox;
      myCheckBox->Location = Point(5,5);
      myCheckBox->Image = Image::FromFile( String::Concat( Application::CommonAppDataPath, "\\Preview.jpg" ) );
      
      // Set the AccessibleName property
      // since there is no Text displayed.
      myCheckBox->AccessibleName = "Preview";
      myCheckBox->AccessibleDescription = "A toggle button used to show the document preview.";
      this->Controls->Add( myCheckBox );
   }
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

Plattformen

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

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

Control-Klasse
Control-Member
System.Windows.Forms-Namespace
AccessibleName
AccessibleRole
Control.AccessibleDefaultActionDescription-Eigenschaft
AccessibleObject.Description-Eigenschaft