In This Article

BarToggleButton Class

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

public class BarToggleButton : BarButton, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, ICommandSource, IVariantSizeItem, ISupportsCoerceKeyTipText, ISupportsCoerceLabel
Inheritance:
System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control System.Windows.Controls.ContentControl System.Windows.Controls.Primitives.ButtonBase System.Windows.Controls.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

System.Boolean:

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

Methods

OnClick()

Called when a System.Windows.Controls.Button is clicked.

protected override void OnClick()

OnCreateAutomationPeer()

Creates an appropriate System.Windows.Automation.Peers.ButtonAutomationPeer for this control as part of the WPF infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

System.Windows.Automation.Peers.AutomationPeer:

A System.Windows.Automation.Peers.ButtonAutomationPeer for this control.

OnIsCheckedChanged(RoutedEventArgs)

Occurs when the checked state changes.

protected virtual void OnIsCheckedChanged(RoutedEventArgs e)
Parameter Type Description
e System.Windows.RoutedEventArgs

The System.Windows.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

System.Windows.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

Extension Methods