Control.AccessibleDescription Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau mengatur deskripsi kontrol yang digunakan oleh aplikasi klien aksesibilitas.
public:
property System::String ^ AccessibleDescription { System::String ^ get(); void set(System::String ^ value); };
public string AccessibleDescription { get; set; }
public string? AccessibleDescription { get; set; }
member this.AccessibleDescription : string with get, set
Public Property AccessibleDescription As String
Nilai Properti
Deskripsi kontrol yang digunakan oleh aplikasi klien aksesibilitas. Defaultnya adalah null.
Contoh
Contoh kode berikut membuat instans kelas turunan CheckBox , MyCheckBox, menetapkannya Image ke propertinya Image dan mengatur AccessibleName properti dan AccessibleDescription , karena Text propertinya adalah null. Contoh ini mengharuskan Anda memiliki Form nama MyForm.
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.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 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
Keterangan
Properti objek AccessibleDescription memberikan deskripsi tekstual tentang tampilan visual objek. Deskripsi ini terutama digunakan untuk memberikan konteks yang lebih besar untuk pengguna penglihatan rendah atau buta, tetapi juga dapat digunakan untuk pencarian konteks atau aplikasi lain.
Properti AccessibleDescription diperlukan jika deskripsi tidak jelas, atau jika berlebihan berdasarkan properti objek AccessibleName, , AccessibleRoleState, dan Value . Misalnya, tombol dengan "OK" tidak memerlukan informasi tambahan, tetapi tombol yang menunjukkan gambar kaktus akan. Properti AccessibleName, dan (dan AccessibleRole mungkin Help) untuk tombol kaktus akan menjelaskan tujuannya, tetapi AccessibleDescription properti akan menyampaikan informasi yang kurang nyata, seperti "Tombol yang menunjukkan gambar kaktus."
Untuk informasi selengkapnya tentang properti objek yang dapat diakses, lihat Konten Properti Deskriptif.