ToggleButton ToggleButton ToggleButton Class

Definition

Represents a control that a user can select (check) or clear (uncheck). Base class for controls that can switch states, such as CheckBox and RadioButton.

public : class ToggleButton : ButtonBase, IToggleButton, IToggleButtonOverrides
public class ToggleButton : ButtonBase, IToggleButton, IToggleButtonOverrides
Public Class ToggleButton Inherits ButtonBase Implements IToggleButton, IToggleButtonOverrides
<ToggleButton .../>
-or-
<ToggleButton>
    singleObject
</ToggleButton>
-or-
<ToggleButton>contentString</ToggleButton>
Inheritance
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Examples

The following example shows how to create a three-state ToggleButton control.

<ToggleButton Margin="5" Content="Three State" Width="150" IsThreeState="True"/>
<ToggleButton Margin="5" Content="Two State" Width="150" IsThreeState="False" />

Remarks

ToggleButton and can have three states:

StatePropertyValue
checkedIsChecked IsChecked true
uncheckedIsChecked IsChecked false
indeterminateIsChecked IsChecked null

For the ToggleButton to report the indeterminate state, you must set the IsThreeState property to true.

Note

ToggleButton has the same visual state for the indeterminate and unchecked states. Derived controls, like CheckBox, may define different visual states for each state.

ToggleButton derived classes

ToggleButton is the parent class for several immediately derived controls that toggle and are selectable:

Constructors

ToggleButton() ToggleButton() ToggleButton()

Initializes a new instance of the ToggleButton class.

public : ToggleButton()
public ToggleButton()
Public Sub New()

Properties

AccessKey AccessKey AccessKey

Inherited from UIElement

AccessKeyProperty AccessKeyProperty AccessKeyProperty

Inherited from UIElement

AccessKeyScopeOwner AccessKeyScopeOwner AccessKeyScopeOwner

Inherited from UIElement

AccessKeyScopeOwnerProperty AccessKeyScopeOwnerProperty AccessKeyScopeOwnerProperty

Inherited from UIElement

ActualHeight ActualHeight ActualHeight

Inherited from FrameworkElement

ActualHeightProperty ActualHeightProperty ActualHeightProperty

Inherited from FrameworkElement

ActualTheme ActualTheme ActualTheme

Inherited from FrameworkElement

ActualThemeProperty ActualThemeProperty ActualThemeProperty

Inherited from FrameworkElement

ActualWidth ActualWidth ActualWidth

Inherited from FrameworkElement

ActualWidthProperty ActualWidthProperty ActualWidthProperty

Inherited from FrameworkElement

AllowDrop AllowDrop AllowDrop

Inherited from UIElement

AllowDropProperty AllowDropProperty AllowDropProperty

Inherited from UIElement

AllowFocusOnInteraction AllowFocusOnInteraction AllowFocusOnInteraction

Inherited from FrameworkElement

AllowFocusOnInteractionProperty AllowFocusOnInteractionProperty AllowFocusOnInteractionProperty

Inherited from FrameworkElement

AllowFocusWhenDisabled AllowFocusWhenDisabled AllowFocusWhenDisabled

Inherited from FrameworkElement

AllowFocusWhenDisabledProperty AllowFocusWhenDisabledProperty AllowFocusWhenDisabledProperty

Inherited from FrameworkElement

Background Background Background

Inherited from Control

BackgroundProperty BackgroundProperty BackgroundProperty

Inherited from Control

BaseUri BaseUri BaseUri

Inherited from FrameworkElement

BorderBrush BorderBrush BorderBrush

Inherited from Control

BorderBrushProperty BorderBrushProperty BorderBrushProperty

Inherited from Control

BorderThickness BorderThickness BorderThickness

Inherited from Control

BorderThicknessProperty BorderThicknessProperty BorderThicknessProperty

Inherited from Control

CacheMode CacheMode CacheMode

Inherited from UIElement

CacheModeProperty CacheModeProperty CacheModeProperty

Inherited from UIElement

CanDrag CanDrag CanDrag

Inherited from UIElement

CanDragProperty CanDragProperty CanDragProperty

Inherited from UIElement

CharacterReceivedEvent CharacterReceivedEvent CharacterReceivedEvent

Inherited from UIElement

CharacterSpacing CharacterSpacing CharacterSpacing

Inherited from Control

CharacterSpacingProperty CharacterSpacingProperty CharacterSpacingProperty

Inherited from Control

ClickMode ClickMode ClickMode

Inherited from ButtonBase

ClickModeProperty ClickModeProperty ClickModeProperty

Inherited from ButtonBase

Clip Clip Clip

Inherited from UIElement

ClipProperty ClipProperty ClipProperty

Inherited from UIElement

Command Command Command

Inherited from ButtonBase

CommandParameter CommandParameter CommandParameter

Inherited from ButtonBase

CommandParameterProperty CommandParameterProperty CommandParameterProperty

Inherited from ButtonBase

CommandProperty CommandProperty CommandProperty

Inherited from ButtonBase

CompositeMode CompositeMode CompositeMode

Inherited from UIElement

CompositeModeProperty CompositeModeProperty CompositeModeProperty

Inherited from UIElement

Content Content Content

Inherited from Windows.UI.Xaml.ControlsControl.Content

ContentProperty ContentProperty ContentProperty

Inherited from ContentControl

ContentTemplate ContentTemplate ContentTemplate

Inherited from ContentControl

ContentTemplateProperty ContentTemplateProperty ContentTemplateProperty

Inherited from ContentControl

ContentTemplateRoot ContentTemplateRoot ContentTemplateRoot

Inherited from ContentControl

ContentTemplateSelector ContentTemplateSelector ContentTemplateSelector

Inherited from ContentControl

ContentTemplateSelectorProperty ContentTemplateSelectorProperty ContentTemplateSelectorProperty

Inherited from ContentControl

ContentTransitions ContentTransitions ContentTransitions

Inherited from ContentControl

ContentTransitionsProperty ContentTransitionsProperty ContentTransitionsProperty

Inherited from ContentControl

ContextFlyout ContextFlyout ContextFlyout

Inherited from UIElement

ContextFlyoutProperty ContextFlyoutProperty ContextFlyoutProperty

Inherited from UIElement

DataContext DataContext DataContext

Inherited from FrameworkElement

DataContextProperty DataContextProperty DataContextProperty

Inherited from FrameworkElement

DefaultStyleKey DefaultStyleKey DefaultStyleKey

Inherited from Control

DefaultStyleKeyProperty DefaultStyleKeyProperty DefaultStyleKeyProperty

Inherited from Control

DefaultStyleResourceUri DefaultStyleResourceUri DefaultStyleResourceUri

Inherited from Control

DefaultStyleResourceUriProperty DefaultStyleResourceUriProperty DefaultStyleResourceUriProperty

Inherited from Control

DesiredSize DesiredSize DesiredSize

Inherited from UIElement

Dispatcher Dispatcher Dispatcher

Inherited from DependencyObject

DoubleTappedEvent DoubleTappedEvent DoubleTappedEvent

Inherited from UIElement

DragEnterEvent DragEnterEvent DragEnterEvent

Inherited from UIElement

DragLeaveEvent DragLeaveEvent DragLeaveEvent

Inherited from UIElement

DragOverEvent DragOverEvent DragOverEvent

Inherited from UIElement

DropEvent DropEvent DropEvent

Inherited from UIElement

ElementSoundMode ElementSoundMode ElementSoundMode

Inherited from Control

ElementSoundModeProperty ElementSoundModeProperty ElementSoundModeProperty

Inherited from Control

ExitDisplayModeOnAccessKeyInvoked ExitDisplayModeOnAccessKeyInvoked ExitDisplayModeOnAccessKeyInvoked

Inherited from UIElement

ExitDisplayModeOnAccessKeyInvokedProperty ExitDisplayModeOnAccessKeyInvokedProperty ExitDisplayModeOnAccessKeyInvokedProperty

Inherited from UIElement

FlowDirection FlowDirection FlowDirection

Inherited from FrameworkElement

FlowDirectionProperty FlowDirectionProperty FlowDirectionProperty

Inherited from FrameworkElement

FocusState FocusState FocusState

Inherited from Control

FocusStateProperty FocusStateProperty FocusStateProperty

Inherited from Control

FocusVisualMargin FocusVisualMargin FocusVisualMargin

Inherited from FrameworkElement

FocusVisualMarginProperty FocusVisualMarginProperty FocusVisualMarginProperty

Inherited from FrameworkElement

FocusVisualPrimaryBrush FocusVisualPrimaryBrush FocusVisualPrimaryBrush

Inherited from FrameworkElement

FocusVisualPrimaryBrushProperty FocusVisualPrimaryBrushProperty FocusVisualPrimaryBrushProperty

Inherited from FrameworkElement

FocusVisualPrimaryThickness FocusVisualPrimaryThickness FocusVisualPrimaryThickness

Inherited from FrameworkElement

FocusVisualPrimaryThicknessProperty FocusVisualPrimaryThicknessProperty FocusVisualPrimaryThicknessProperty

Inherited from FrameworkElement

FocusVisualSecondaryBrush FocusVisualSecondaryBrush FocusVisualSecondaryBrush

Inherited from FrameworkElement

FocusVisualSecondaryBrushProperty FocusVisualSecondaryBrushProperty FocusVisualSecondaryBrushProperty

Inherited from FrameworkElement

FocusVisualSecondaryThickness FocusVisualSecondaryThickness FocusVisualSecondaryThickness

Inherited from FrameworkElement

FocusVisualSecondaryThicknessProperty FocusVisualSecondaryThicknessProperty FocusVisualSecondaryThicknessProperty

Inherited from FrameworkElement

FontFamily FontFamily FontFamily

Inherited from Control

FontFamilyProperty FontFamilyProperty FontFamilyProperty

Inherited from Control

FontSize FontSize FontSize

Inherited from Control

FontSizeProperty FontSizeProperty FontSizeProperty

Inherited from Control

FontStretch FontStretch FontStretch

Inherited from Control

FontStretchProperty FontStretchProperty FontStretchProperty

Inherited from Control

FontStyle FontStyle FontStyle

Inherited from Control

FontStyleProperty FontStyleProperty FontStyleProperty

Inherited from Control

FontWeight FontWeight FontWeight

Inherited from Control

FontWeightProperty FontWeightProperty FontWeightProperty

Inherited from Control

Foreground Foreground Foreground

Inherited from Control

ForegroundProperty ForegroundProperty ForegroundProperty

Inherited from Control

GettingFocusEvent GettingFocusEvent GettingFocusEvent

Inherited from UIElement

Height Height Height

Inherited from FrameworkElement

HeightProperty HeightProperty HeightProperty

Inherited from FrameworkElement

HighContrastAdjustment HighContrastAdjustment HighContrastAdjustment

Inherited from UIElement

HighContrastAdjustmentProperty HighContrastAdjustmentProperty HighContrastAdjustmentProperty

Inherited from UIElement

HoldingEvent HoldingEvent HoldingEvent

Inherited from UIElement

HorizontalAlignment HorizontalAlignment HorizontalAlignment

Inherited from FrameworkElement

HorizontalAlignmentProperty HorizontalAlignmentProperty HorizontalAlignmentProperty

Inherited from FrameworkElement

HorizontalContentAlignment HorizontalContentAlignment HorizontalContentAlignment

Inherited from Control

HorizontalContentAlignmentProperty HorizontalContentAlignmentProperty HorizontalContentAlignmentProperty

Inherited from Control

IsAccessKeyScope IsAccessKeyScope IsAccessKeyScope

Inherited from UIElement

IsAccessKeyScopeProperty IsAccessKeyScopeProperty IsAccessKeyScopeProperty

Inherited from UIElement

IsChecked IsChecked IsChecked

Gets or sets whether the ToggleButton is checked.

public : IReference<Platform::Boolean> IsChecked { get; set; }
public Nullable<bool> IsChecked { get; set; }
Public ReadWrite Property IsChecked As Nullable<bool>
<togglebutton IsChecked="bool"/>
-or-
<togglebutton IsChecked="{x:Null}"/>
Value
IReference<Platform::Boolean> Nullable<bool> Nullable<bool>

true if the ToggleButton is checked; false if the ToggleButton is unchecked; otherwise null. The default is false.

If you are programming using C#or Microsoft Visual Basic, the type of this property is projected as bool?(a nullable Boolean).

Remarks

ToggleButton and can have three states:

StatePropertyValue
checkedIsChecked IsChecked true
uncheckedIsChecked IsChecked false
indeterminateIsChecked IsChecked null

For the ToggleButton to report the indeterminate state, you must set the IsThreeState property to true.

Note

ToggleButton has the same visual state for the indeterminate and unchecked states. Derived controls, like CheckBox, may define different visual states for each state.

To set the value to null in XAML, use the {x:Null} markup extension.

See Also

IsCheckedProperty IsCheckedProperty IsCheckedProperty

Identifies the IsChecked dependency property.

public : static DependencyProperty IsCheckedProperty { get; }
public static DependencyProperty IsCheckedProperty { get; }
Public Static ReadOnly Property IsCheckedProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the IsChecked dependency property.

IsDoubleTapEnabled IsDoubleTapEnabled IsDoubleTapEnabled

Inherited from UIElement

IsDoubleTapEnabledProperty IsDoubleTapEnabledProperty IsDoubleTapEnabledProperty

Inherited from UIElement

IsEnabled IsEnabled IsEnabled

Inherited from Control

IsEnabledProperty IsEnabledProperty IsEnabledProperty

Inherited from Control

IsFocusEngaged IsFocusEngaged IsFocusEngaged

Inherited from Control

IsFocusEngagedProperty IsFocusEngagedProperty IsFocusEngagedProperty

Inherited from Control

IsFocusEngagementEnabled IsFocusEngagementEnabled IsFocusEngagementEnabled

Inherited from Control

IsFocusEngagementEnabledProperty IsFocusEngagementEnabledProperty IsFocusEngagementEnabledProperty

Inherited from Control

IsHitTestVisible IsHitTestVisible IsHitTestVisible

Inherited from UIElement

IsHitTestVisibleProperty IsHitTestVisibleProperty IsHitTestVisibleProperty

Inherited from UIElement

IsHoldingEnabled IsHoldingEnabled IsHoldingEnabled

Inherited from UIElement

IsHoldingEnabledProperty IsHoldingEnabledProperty IsHoldingEnabledProperty

Inherited from UIElement

IsPointerOver IsPointerOver IsPointerOver

Inherited from ButtonBase

IsPointerOverProperty IsPointerOverProperty IsPointerOverProperty

Inherited from ButtonBase

IsPressed IsPressed IsPressed

Inherited from ButtonBase

IsPressedProperty IsPressedProperty IsPressedProperty

Inherited from ButtonBase

IsRightTapEnabled IsRightTapEnabled IsRightTapEnabled

Inherited from UIElement

IsRightTapEnabledProperty IsRightTapEnabledProperty IsRightTapEnabledProperty

Inherited from UIElement

IsTabStop IsTabStop IsTabStop

Inherited from Control

IsTabStopProperty IsTabStopProperty IsTabStopProperty

Inherited from Control

IsTapEnabled IsTapEnabled IsTapEnabled

Inherited from UIElement

IsTapEnabledProperty IsTapEnabledProperty IsTapEnabledProperty

Inherited from UIElement

IsTemplateFocusTargetProperty IsTemplateFocusTargetProperty IsTemplateFocusTargetProperty

Inherited from Control

IsTemplateKeyTipTargetProperty IsTemplateKeyTipTargetProperty IsTemplateKeyTipTargetProperty

Inherited from Control

IsTextScaleFactorEnabled IsTextScaleFactorEnabled IsTextScaleFactorEnabled

Inherited from Control

IsTextScaleFactorEnabledProperty IsTextScaleFactorEnabledProperty IsTextScaleFactorEnabledProperty

Inherited from Control

IsThreeState IsThreeState IsThreeState

Gets or sets a value that indicates whether the control supports three states.

public : Platform::Boolean IsThreeState { get; set; }
public bool IsThreeState { get; set; }
Public ReadWrite Property IsThreeState As bool
<togglebutton IsThreeState="bool"/>
Value
Platform::Boolean bool bool

True if the control supports three states; otherwise, false. The default is false.

Remarks

ToggleButton and can have three states:

StatePropertyValue
checkedIsChecked IsChecked true
uncheckedIsChecked IsChecked false
indeterminateIsChecked IsChecked null

For the ToggleButton to report the indeterminate state, you must set the IsThreeState property to true.

Note

ToggleButton has the same visual state for the indeterminate and unchecked states. Derived controls, like CheckBox, may define different visual states for each state.

IsThreeStateProperty IsThreeStateProperty IsThreeStateProperty

Identifies the IsThreeState dependency property.

public : static DependencyProperty IsThreeStateProperty { get; }
public static DependencyProperty IsThreeStateProperty { get; }
Public Static ReadOnly Property IsThreeStateProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the IsThreeState dependency property.

KeyDownEvent KeyDownEvent KeyDownEvent

Inherited from UIElement

KeyTipHorizontalOffset KeyTipHorizontalOffset KeyTipHorizontalOffset

Inherited from UIElement

KeyTipHorizontalOffsetProperty KeyTipHorizontalOffsetProperty KeyTipHorizontalOffsetProperty

Inherited from UIElement

KeyTipPlacementMode KeyTipPlacementMode KeyTipPlacementMode

Inherited from UIElement

KeyTipPlacementModeProperty KeyTipPlacementModeProperty KeyTipPlacementModeProperty

Inherited from UIElement

KeyTipVerticalOffset KeyTipVerticalOffset KeyTipVerticalOffset

Inherited from UIElement

KeyTipVerticalOffsetProperty KeyTipVerticalOffsetProperty KeyTipVerticalOffsetProperty

Inherited from UIElement

KeyUpEvent KeyUpEvent KeyUpEvent

Inherited from UIElement

KeyboardAccelerators KeyboardAccelerators KeyboardAccelerators

Inherited from UIElement

Language Language Language

Inherited from FrameworkElement

LanguageProperty LanguageProperty LanguageProperty

Inherited from FrameworkElement

Lights Lights Lights

Inherited from UIElement

LightsProperty LightsProperty LightsProperty

Inherited from UIElement

LosingFocusEvent LosingFocusEvent LosingFocusEvent

Inherited from UIElement

ManipulationCompletedEvent ManipulationCompletedEvent ManipulationCompletedEvent

Inherited from UIElement

ManipulationDeltaEvent ManipulationDeltaEvent ManipulationDeltaEvent

Inherited from UIElement

ManipulationInertiaStartingEvent ManipulationInertiaStartingEvent ManipulationInertiaStartingEvent

Inherited from UIElement

ManipulationMode ManipulationMode ManipulationMode

Inherited from UIElement

ManipulationModeProperty ManipulationModeProperty ManipulationModeProperty

Inherited from UIElement

ManipulationStartedEvent ManipulationStartedEvent ManipulationStartedEvent

Inherited from UIElement

ManipulationStartingEvent ManipulationStartingEvent ManipulationStartingEvent

Inherited from UIElement

Margin Margin Margin

Inherited from FrameworkElement

MarginProperty MarginProperty MarginProperty

Inherited from FrameworkElement

MaxHeight MaxHeight MaxHeight

Inherited from FrameworkElement

MaxHeightProperty MaxHeightProperty MaxHeightProperty

Inherited from FrameworkElement

MaxWidth MaxWidth MaxWidth

Inherited from FrameworkElement

MaxWidthProperty MaxWidthProperty MaxWidthProperty

Inherited from FrameworkElement

MinHeight MinHeight MinHeight

Inherited from FrameworkElement

MinHeightProperty MinHeightProperty MinHeightProperty

Inherited from FrameworkElement

MinWidth MinWidth MinWidth

Inherited from FrameworkElement

MinWidthProperty MinWidthProperty MinWidthProperty

Inherited from FrameworkElement

Name Name Name

Inherited from FrameworkElement

NameProperty NameProperty NameProperty

Inherited from FrameworkElement

NoFocusCandidateFoundEvent NoFocusCandidateFoundEvent NoFocusCandidateFoundEvent

Inherited from UIElement

Opacity Opacity Opacity

Inherited from UIElement

OpacityProperty OpacityProperty OpacityProperty

Inherited from UIElement

Padding Padding Padding

Inherited from Control

PaddingProperty PaddingProperty PaddingProperty

Inherited from Control

Parent Parent Parent

Inherited from FrameworkElement

PointerCanceledEvent PointerCanceledEvent PointerCanceledEvent

Inherited from UIElement

PointerCaptureLostEvent PointerCaptureLostEvent PointerCaptureLostEvent

Inherited from UIElement

PointerCaptures PointerCaptures PointerCaptures

Inherited from UIElement

PointerCapturesProperty PointerCapturesProperty PointerCapturesProperty

Inherited from UIElement

PointerEnteredEvent PointerEnteredEvent PointerEnteredEvent

Inherited from UIElement

PointerExitedEvent PointerExitedEvent PointerExitedEvent

Inherited from UIElement

PointerMovedEvent PointerMovedEvent PointerMovedEvent

Inherited from UIElement

PointerPressedEvent PointerPressedEvent PointerPressedEvent

Inherited from UIElement

PointerReleasedEvent PointerReleasedEvent PointerReleasedEvent

Inherited from UIElement

PointerWheelChangedEvent PointerWheelChangedEvent PointerWheelChangedEvent

Inherited from UIElement

PreviewKeyDownEvent PreviewKeyDownEvent PreviewKeyDownEvent

Inherited from UIElement

PreviewKeyUpEvent PreviewKeyUpEvent PreviewKeyUpEvent

Inherited from UIElement

Projection Projection Projection

Inherited from UIElement

ProjectionProperty ProjectionProperty ProjectionProperty

Inherited from UIElement

RenderSize RenderSize RenderSize

Inherited from UIElement

RenderTransform RenderTransform RenderTransform

Inherited from UIElement

RenderTransformOrigin RenderTransformOrigin RenderTransformOrigin

Inherited from UIElement

RenderTransformOriginProperty RenderTransformOriginProperty RenderTransformOriginProperty

Inherited from UIElement

RenderTransformProperty RenderTransformProperty RenderTransformProperty

Inherited from UIElement

RequestedTheme RequestedTheme RequestedTheme

Inherited from FrameworkElement

RequestedThemeProperty RequestedThemeProperty RequestedThemeProperty

Inherited from FrameworkElement

RequiresPointer RequiresPointer RequiresPointer

Inherited from Control

RequiresPointerProperty RequiresPointerProperty RequiresPointerProperty

Inherited from Control

Resources Resources Resources

Inherited from FrameworkElement

RightTappedEvent RightTappedEvent RightTappedEvent

Inherited from UIElement

Style Style Style

Inherited from FrameworkElement

StyleProperty StyleProperty StyleProperty

Inherited from FrameworkElement

TabFocusNavigation TabFocusNavigation TabFocusNavigation

Inherited from UIElement

TabFocusNavigationProperty TabFocusNavigationProperty TabFocusNavigationProperty

Inherited from UIElement

TabIndex TabIndex TabIndex

Inherited from Control

TabIndexProperty TabIndexProperty TabIndexProperty

Inherited from Control

TabNavigation TabNavigation TabNavigation

Inherited from Control

TabNavigationProperty TabNavigationProperty TabNavigationProperty

Inherited from Control

Tag Tag Tag

Inherited from FrameworkElement

TagProperty TagProperty TagProperty

Inherited from FrameworkElement

TappedEvent TappedEvent TappedEvent

Inherited from UIElement

Template Template Template

Inherited from Control

TemplateProperty TemplateProperty TemplateProperty

Inherited from Control

Transform3D Transform3D Transform3D

Inherited from UIElement

Transform3DProperty Transform3DProperty Transform3DProperty

Inherited from UIElement

Transitions Transitions Transitions

Inherited from UIElement

TransitionsProperty TransitionsProperty TransitionsProperty

Inherited from UIElement

Triggers Triggers Triggers

Inherited from FrameworkElement

UseLayoutRounding UseLayoutRounding UseLayoutRounding

Inherited from UIElement

UseLayoutRoundingProperty UseLayoutRoundingProperty UseLayoutRoundingProperty

Inherited from UIElement

UseSystemFocusVisuals UseSystemFocusVisuals UseSystemFocusVisuals

Inherited from Control

UseSystemFocusVisualsProperty UseSystemFocusVisualsProperty UseSystemFocusVisualsProperty

Inherited from Control

VerticalAlignment VerticalAlignment VerticalAlignment

Inherited from FrameworkElement

VerticalAlignmentProperty VerticalAlignmentProperty VerticalAlignmentProperty

Inherited from FrameworkElement

VerticalContentAlignment VerticalContentAlignment VerticalContentAlignment

Inherited from Control

VerticalContentAlignmentProperty VerticalContentAlignmentProperty VerticalContentAlignmentProperty

Inherited from Control

Visibility Visibility Visibility

Inherited from UIElement

VisibilityProperty VisibilityProperty VisibilityProperty

Inherited from UIElement

Width Width Width

Inherited from FrameworkElement

WidthProperty WidthProperty WidthProperty

Inherited from FrameworkElement

XYFocusDown XYFocusDown XYFocusDown

Inherited from Control

XYFocusDownNavigationStrategy XYFocusDownNavigationStrategy XYFocusDownNavigationStrategy

Inherited from UIElement

XYFocusDownNavigationStrategyProperty XYFocusDownNavigationStrategyProperty XYFocusDownNavigationStrategyProperty

Inherited from UIElement

XYFocusDownProperty XYFocusDownProperty XYFocusDownProperty

Inherited from Control

XYFocusKeyboardNavigation XYFocusKeyboardNavigation XYFocusKeyboardNavigation

Inherited from UIElement

XYFocusKeyboardNavigationProperty XYFocusKeyboardNavigationProperty XYFocusKeyboardNavigationProperty

Inherited from UIElement

XYFocusLeft XYFocusLeft XYFocusLeft

Inherited from Control

XYFocusLeftNavigationStrategy XYFocusLeftNavigationStrategy XYFocusLeftNavigationStrategy

Inherited from UIElement

XYFocusLeftNavigationStrategyProperty XYFocusLeftNavigationStrategyProperty XYFocusLeftNavigationStrategyProperty

Inherited from UIElement

XYFocusLeftProperty XYFocusLeftProperty XYFocusLeftProperty

Inherited from Control

XYFocusRight XYFocusRight XYFocusRight

Inherited from Control

XYFocusRightNavigationStrategy XYFocusRightNavigationStrategy XYFocusRightNavigationStrategy

Inherited from UIElement

XYFocusRightNavigationStrategyProperty XYFocusRightNavigationStrategyProperty XYFocusRightNavigationStrategyProperty

Inherited from UIElement

XYFocusRightProperty XYFocusRightProperty XYFocusRightProperty

Inherited from Control

XYFocusUp XYFocusUp XYFocusUp

Inherited from Control

XYFocusUpNavigationStrategy XYFocusUpNavigationStrategy XYFocusUpNavigationStrategy

Inherited from UIElement

XYFocusUpNavigationStrategyProperty XYFocusUpNavigationStrategyProperty XYFocusUpNavigationStrategyProperty

Inherited from UIElement

XYFocusUpProperty XYFocusUpProperty XYFocusUpProperty

Inherited from Control

Methods

AddHandler(RoutedEvent,Object,Boolean) AddHandler(RoutedEvent,Object,Boolean) AddHandler(RoutedEvent,Object,Boolean)

Inherited from UIElement

ApplyTemplate ApplyTemplate ApplyTemplate

Inherited from Control

Arrange(Rect) Arrange(Rect) Arrange(Rect)

Inherited from UIElement

ArrangeOverride(Size) ArrangeOverride(Size) ArrangeOverride(Size)

Inherited from FrameworkElement

CancelDirectManipulations CancelDirectManipulations CancelDirectManipulations

Inherited from UIElement

CapturePointer(Pointer) CapturePointer(Pointer) CapturePointer(Pointer)

Inherited from UIElement

ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty)

Inherited from DependencyObject

DeferTree(DependencyObject) DeferTree(DependencyObject) DeferTree(DependencyObject)

Inherited from FrameworkElement

FindName(String) FindName(String) FindName(String)

Inherited from FrameworkElement

FindSubElementsForTouchTargeting(Point,Rect) FindSubElementsForTouchTargeting(Point,Rect) FindSubElementsForTouchTargeting(Point,Rect)

Inherited from UIElement

Focus(FocusState) Focus(FocusState) Focus(FocusState)

Inherited from Control

GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty)

Inherited from DependencyObject

GetBindingExpression(DependencyProperty) GetBindingExpression(DependencyProperty) GetBindingExpression(DependencyProperty)

Inherited from FrameworkElement

GetChildrenInTabFocusOrder GetChildrenInTabFocusOrder GetChildrenInTabFocusOrder

Inherited from UIElement

GetIsTemplateFocusTarget(FrameworkElement) GetIsTemplateFocusTarget(FrameworkElement) GetIsTemplateFocusTarget(FrameworkElement)

Inherited from Control

GetIsTemplateKeyTipTarget(DependencyObject) GetIsTemplateKeyTipTarget(DependencyObject) GetIsTemplateKeyTipTarget(DependencyObject)

Inherited from Control

GetTemplateChild(String) GetTemplateChild(String) GetTemplateChild(String)

Inherited from Control

GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty)

Inherited from DependencyObject

GoToElementStateCore(String,Boolean) GoToElementStateCore(String,Boolean) GoToElementStateCore(String,Boolean)

Inherited from FrameworkElement

InvalidateArrange InvalidateArrange InvalidateArrange

Inherited from UIElement

InvalidateMeasure InvalidateMeasure InvalidateMeasure

Inherited from UIElement

Measure(Size) Measure(Size) Measure(Size)

Inherited from UIElement

MeasureOverride(Size) MeasureOverride(Size) MeasureOverride(Size)

Inherited from FrameworkElement

OnApplyTemplate OnApplyTemplate OnApplyTemplate

Inherited from FrameworkElement

OnCharacterReceived(CharacterReceivedRoutedEventArgs) OnCharacterReceived(CharacterReceivedRoutedEventArgs) OnCharacterReceived(CharacterReceivedRoutedEventArgs)

Inherited from Control

OnContentChanged(Object,Object) OnContentChanged(Object,Object) OnContentChanged(Object,Object)

Inherited from ContentControl

OnContentTemplateChanged(DataTemplate,DataTemplate) OnContentTemplateChanged(DataTemplate,DataTemplate) OnContentTemplateChanged(DataTemplate,DataTemplate)

Inherited from ContentControl

OnContentTemplateSelectorChanged(DataTemplateSelector,DataTemplateSelector) OnContentTemplateSelectorChanged(DataTemplateSelector,DataTemplateSelector) OnContentTemplateSelectorChanged(DataTemplateSelector,DataTemplateSelector)

Inherited from ContentControl

OnCreateAutomationPeer OnCreateAutomationPeer OnCreateAutomationPeer

Inherited from UIElement

OnDisconnectVisualChildren OnDisconnectVisualChildren OnDisconnectVisualChildren

Inherited from UIElement

OnDoubleTapped(DoubleTappedRoutedEventArgs) OnDoubleTapped(DoubleTappedRoutedEventArgs) OnDoubleTapped(DoubleTappedRoutedEventArgs)

Inherited from Control

OnDragEnter(DragEventArgs) OnDragEnter(DragEventArgs) OnDragEnter(DragEventArgs)

Inherited from Control

OnDragLeave(DragEventArgs) OnDragLeave(DragEventArgs) OnDragLeave(DragEventArgs)

Inherited from Control

OnDragOver(DragEventArgs) OnDragOver(DragEventArgs) OnDragOver(DragEventArgs)

Inherited from Control

OnDrop(DragEventArgs) OnDrop(DragEventArgs) OnDrop(DragEventArgs)

Inherited from Control

OnGotFocus(RoutedEventArgs) OnGotFocus(RoutedEventArgs) OnGotFocus(RoutedEventArgs)

Inherited from Control

OnHolding(HoldingRoutedEventArgs) OnHolding(HoldingRoutedEventArgs) OnHolding(HoldingRoutedEventArgs)

Inherited from Control

OnKeyDown(KeyRoutedEventArgs) OnKeyDown(KeyRoutedEventArgs) OnKeyDown(KeyRoutedEventArgs)

Inherited from Control

OnKeyUp(KeyRoutedEventArgs) OnKeyUp(KeyRoutedEventArgs) OnKeyUp(KeyRoutedEventArgs)

Inherited from Control

OnLostFocus(RoutedEventArgs) OnLostFocus(RoutedEventArgs) OnLostFocus(RoutedEventArgs)

Inherited from Control

OnManipulationCompleted(ManipulationCompletedRoutedEventArgs) OnManipulationCompleted(ManipulationCompletedRoutedEventArgs) OnManipulationCompleted(ManipulationCompletedRoutedEventArgs)

Inherited from Control

OnManipulationDelta(ManipulationDeltaRoutedEventArgs) OnManipulationDelta(ManipulationDeltaRoutedEventArgs) OnManipulationDelta(ManipulationDeltaRoutedEventArgs)

Inherited from Control

OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs) OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs) OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs)

Inherited from Control

OnManipulationStarted(ManipulationStartedRoutedEventArgs) OnManipulationStarted(ManipulationStartedRoutedEventArgs) OnManipulationStarted(ManipulationStartedRoutedEventArgs)

Inherited from Control

OnManipulationStarting(ManipulationStartingRoutedEventArgs) OnManipulationStarting(ManipulationStartingRoutedEventArgs) OnManipulationStarting(ManipulationStartingRoutedEventArgs)

Inherited from Control

OnPointerCanceled(PointerRoutedEventArgs) OnPointerCanceled(PointerRoutedEventArgs) OnPointerCanceled(PointerRoutedEventArgs)

Inherited from Control

OnPointerCaptureLost(PointerRoutedEventArgs) OnPointerCaptureLost(PointerRoutedEventArgs) OnPointerCaptureLost(PointerRoutedEventArgs)

Inherited from Control

OnPointerEntered(PointerRoutedEventArgs) OnPointerEntered(PointerRoutedEventArgs) OnPointerEntered(PointerRoutedEventArgs)

Inherited from Control

OnPointerExited(PointerRoutedEventArgs) OnPointerExited(PointerRoutedEventArgs) OnPointerExited(PointerRoutedEventArgs)

Inherited from Control

OnPointerMoved(PointerRoutedEventArgs) OnPointerMoved(PointerRoutedEventArgs) OnPointerMoved(PointerRoutedEventArgs)

Inherited from Control

OnPointerPressed(PointerRoutedEventArgs) OnPointerPressed(PointerRoutedEventArgs) OnPointerPressed(PointerRoutedEventArgs)

Inherited from Control

OnPointerReleased(PointerRoutedEventArgs) OnPointerReleased(PointerRoutedEventArgs) OnPointerReleased(PointerRoutedEventArgs)

Inherited from Control

OnPointerWheelChanged(PointerRoutedEventArgs) OnPointerWheelChanged(PointerRoutedEventArgs) OnPointerWheelChanged(PointerRoutedEventArgs)

Inherited from Control

OnPreviewKeyDown(KeyRoutedEventArgs) OnPreviewKeyDown(KeyRoutedEventArgs) OnPreviewKeyDown(KeyRoutedEventArgs)

Inherited from Control

OnPreviewKeyUp(KeyRoutedEventArgs) OnPreviewKeyUp(KeyRoutedEventArgs) OnPreviewKeyUp(KeyRoutedEventArgs)

Inherited from Control

OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs) OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs) OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs)

Inherited from UIElement

OnRightTapped(RightTappedRoutedEventArgs) OnRightTapped(RightTappedRoutedEventArgs) OnRightTapped(RightTappedRoutedEventArgs)

Inherited from Control

OnTapped(TappedRoutedEventArgs) OnTapped(TappedRoutedEventArgs) OnTapped(TappedRoutedEventArgs)

Inherited from Control

OnToggle() OnToggle() OnToggle()

Called when the ToggleButton receives toggle stimulus.

protected : virtual void OnToggle()
protected virtual void OnToggle()
Protected Overridable Function OnToggle() As void

Remarks

The default implementation raises a Click event in response to the stimulus.

ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty)

Inherited from DependencyObject

RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback)

Inherited from DependencyObject

ReleasePointerCapture(Pointer) ReleasePointerCapture(Pointer) ReleasePointerCapture(Pointer)

Inherited from UIElement

ReleasePointerCaptures ReleasePointerCaptures ReleasePointerCaptures

Inherited from UIElement

RemoveFocusEngagement RemoveFocusEngagement RemoveFocusEngagement

Inherited from Control

RemoveHandler(RoutedEvent,Object) RemoveHandler(RoutedEvent,Object) RemoveHandler(RoutedEvent,Object)

Inherited from UIElement

SetBinding(DependencyProperty,BindingBase) SetBinding(DependencyProperty,BindingBase) SetBinding(DependencyProperty,BindingBase)

Inherited from FrameworkElement

SetIsTemplateFocusTarget(FrameworkElement,Boolean) SetIsTemplateFocusTarget(FrameworkElement,Boolean) SetIsTemplateFocusTarget(FrameworkElement,Boolean)

Inherited from Control

SetIsTemplateKeyTipTarget(DependencyObject,Boolean) SetIsTemplateKeyTipTarget(DependencyObject,Boolean) SetIsTemplateKeyTipTarget(DependencyObject,Boolean)

Inherited from Control

SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object)

Inherited from DependencyObject

StartBringIntoView StartBringIntoView StartBringIntoView

Inherited from UIElement

StartBringIntoView(BringIntoViewOptions) StartBringIntoView(BringIntoViewOptions) StartBringIntoView(BringIntoViewOptions)

Inherited from UIElement

StartDragAsync(PointerPoint) StartDragAsync(PointerPoint) StartDragAsync(PointerPoint)

Inherited from UIElement

TransformToVisual(UIElement) TransformToVisual(UIElement) TransformToVisual(UIElement)

Inherited from UIElement

TryInvokeKeyboardAccelerator(ProcessKeyboardAcceleratorEventArgs) TryInvokeKeyboardAccelerator(ProcessKeyboardAcceleratorEventArgs) TryInvokeKeyboardAccelerator(ProcessKeyboardAcceleratorEventArgs)

Inherited from UIElement

TryStartDirectManipulation(Pointer) TryStartDirectManipulation(Pointer) TryStartDirectManipulation(Pointer)

Inherited from UIElement

UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64)

Inherited from DependencyObject

UpdateLayout UpdateLayout UpdateLayout

Inherited from UIElement

Events

AccessKeyDisplayDismissed AccessKeyDisplayDismissed AccessKeyDisplayDismissed

Inherited from UIElement

AccessKeyDisplayRequested AccessKeyDisplayRequested AccessKeyDisplayRequested

Inherited from UIElement

AccessKeyInvoked AccessKeyInvoked AccessKeyInvoked

Inherited from UIElement

ActualThemeChanged ActualThemeChanged ActualThemeChanged

Inherited from FrameworkElement

CharacterReceived CharacterReceived CharacterReceived

Inherited from UIElement

Checked Checked Checked

Fires when a ToggleButton is checked.

public : event RoutedEventHandler Checked<>
public event RoutedEventHandler Checked<>
Public Event RoutedEventHandler Checked( Of )
<togglebutton Checked="eventhandler"/>

Click Click Click

Inherited from ButtonBase

ContextCanceled ContextCanceled ContextCanceled

Inherited from UIElement

ContextRequested ContextRequested ContextRequested

Inherited from UIElement

DataContextChanged DataContextChanged DataContextChanged

Inherited from FrameworkElement

DoubleTapped DoubleTapped DoubleTapped

Inherited from UIElement

DragEnter DragEnter DragEnter

Inherited from UIElement

DragLeave DragLeave DragLeave

Inherited from UIElement

DragOver DragOver DragOver

Inherited from UIElement

DragStarting DragStarting DragStarting

Inherited from UIElement

Drop Drop Drop

Inherited from UIElement

DropCompleted DropCompleted DropCompleted

Inherited from UIElement

FocusDisengaged FocusDisengaged FocusDisengaged

Inherited from Control

FocusEngaged FocusEngaged FocusEngaged

Inherited from Control

GettingFocus GettingFocus GettingFocus

Inherited from UIElement

GotFocus GotFocus GotFocus

Inherited from UIElement

Holding Holding Holding

Inherited from UIElement

Indeterminate Indeterminate Indeterminate

Fires when the state of a ToggleButton is switched to the indeterminate state.

public : event RoutedEventHandler Indeterminate<>
public event RoutedEventHandler Indeterminate<>
Public Event RoutedEventHandler Indeterminate( Of )
<togglebutton Indeterminate="eventhandler"/>

IsEnabledChanged IsEnabledChanged IsEnabledChanged

Inherited from Control

KeyDown KeyDown KeyDown

Inherited from UIElement

KeyUp KeyUp KeyUp

Inherited from UIElement

LayoutUpdated LayoutUpdated LayoutUpdated

Inherited from FrameworkElement

Loaded Loaded Loaded

Inherited from FrameworkElement

Loading Loading Loading

Inherited from FrameworkElement

LosingFocus LosingFocus LosingFocus

Inherited from UIElement

LostFocus LostFocus LostFocus

Inherited from UIElement

ManipulationCompleted ManipulationCompleted ManipulationCompleted

Inherited from UIElement

ManipulationDelta ManipulationDelta ManipulationDelta

Inherited from UIElement

ManipulationInertiaStarting ManipulationInertiaStarting ManipulationInertiaStarting

Inherited from UIElement

ManipulationStarted ManipulationStarted ManipulationStarted

Inherited from UIElement

ManipulationStarting ManipulationStarting ManipulationStarting

Inherited from UIElement

NoFocusCandidateFound NoFocusCandidateFound NoFocusCandidateFound

Inherited from UIElement

PointerCanceled PointerCanceled PointerCanceled

Inherited from UIElement

PointerCaptureLost PointerCaptureLost PointerCaptureLost

Inherited from UIElement

PointerEntered PointerEntered PointerEntered

Inherited from UIElement

PointerExited PointerExited PointerExited

Inherited from UIElement

PointerMoved PointerMoved PointerMoved

Inherited from UIElement

PointerPressed PointerPressed PointerPressed

Inherited from UIElement

PointerReleased PointerReleased PointerReleased

Inherited from UIElement

PointerWheelChanged PointerWheelChanged PointerWheelChanged

Inherited from UIElement

PreviewKeyDown PreviewKeyDown PreviewKeyDown

Inherited from UIElement

PreviewKeyUp PreviewKeyUp PreviewKeyUp

Inherited from UIElement

ProcessKeyboardAccelerators ProcessKeyboardAccelerators ProcessKeyboardAccelerators

Inherited from UIElement

RightTapped RightTapped RightTapped

Inherited from UIElement

SizeChanged SizeChanged SizeChanged

Inherited from FrameworkElement

Tapped Tapped Tapped

Inherited from UIElement

Unchecked Unchecked Unchecked

Occurs when a ToggleButton is unchecked.

public : event RoutedEventHandler Unchecked<>
public event RoutedEventHandler Unchecked<>
Public Event RoutedEventHandler Unchecked( Of )
<togglebutton Unchecked="eventhandler"/>

Unloaded Unloaded Unloaded

Inherited from FrameworkElement

See Also