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

Defines the Toggle pattern contract and conversions from WinForms and Telerik toggle states to UI Automation states.

Definition

Namespace:Telerik.WinControls.UIAutomation

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public abstract class BaseToggleProvider : IToggleProvider

Inheritance: objectBaseToggleProvider

Implements: IToggleProvider

Constructors

C#
protected BaseToggleProvider()

Properties

Gets the current state in UI Automation's toggle-state representation.

C#
public abstract ToggleState ToggleState { get; }

Implements: IToggleProvider.ToggleState

Methods

Changes the associated element to its next toggle state.

C#
public abstract void Toggle()

Implements: IToggleProvider.Toggle()

Converts a Boolean value to the UI Automation On or Off state.

C#
public static ToggleState ToUIAToggleState(bool on)
Parameters:onbool

true to map to On; otherwise, maps to Off.

Returns:

ToggleState

The corresponding UI Automation toggle state.

Converts a WinForms check state to its UI Automation equivalent; values other than Checked and Indeterminate map to Off.

C#
public static ToggleState ToUIAToggleState(CheckState state)
Parameters:stateCheckState

The check state to convert.

Returns:

ToggleState

The corresponding UI Automation toggle state.

Converts a Telerik toggle state to its UI Automation equivalent; values other than On and Indeterminate map to Off.

C#
public static ToggleState ToUIAToggleState(ToggleState state)
Parameters:stateToggleState

The Telerik toggle state to convert.

Returns:

ToggleState

The corresponding UI Automation toggle state.