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 a new instance of the BarToggleButton class.

public BarToggleButton()

Properties

IsChecked

Gets or sets 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 RoutedEventArgs containing data related to this event.

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

Identifies the IsCheckedChanged routed event. This field is read-only.

public static readonly RoutedEvent IsCheckedChangedEvent

IsCheckedProperty

Identifies the IsChecked dependency property. This field is read-only.

public static readonly DependencyProperty IsCheckedProperty

Inherited Members