In This Article

PartEditBoxBaseAutomationPeer<T> Class

Exposes PartEditBoxBase<T> types to UI Automation.

public class PartEditBoxBaseAutomationPeer<T> : FrameworkElementAutomationPeer
Type Parameters:
T -

The type of value being edited.

Inheritance:
object AutomationPeer UIElementAutomationPeer FrameworkElementAutomationPeer object

Constructors

PartEditBoxBaseAutomationPeer(PartEditBoxBase<T>)

Exposes PartEditBoxBase<T> types to UI Automation.

public PartEditBoxBaseAutomationPeer(PartEditBoxBase<T> owner)
Parameter Type Description
owner PartEditBoxBase<T>

The owner element.

Properties

ExpandCollapseState

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

public ExpandCollapseState ExpandCollapseState { get; }

Property Value

ExpandCollapseState

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.

ToggleState

Gets the toggle state of the control.

public ToggleState ToggleState { get; }

Property Value

ToggleState:

The ToggleState of the control.

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.

Toggle()

Cycles through the toggle states of a control.

public void Toggle()

Extension Methods