mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-08 16:06:07 +02:00
Initial publish of WinForms for .NET 5. (#96)
* Migrate inprogress winforms contnet from docs * Fix preview note * Fix vb code * Minor fixes to keyboard articles * Minor adjustment to overview * Test redirects for 4.0 -> 5.0 * adjust links * Add mouse input section winforms (#81) * Update projects to .NET 5 * Update keyboard desc * Finish mouse events * Add remaining mouse articles;code * finish mouse input * minor fixes * Remove branch restriction (#82) * Update build-validation.yml (#84) * Update build-validation.yml (#85) * Fix vb proj * Add WinForms tutorial (#91) * redirect between overview * New create an app tutorial * Fix markdown * Fix preserve view setting * Add forms articles (#93) * Add forms articles * Fix warnings * Winforms publish (#95) * Prep TOC for publish * Updated date * Automatic how-to topic type * Update desc/headers * Fix links * Fix build errors * Add preview note * Update toc landing page * Convert old style project files * update download links * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> * Adjust number key * Update dotnet-desktop-guide/net/winforms/overview/index.md * Try toc position task via bookmark * Improve images * Remove sentence * File redirects Co-authored-by: Genevieve Warren <[email protected]>
This commit is contained in:
co-authored by
Genevieve Warren
parent
f7e5ce92ea
commit
184e6c9a0c
@@ -0,0 +1,87 @@
|
||||
---
|
||||
title: "Providing Accessibility Information for Controls on a Windows Form"
|
||||
description: Learn how to add accessibility information to a control. Windows Forms lets you add accessibility settings to a control to help people with disabilities.
|
||||
ms.date: 10/26/2020
|
||||
helpviewer_keywords:
|
||||
- "Windows Forms controls, accessibility"
|
||||
- "controls [Windows Forms], accessibility"
|
||||
- "accessibility [Windows Forms], Windows Forms controls"
|
||||
dev_langs:
|
||||
- "csharp"
|
||||
- "vb"
|
||||
---
|
||||
|
||||
# Providing Accessibility Information for Controls (Windows Forms .NET)
|
||||
|
||||
Accessibility aids are specialized programs and devices that help people with disabilities use computers more effectively. Examples include screen readers for people who are blind and voice input utilities for people who provide verbal commands instead of using the mouse or keyboard. These accessibility aids interact with the accessibility properties exposed by Windows Forms controls. These properties are:
|
||||
|
||||
- <xref:System.Windows.Forms.AccessibleObject?displayProperty=fullName>
|
||||
- <xref:System.Windows.Forms.Control.AccessibleDefaultActionDescription?displayProperty=fullName>
|
||||
- <xref:System.Windows.Forms.Control.AccessibleDescription?displayProperty=fullName>
|
||||
- <xref:System.Windows.Forms.Control.AccessibleName?displayProperty=fullName>
|
||||
- <xref:System.Windows.Forms.AccessibleRole?displayProperty=fullName>
|
||||
|
||||
[!INCLUDE [desktop guide under construction](../../includes/desktop-guide-preview-note.md)]
|
||||
|
||||
## AccessibilityObject Property
|
||||
|
||||
This read-only property contains an <xref:System.Windows.Forms.AccessibleObject> instance. The `AccessibleObject` implements the <xref:Accessibility.IAccessible> interface, which provides information about the control's description, screen location, navigational abilities, and value. The designer sets this value when the control is added to the form.
|
||||
|
||||
## AccessibleDefaultActionDescription Property
|
||||
|
||||
This string describes the action of the control. It does not appear in the Properties window and may only be set in code. The following example sets the <xref:System.Windows.Forms.Control.AccessibleDefaultActionDescription> property for a button control:
|
||||
|
||||
```vb
|
||||
Button1.AccessibleDefaultActionDescription = "Closes the application."
|
||||
```
|
||||
|
||||
```csharp
|
||||
button1.AccessibleDefaultActionDescription = "Closes the application.";
|
||||
```
|
||||
|
||||
## AccessibleDescription Property
|
||||
|
||||
This string describes the control. The <xref:System.Windows.Forms.Control.AccessibleDescription> property may be set in the Properties window, or in code as follows:
|
||||
|
||||
```vb
|
||||
Button1.AccessibleDescription = "A button with text 'Exit'."
|
||||
```
|
||||
|
||||
```csharp
|
||||
button1.AccessibleDescription = "A button with text 'Exit'";
|
||||
```
|
||||
|
||||
## AccessibleName Property
|
||||
|
||||
This is the name of a control reported to accessibility aids. The <xref:System.Windows.Forms.Control.AccessibleName> property may be set in the Properties window, or in code as follows:
|
||||
|
||||
```vb
|
||||
Button1.AccessibleName = "Order"
|
||||
```
|
||||
|
||||
```csharp
|
||||
button1.AccessibleName = "Order";
|
||||
```
|
||||
|
||||
## AccessibleRole Property
|
||||
|
||||
This property, which contains an <xref:System.Windows.Forms.AccessibleRole> enumeration, describes the user interface role of the control. A new control has the value set to `Default`. This would mean that by default, a `Button` control acts as a `Button`. You may want to reset this property if a control has another role. For example, you may be using a `PictureBox` control as a `Chart`, and you may want accessibility aids to report the role as a `Chart`, not as a `PictureBox`. You may also want to specify this property for custom controls you have developed. This property may be set in the Properties window, or in code as follows:
|
||||
|
||||
```vb
|
||||
PictureBox1.AccessibleRole = AccessibleRole.Chart
|
||||
```
|
||||
|
||||
```csharp
|
||||
pictureBox1.AccessibleRole = AccessibleRole.Chart;
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [Label control overview (Windows Forms .NET)](labels.md)
|
||||
- <xref:System.Windows.Forms.AccessibleObject>
|
||||
- <xref:System.Windows.Forms.Control.AccessibilityObject?displayProperty=nameWithType>
|
||||
- <xref:System.Windows.Forms.Control.AccessibleDefaultActionDescription?displayProperty=nameWithType>
|
||||
- <xref:System.Windows.Forms.Control.AccessibleDescription?displayProperty=nameWithType>
|
||||
- <xref:System.Windows.Forms.Control.AccessibleName?displayProperty=nameWithType>
|
||||
- <xref:System.Windows.Forms.Control.AccessibleRole?displayProperty=nameWithType>
|
||||
- <xref:System.Windows.Forms.AccessibleRole>
|
||||
Reference in New Issue
Block a user