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

Provides common fragment navigation, child-provider caching, and UI Automation properties for a fragment in the accessibility tree.

Definition

Namespace:Telerik.WinControls.UIAutomation

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public abstract class RadFragmentUIAutomationProvider : IRadRawElementProviderFragment, IRawElementProviderFragment, IRawElementProviderSimple

Inheritance: objectRadFragmentUIAutomationProvider

Derived Classes: BaseRowInfoUIAutomationProvider<T>RadControlBaseRootUIAutomationProvider<T>RadElementBaseUIAutomationProvider<T>

Implements: IRadRawElementProviderFragmentIRawElementProviderFragmentIRawElementProviderSimple

Constructors

Creates a fragment provider with an optional parent in the UI Automation tree.

C#
public RadFragmentUIAutomationProvider(IRadRawElementProviderFragment parent)
Parameters:parentIRadRawElementProviderFragment

The containing fragment, or null when this provider has no parent.

Fields

Cached child providers, keyed by the UI element represented by each child.

C#
protected readonly IDictionary<object, IRadRawElementProviderFragment> childUIAProvidersPool

Properties

Gets the fragment's bounding rectangle in screen coordinates.

C#
public abstract Rect BoundingRectangle { get; }

Implements: IRawElementProviderFragment.BoundingRectangle

Gets this provider when it is also a fragment root; otherwise, gets the parent's fragment root.

C#
public virtual IRawElementProviderFragmentRoot FragmentRoot { get; }

Implements: IRawElementProviderFragment.FragmentRoot

Gets the host provider, or null when the fragment has no separate host provider.

C#
public virtual IRawElementProviderSimple HostRawElementProvider { get; }

Implements: IRawElementProviderSimple.HostRawElementProvider

Gets the parent fragment supplied when this provider was created.

C#
public virtual IRadRawElementProviderFragment Parent { get; }

Gets the provider options indicating a server-side provider using COM threading.

C#
public virtual ProviderOptions ProviderOptions { get; }

Implements: IRawElementProviderSimple.ProviderOptions

Methods

Disconnects cached child providers, clears the cache, and notifies the UI Automation provider manager.

C#
public virtual void Disconnect()

Implements: IRadRawElementProviderFragment.Disconnect()

Checks the cached provider for the specified element and attempts to search cached descendants. Only a direct match is returned; recursive match results are not propagated by this implementation.

C#
public T FindChildUIAutomationProvider<T>(object element) where T : IRawElementProviderFragment
Parameters:elementobject

The element whose cached provider is checked first.

Returns:

T

The cached provider for the specified element when it is of type T; otherwise, the default value, even if a deeper cached provider matches.

Implements: IRadRawElementProviderFragment.FindChildUIAutomationProvider<T>(object)

Gets the automation identifier for the represented element.

C#
public abstract object GetAutomationId()
Returns:

object

The identifier exposed through the AutomationId property.

Gets an existing cached provider for a child or creates and caches one with initFunc.

C#
public virtual IRawElementProviderFragment GetChildElementProviderFragment(object child, Func<object, IRadRawElementProviderFragment> initFunc = null)
Parameters:childobject

The element used as the cache key.

initFuncFunc<object, IRadRawElementProviderFragment>

The factory to invoke when the child has no cached provider.

Returns:

IRawElementProviderFragment

The cached or newly created provider, or null if the child or factory result is null.

Implements: IRadRawElementProviderFragment.GetChildElementProviderFragment(object, Func<object, IRadRawElementProviderFragment>)

Gets an existing cached provider for a child or creates and caches one with a context value.

C#
public virtual IRawElementProviderFragment GetChildElementProviderFragment(object child, object context, Func<object, object, IRadRawElementProviderFragment> initFunc = null)
Parameters:childobject

The element used as the cache key.

contextobject

Additional data passed to the provider factory.

initFuncFunc<object, object, IRadRawElementProviderFragment>

The factory to invoke when the child has no cached provider.

Returns:

IRawElementProviderFragment

The cached or newly created provider, or null if the child or factory result is null.

Implements: IRadRawElementProviderFragment.GetChildElementProviderFragment(object, object, Func<object, object, IRadRawElementProviderFragment>)

Gets embedded fragment roots, or null when none are exposed.

C#
public virtual IRawElementProviderSimple[] GetEmbeddedFragmentRoots()
Returns:

IRawElementProviderSimple[]

Implements: IRawElementProviderFragment.GetEmbeddedFragmentRoots()

Gets the UI element represented by this provider.

C#
protected abstract object GetOwner()
Returns:

object

The owner element for this fragment.

Gets the provider for a supported UI Automation pattern.

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

The identifier of the requested pattern.

Returns:

object

The pattern provider, or null when the pattern is unsupported.

Implements: IRawElementProviderSimple.GetPatternProvider(int)

Gets the fragment's AutomationId and bounding rectangle; unhandled property identifiers return null.

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

The identifier of the requested UI Automation property.

Returns:

object

The value for AutomationId or BoundingRectangle, or null for other properties.

Implements: IRawElementProviderSimple.GetPropertyValue(int)

Converts a Rect structure to an array of doubles.

C#
public static double[] GetRectArray(Rect rect)
Parameters:rectRectReturns:

double[]

Gets the runtime identifier used to distinguish this provider instance.

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

int[]

The provider's runtime identifier.

Implements: IRawElementProviderFragment.GetRuntimeId()

Navigates to this fragment's parent or a sibling through the parent provider.

C#
public virtual IRawElementProviderFragment Navigate(NavigateDirection direction)
Parameters:directionNavigateDirection

The navigation direction.

Returns:

IRawElementProviderFragment

The related fragment for Parent, PreviousSibling, or NextSibling; otherwise, null.

Implements: IRawElementProviderFragment.Navigate(NavigateDirection)

Navigates the next sibling of the specified child element. If there is no next sibling returns NULL.

C#
public virtual IRawElementProviderFragment NavigateNextSibling(IRawElementProviderFragment child)
Parameters:childIRawElementProviderFragmentReturns:

IRawElementProviderFragment

The next sibling element.

Implements: IRadRawElementProviderFragment.NavigateNextSibling(IRawElementProviderFragment)

Navigates the previous sibling of the specified child element. If there is no previous sibling returns NULL.

C#
public virtual IRawElementProviderFragment NavigatePreviousSibling(IRawElementProviderFragment child)
Parameters:childIRawElementProviderFragmentReturns:

IRawElementProviderFragment

The previous sibling element.

Implements: IRadRawElementProviderFragment.NavigatePreviousSibling(IRawElementProviderFragment)

Attempts to set focus to the represented element.

C#
public abstract void SetFocus()

Implements: IRawElementProviderFragment.SetFocus()