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:
trueif the control is checked; otherwise,false. The default value isfalse.
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.
Fields
IsCheckedChangedEvent
Defines the IsCheckedChanged routed event.
public static readonly RoutedEvent IsCheckedChangedEvent
IsCheckedProperty
Defines the IsChecked property.
public static readonly DependencyProperty IsCheckedProperty
Inherited Members
- BarButton.CanCloneToRibbonQuickAccessToolBarProperty
- BarButton.HasLabelProperty
- BarButton.ImageSourceResolvedProperty
- BarButton.InputGestureTextProperty
- BarButton.InvocationFocusBehaviorProperty
- BarButton.IsInputGestureTextVisibleProperty
- BarButton.KeyProperty
- BarButton.KeyTipTextProperty
- BarButton.LabelProperty
- BarButton.LargeImageSourceProperty
- BarButton.MediumImageSourceProperty
- BarButton.ScreenTipFooterProperty
- BarButton.ScreenTipHeaderProperty
- BarButton.SmallImageSourceProperty
- BarButton.StaysOpenOnClickProperty
- BarButton.TitleProperty
- BarButton.ToolBarItemCollapseBehaviorProperty
- BarButton.ToolBarItemVariantBehaviorProperty
- BarButton.UserInterfaceDensityProperty
- BarButton.VariantSizeProperty
- BarButton.OnApplyTemplate()
- BarButton.OnKeyTipInvoked(KeyTipInvokedEventArgs)
- BarButton.OnMouseLeftButtonDown(MouseButtonEventArgs)
- BarButton.OnToolTipOpening(ToolTipEventArgs)
- BarButton.ToString()
- BarButton.CanCloneToRibbonQuickAccessToolBar
- BarButton.HasLabel
- BarButton.ImageSourceResolved
- BarButton.InputGestureText
- BarButton.InvocationFocusBehavior
- BarButton.IsInputGestureTextVisible
- BarButton.Key
- BarButton.KeyTipText
- BarButton.Label
- BarButton.LargeImageSource
- BarButton.MediumImageSource
- BarButton.ScreenTipFooter
- BarButton.ScreenTipHeader
- BarButton.SmallImageSource
- BarButton.StaysOpenOnClick
- BarButton.Title
- BarButton.ToolBarItemCollapseBehavior
- BarButton.ToolBarItemVariantBehavior
- BarButton.UserInterfaceDensity
- BarButton.VariantSize