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

Exposes the ribbon's application button, Quick Access toolbar, tabs, and group items as accessibility children.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
[ComVisible(true)]
public class RadRibbonBarAccessibleObject : Control.ControlAccessibleObject, IReflect, IAccessible

Inheritance: objectMarshalByRefObjectStandardOleMarshalObjectAccessibleObjectControl.ControlAccessibleObjectRadRibbonBarAccessibleObject...

Implements: IAccessibleIReflect

Constructors

Creates the accessibility object for a ribbon bar.

C#
public RadRibbonBarAccessibleObject(RadRibbonBar owner)
Parameters:ownerRadRibbonBar

The ribbon bar whose interactive items are exposed.

Fields

Stores a hovered ribbon item found while enumerating tab-group children; GetSelected() uses this field when creating an accessible child.

C#
protected RadItem selected

Properties

Gets the description for the ribbon's current hover selection.

C#
public override string Description { get; }

Overrides: Control.ControlAccessibleObject.Description

In coded UI mode, this returns the base description. Otherwise, it returns the hovered item's text, Application Menu for the application button, or the ribbon control's name when no item is hovered.

Gets the current description or sets the ribbon control's name.

C#
public override string Name { get; set; }

Overrides: Control.ControlAccessibleObject.Name

Outside coded UI mode, a hovered item supplies the getter's value, so setting the control name does not replace that item description.

Gets the ribbon bar represented by this accessibility object.

C#
public RadRibbonBar RibbonBar { get; }

Gets the accessible role for the ribbon or the item currently under the pointer.

C#
public override AccessibleRole Role { get; }

Overrides: Control.ControlAccessibleObject.Role

Coded UI mode always reports MenuBar. Otherwise, a hovered tab, check box, radio button, drop-down list, or button maps to its corresponding role; other states report a menu bar.

Gets the control state, adding Pressed while the ribbon element reports a mouse-down state.

C#
public override AccessibleStates State { get; }

Overrides: AccessibleObject.State

Methods

Invokes the application button's default click action.

C#
public override void DoDefaultAction()

Overrides: AccessibleObject.DoDefaultAction()

Searches a ribbon button group recursively for the first item under the pointer.

C#
public RadItem GetButtonGroupSelectedItem(RadItem item)
Parameters:itemRadItem

The item or button group to inspect.

Returns:

RadItem

The hovered item found in collection order, or null when no item is hovered.

Gets the accessible child at the specified index in application-button, Quick Access, tab, then group-item order.

C#
public override AccessibleObject GetChild(int index)
Parameters:indexint

The zero-based index among the children reported by GetChildCount().

Returns:

AccessibleObject

The accessible child at index, or null when no child is found.

Overrides: AccessibleObject.GetChild(int)

Gets the number of accessible children across the application button, Quick Access toolbar, command tabs, and tab-group items.

C#
public override int GetChildCount()
Returns:

int

The total number of accessible children.

Overrides: AccessibleObject.GetChildCount()

Finds the first ribbon item currently under the pointer, checking the application button, Quick Access items, tabs, and tab-group items.

C#
public RadItem GetRibbonSelectedItem()
Returns:

RadItem

The first hovered item in that search order, or null when none is hovered.

Gets an accessible representation of the ribbon's current hover selection.

C#
public override AccessibleObject GetSelected()
Returns:

AccessibleObject

null when no item is under the pointer; otherwise, the application-button object or a ribbon-item object created with the tracked selected item.

Overrides: AccessibleObject.GetSelected()

For non-application-button items, selected is updated only when GetChild(int) traverses a hovered tab-group item; this path therefore depends on prior child enumeration to populate the field.