Windows Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AutomationProperties.AccessibilityView attached property

Gets or sets the Microsoft UI Automation tree view mode for an element.


<object AutomationProperties.AccessibilityView="accessibilityViewMemberName" />

XAML Values

accessibilityViewMemberName

A constant name from the AccessibilityView enumeration, for example Control.

Remarks

Set this attached property on individual elements in a XAML UI, in order to change their element visibility to specific modes requested by a UI Automation client.

The main scenario for using this API is to deliberately omit certain controls in a template from the UI Automation views, because they don't meaningfully contribute to the accessibility view of the entire control. For example, if you look at the default control templates, you'll often see this XAML attribute applied to either a ContentPresenter or TextBlock that's part of a control composition, setting AutomationProperties.AccessibilityView to "Raw". If this hadn't been done, either the document view or control view would see these parts as distinct UI Automation elements and not as unimportant control parts. The "raw "view of a UI Automation tree is typically only consumed by automation tools or special modes in some of the more advanced assistive technology products.

It's also possible to change a control or a templated control part's accessibility view to be "Control" or "Content" using this API, but the scenarios where you'll need to do that aren't very common. Usually the problem you'll have in a UI, particularly in templates, is that too many elements are participating in a view. All the default controls will participate in views in expected ways. So you should not typically need to adjust the value for the controls you put in UI. And most template parts will have the expected values if they really are relevant for the "Control" or "Content" view.

AutomationProperties.AccessibilityView is an attached property, which supports a XAML usage. When getting this property in code, use GetAccessibilityView. When setting this property in code, use SetAccessibilityView. In code usages, the target parameter is the object where the attached property value is set. Another way to get or set the value in code is to use the dependency property system, calling either GetValue or SetValue and passing AccessibilityViewProperty as the dependency property identifier.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml.Automation

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Automation

Metadata

Windows.winmd

See also

AutomationProperties
Attached properties overview
Basic accessibility information

 

 

Show:
© 2015 Microsoft