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 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 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.
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
- BarButton.CanCloneToRibbonQuickAccessToolBarProperty
- BarButton.HasLabelProperty
- BarButton.ImageSourceResolvedProperty
- BarButton.InputGestureTextProperty
- 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.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