In This Article

SyntaxEditorAutomationPeer Class

Exposes SyntaxEditor type instances to UI Automation.

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

Constructors

SyntaxEditorAutomationPeer(SyntaxEditor)

Initializes a new instance of the SyntaxEditorAutomationPeer class.

public SyntaxEditorAutomationPeer(SyntaxEditor owner)
Parameter Type Description
owner SyntaxEditor

The owner element.

Properties

CurrentView

Gets the current control-specific view.

public int CurrentView { get; }

Property Value

int

Methods

GetAutomationControlTypeCore()

Gets the control type for the element that is associated with the UI Automation peer.

protected override AutomationControlType GetAutomationControlTypeCore()

Returns

AutomationControlType:

The control type.

GetClassNameCore()

Gets a name that is used with AutomationControlType, to differentiate the control that is represented by this AutomationPeer.

protected override string GetClassNameCore()

Returns

string:

The class name.

GetLocalizedControlTypeCore()

Gets a localized string that represents the AutomationControlType value for the control that is associated with this automation peer.

protected override string GetLocalizedControlTypeCore()

Returns

string:

The control type.

GetPattern(PatternInterface)

Gets the control pattern that is associated with the specified PatternInterface.

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

A value from the PatternInterface enumeration.

Returns

object:

The object that implements the pattern interface; null if the peer does not support this interface.

GetSupportedViews()

Retrieves a collection of control-specific view identifiers.

public int[] GetSupportedViews()

Returns

int[]:

A collection of values that identifies the views available for a UI Automation element.

GetViewName(int)

Retrieves the name of a control-specific view.

public string GetViewName(int viewId)
Parameter Type Description
viewId int

The view identifier.

Returns

string:

A localized name for the view.

Exceptions

Type Condition
ArgumentException

viewId is not a member of the supported views collection.

SetCurrentView(int)

Sets the current control-specific view.

public void SetCurrentView(int viewId)
Parameter Type Description
viewId int

A view identifier.

Exceptions

Type Condition
ArgumentException

viewId is not a member of the supported views collection.