In This Article

AutoCompleteBoxAutomationPeer Class

Exposes AutoCompleteBox types to UI Automation.

public class AutoCompleteBoxAutomationPeer : FrameworkElementAutomationPeer
Inheritance:
object AutomationPeer UIElementAutomationPeer FrameworkElementAutomationPeer object

Constructors

AutoCompleteBoxAutomationPeer(AutoCompleteBox)

Exposes AutoCompleteBox types to UI Automation.

public AutoCompleteBoxAutomationPeer(AutoCompleteBox owner)
Parameter Type Description
owner AutoCompleteBox

The owner element.

Properties

ExpandCollapseState

Gets the state, expanded or collapsed, of the control.

public ExpandCollapseState ExpandCollapseState { get; }

Property Value

ExpandCollapseState:

The state, expanded or collapsed, of the control.

IsReadOnly

Gets a value that specifies whether the value of a control is read-only.

public bool IsReadOnly { get; }

Property Value

bool:

true if the value is read-only; false if it can be modified.

Value

Gets the value of the control.

public string Value { get; }

Property Value

string:

The value of the control as a string.

Methods

Collapse()

Hides all nodes, controls, or content that are descendants of the control.

public void Collapse()

Expand()

Displays all child nodes, controls, or content of the control.

public void Expand()

GetAutomationControlTypeCore()

Gets the control type for the UIElement that is associated with this UIElementAutomationPeer. This method is called by GetAutomationControlType().

protected override AutomationControlType GetAutomationControlTypeCore()

Returns

AutomationControlType:

The Custom enumeration value.

GetClassNameCore()

Gets the name of the UIElement that is associated with this UIElementAutomationPeer. This method is called by GetClassName().

protected override string GetClassNameCore()

Returns

string:

An Empty string.

GetLocalizedControlTypeCore()

When overridden in a derived class, is called by GetLocalizedControlType().

protected override string GetLocalizedControlTypeCore()

Returns

string:

The type of the control.

GetPattern(PatternInterface)

Gets the control pattern for the UIElement that is associated with this UIElementAutomationPeer.

public override object GetPattern(PatternInterface patternInterface)
Parameter Type Description
patternInterface PatternInterface

A value from the enumeration.

Returns

object:

An object that implements the ISynchronizedInputProvider interface if patternInterface is SynchronizedInput; otherwise, null.

SetValue(string)

Sets the value of a control.

public void SetValue(string value)
Parameter Type Description
value string

The value to set. The provider is responsible for converting the value to the appropriate data type.

Exceptions

Type Condition
InvalidOperationException

If locale-specific information is passed to a control in an incorrect format such as an incorrectly formatted date.

ArgumentException

If a new value cannot be converted from a string to a format the control recognizes.

ElementNotEnabledException

When an attempt is made to manipulate a control that is not enabled.

Extension Methods