IToggleProvider IToggleProvider IToggleProvider IToggleProvider Interface

Definition

Exposes methods and properties to support Microsoft UI Automation client access to controls that can cycle through a set of states and maintain a particular state. Implement this interface in order to support the capabilities that an automation client requests with a GetPattern call and PatternInterface.Toggle.

public : interface IToggleProvider
public interface IToggleProvider
Public Interface IToggleProvider
// You can't instantiate an interface directly in JavaScript. You can use objects that implement the interface, however.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Controls that do not maintain state when activated, such as buttons, toolbar buttons, and hyperlinks, must implement IInvokeProvider instead. The Toggle pattern has guidelines and conventions that aren't fully documented here. For more info on what this pattern is for, see Toggle Control Pattern.

IToggleProvider is implemented by these existing Windows Runtime classes:

Use TogglePatternIdentifiers if you want to reference the IToggleProvider pattern properties from control code when you fire automation events or call RaisePropertyChangedEvent.

Properties

ToggleState ToggleState ToggleState ToggleState

Gets the toggle state of the control.

public : ToggleState ToggleState { get; }
public ToggleState ToggleState { get; }
Public ReadOnly Property ToggleState As ToggleState
var toggleState = iToggleProvider.toggleState;
Value
ToggleState ToggleState ToggleState ToggleState

The toggle state of the control, as a value of the enumeration.

Methods

Toggle() Toggle() Toggle() Toggle()

Cycles through the toggle states of a control.

public : void Toggle()
public void Toggle()
Public Function Toggle() As void
iToggleProvider.toggle();

See Also