IToggleProvider Interface
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 class IToggleProvider
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(2478342800, 25967, 17655, 174, 175, 120, 184, 249, 68, 208, 98)]
struct IToggleProvider
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(2478342800, 25967, 17655, 174, 175, 120, 184, 249, 68, 208, 98)]
public interface IToggleProvider
Public Interface IToggleProvider
- Derived
- Attributes
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
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:
- AppBarAutomationPeer
- SemanticZoomAutomationPeer
- ToggleSwitchAutomationPeer
- ToggleButtonAutomationPeer, which is the base class for RadioButtonAutomationPeer and CheckBoxAutomationPeer
Use TogglePatternIdentifiers if you want to reference the IToggleProvider pattern properties from control code when you fire automation events or call RaisePropertyChangedEvent.
Toggle |
Gets the toggle state of the control. |
Toggle() |
Cycles through the toggle states of a control. |
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |