This documentation is archived and is not being maintained.

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

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: