Share via


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 AutomationPeer.GetPattern call and PatternInterface.Toggle.

public interface class IToggleProvider
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(34635970, 12457, 21231, 188, 50, 43, 121, 132, 123, 107, 167)]
struct IToggleProvider
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.Guid(34635970, 12457, 21231, 188, 50, 43, 121, 132, 123, 107, 167)]
public interface IToggleProvider
Public Interface IToggleProvider
Derived
Attributes

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 AutomationPeer.RaisePropertyChangedEvent.

Properties

ToggleState

Gets the toggle state of the control.

Methods

Toggle()

Cycles through the toggle states of a control.

Applies to

See also