New to Telerik UI for WinForms? Start a free 30-day trial

Provides root-fragment behavior and common UI Automation properties and events for a WinForms control.

Definition

Namespace:Telerik.WinControls.UIAutomation

Assembly:Telerik.WinControls.UI.dll

Type Parameters:

T

The concrete control type represented by this provider.

Syntax:

C#
public abstract class RadControlBaseRootUIAutomationProvider<T> : RadFragmentUIAutomationProvider, IRadRawElementProviderFragmentRoot, IRawElementProviderFragmentRoot, IRadRawElementProviderFragment, IRawElementProviderFragment, IRawElementProviderSimple where T : Control

Inheritance: objectRadFragmentUIAutomationProviderRadControlBaseRootUIAutomationProvider<T>

Derived Classes: RadGridViewUIAutomationProvider

Implements: IRadRawElementProviderFragmentIRadRawElementProviderFragmentRootIRawElementProviderFragmentIRawElementProviderFragmentRootIRawElementProviderSimple

Inherited Members RadFragmentUIAutomationProvider.childUIAProvidersPoolRadFragmentUIAutomationProvider.SetFocus()RadFragmentUIAutomationProvider.GetEmbeddedFragmentRoots()RadFragmentUIAutomationProvider.GetChildElementProviderFragment(object, Func<object, IRadRawElementProviderFragment>)RadFragmentUIAutomationProvider.GetChildElementProviderFragment(object, object, Func<object, object, IRadRawElementProviderFragment>)RadFragmentUIAutomationProvider.FindChildUIAutomationProvider<T>(object)RadFragmentUIAutomationProvider.Navigate(NavigateDirection)RadFragmentUIAutomationProvider.NavigatePreviousSibling(IRawElementProviderFragment)RadFragmentUIAutomationProvider.NavigateNextSibling(IRawElementProviderFragment)RadFragmentUIAutomationProvider.GetRectArray(Rect)RadFragmentUIAutomationProvider.ParentRadFragmentUIAutomationProvider.ProviderOptions...

Constructors

Creates a root provider for a control within an optional parent fragment.

C#
public RadControlBaseRootUIAutomationProvider(IRadRawElementProviderFragment parent, T owner)
Parameters:parentIRadRawElementProviderFragment

The parent fragment, or null when this provider is the root.

ownerT

The control represented by this provider.

Exceptions: ArgumentNullException

owner is null.

Creates a root provider for a control with no parent fragment.

C#
public RadControlBaseRootUIAutomationProvider(T owner)
Parameters:ownerT

The control represented by this provider.

Exceptions: ArgumentNullException

owner is null.

Properties

Gets the control's bounds in screen coordinates, or an empty rectangle before its handle is created.

C#
public override Rect BoundingRectangle { get; }

Overrides: RadFragmentUIAutomationProvider.BoundingRectangle

Implements: IRawElementProviderFragment.BoundingRectangle

Gets this provider as the root of its fragment tree.

C#
public override IRawElementProviderFragmentRoot FragmentRoot { get; }

Overrides: RadFragmentUIAutomationProvider.FragmentRoot

Implements: IRawElementProviderFragment.FragmentRoot

Gets the native host provider when the control's handle exists; otherwise returns null.

C#
public override IRawElementProviderSimple HostRawElementProvider { get; }

Overrides: RadFragmentUIAutomationProvider.HostRawElementProvider

Implements: IRawElementProviderSimple.HostRawElementProvider

Gets the control represented by this provider.

C#
public T Owner { get; }

Methods

Unsubscribes from control events and disconnects cached child providers.

C#
public override void Disconnect()

Overrides: RadFragmentUIAutomationProvider.Disconnect()

Implements: IRadRawElementProviderFragment.Disconnect()

Gets the fragment selected by the concrete provider for a screen point.

C#
public abstract IRawElementProviderFragment ElementProviderFromPoint(double x, double y)
Parameters:xdouble

The horizontal screen coordinate.

ydouble

The vertical screen coordinate.

Returns:

IRawElementProviderFragment

The fragment selected for the point.

Implements: IRawElementProviderFragmentRoot.ElementProviderFromPoint(double, double)

Gets the control's accessible name when set, or its Name otherwise.

C#
public override object GetAutomationId()
Returns:

object

Overrides: RadFragmentUIAutomationProvider.GetAutomationId()

Gets the fragment selected by the concrete provider as currently focused.

C#
public abstract IRawElementProviderFragment GetFocus()
Returns:

IRawElementProviderFragment

The focused fragment selected by the concrete provider.

Implements: IRawElementProviderFragmentRoot.GetFocus()

Gets the control represented by this provider.

C#
protected override object GetOwner()
Returns:

object

The owning control.

Overrides: RadFragmentUIAutomationProvider.GetOwner()

Gets a provider for a supported pattern; this base implementation supports none.

C#
public override object GetPatternProvider(int patternId)
Parameters:patternIdint

The identifier of the requested pattern.

Returns:

object

null.

Overrides: RadFragmentUIAutomationProvider.GetPatternProvider(int)

Implements: IRawElementProviderSimple.GetPatternProvider(int)

Gets the control's enabled state, its accessible name (falling back to name and then text), or help text; other properties use the base provider.

C#
public override object GetPropertyValue(int propertyId)
Parameters:propertyIdint

The identifier of the requested UI Automation property.

Returns:

object

The control's value for a handled property, or the base provider's result for other properties.

Overrides: RadFragmentUIAutomationProvider.GetPropertyValue(int)

Implements: IRawElementProviderSimple.GetPropertyValue(int)

Gets the root provider's runtime identifier, including the control handle and provider hash code.

C#
public override int[] GetRuntimeId()
Returns:

int[]

The append-runtime-id marker, control handle, and provider hash code.

Overrides: RadFragmentUIAutomationProvider.GetRuntimeId()

Implements: IRawElementProviderFragment.GetRuntimeId()

Gets the element under a screen point within a scroll bar, preferring its first button, second button, then thumb; otherwise returns the scroll-bar provider.

C#
public static IRawElementProviderFragment GetScrollbarElementAtPoint(RadScrollBarElement scrollbar, ScrollBarElementUIAutomationProvider scrollbarProvider, double x, double y)
Parameters:scrollbarRadScrollBarElement

The scroll-bar element to inspect.

scrollbarProviderScrollBarElementUIAutomationProvider

The UI Automation provider for the scroll bar.

xdouble

The horizontal screen coordinate.

ydouble

The vertical screen coordinate.

Returns:

IRawElementProviderFragment

The matching button or thumb provider, or scrollbarProvider when the point is elsewhere in the scroll bar.

Gets a shortcut for the first ampersand in the control's text when it introduces a mnemonic.

C#
protected virtual object GetShortcut(out int mnemonicIndex)
Parameters:mnemonicIndexint

Receives the first ampersand's index when the owner has text and is enabled and visible; otherwise, -1.

Returns:

object

The shortcut in the form "Alt + X", or null when no mnemonic is available.

Determines whether a screen point falls within an element's screen bounds.

C#
public static bool IsPointInControl(RadElement element, double x, double y)
Parameters:elementRadElement

The element to test.

xdouble

The horizontal screen coordinate.

ydouble

The vertical screen coordinate.

Returns:

bool

true when the element is attached to a control and the point is within its bounds; otherwise, false.

Raises an IsEnabled property change when UI Automation clients are listening.

C#
protected virtual void OnOwnerEnabledChanged(object sender, EventArgs e)
Parameters:senderobjecteEventArgs

Raises the UI Automation focus-changed event when clients are listening.

C#
protected virtual void OnOwnerGotFocus(object sender, EventArgs e)
Parameters:senderobjecteEventArgs

Releases the cached UI Automation provider when the control changes parent, or disconnects this provider when no manager owns it.

C#
protected virtual void OnOwnerParentChanged(object sender, EventArgs e)
Parameters:senderobjecteEventArgs