CacheRequest::AutomationElementMode Property

 

Gets or sets a value that specifies whether returned elements should contain full references to the underlying user interface (UI), or only cached information.

Namespace:   System.Windows.Automation
Assembly:  UIAutomationClient (in UIAutomationClient.dll)

public:
property AutomationElementMode AutomationElementMode {
	AutomationElementMode get();
	void set(AutomationElementMode value);
}

Property Value

Type: System.Windows.Automation::AutomationElementMode

Full if the returned elements have a full reference to the underlying user interface (UI); otherwise None.

Full is the default value, and specifies that returned elements contain a full reference to the underlying UI. None specifies that the returned elements have no reference to the underlying UI, and contain only cached information.

Certain operations on elements, including GetCurrentPropertyValue, GetCurrentPattern, and SetFocus, require a full reference; attempting to perform these on an element that has none results in an InvalidOperationException.

Using None can be more efficient when only properties are needed, as it avoids the overhead involved in setting up full references.

In the following example, AutomationElementMode is set to None, with the result that only cached properties and patterns are available for the retrieved object.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show: