Base class for controls that can switch states, such as CheckBox.
public class ToggleButton : System.Windows.Controls.Primitives.ButtonBase
Customizing the ToggleButton Control
To apply the same property settings to multiple ToggleButton controls, use the Style property. You can modify the default ControlTemplate to give the control a unique appearance. For more information about creating a ControlTemplate, see Customizing the Appearance of an Existing Control by Creating a ControlTemplate. To see the parts and states that are specific to the ToggleButton, see ToggleButton Syles and Templates.
Dependency properties for this control might be set by the control’s default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see Default WPF Themes.
Setting a visual property will only have an effect if that property is both present in Button control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in Customizing the Appearance of an Existing Control by Creating a ControlTemplate.
Initializes a new instance of the ToggleButton class.
Identifies the Checked routed event.
Identifies the Indeterminate routed event.
Identifies the IsChecked dependency property.
Identifies the IsThreeState dependency property.
Identifies the Unchecked routed event.
Gets or sets whether the ToggleButton is checked.
Determines whether the control supports two or three states.
Called when a control is clicked by the mouse or the keyboard.
Provides an appropriate ToggleButtonAutomationPeer implementation for this control, as part of the WPF infrastructure.
Called by the OnClick() method to implement toggle behavior.
Returns the string representation of a ToggleButton object.
Occurs when a ToggleButton is checked.
Occurs when the state of a ToggleButton is neither on nor off.
Occurs when a ToggleButton is unchecked.