In This Article

BarToggleButton Class

Represents a toggle button control, for use within a ribbon or toolbar.

public class BarToggleButton : BarButton
Inheritance:
object Visual UIElement FrameworkElement Control ContentControl ButtonBase Button BarButton object
Derived:
BarCheckBox

Constructors

BarToggleButton()

Initializes an instance of the class.

public BarToggleButton()

Properties

IsChecked

Indicates whether the control is checked.

public bool IsChecked { get; set; }

Property Value

bool:

true if the control is checked; otherwise, false. The default value is false.

Methods

OnClick()

Called when a Button is clicked.

protected override void OnClick()

OnCreateAutomationPeer()

Creates an appropriate ButtonAutomationPeer for this control as part of the WPF infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

A ButtonAutomationPeer for this control.

OnIsCheckedChanged(RoutedEventArgs)

Occurs when the checked state changes.

protected virtual void OnIsCheckedChanged(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

The event data.

OnToggle()

Occurs when the button is toggled.

protected virtual void OnToggle()

Events

IsCheckedChanged

Occurs when the IsChecked property is changed.

public event RoutedEventHandler IsCheckedChanged

Event Type

RoutedEventHandler

Fields

IsCheckedChangedEvent

Defines the IsCheckedChanged routed event.

public static readonly RoutedEvent IsCheckedChangedEvent

IsCheckedProperty

Defines the IsChecked property.

public static readonly DependencyProperty IsCheckedProperty

Inherited Members

Extension Methods