In This Article

SettingsExpanderToggleButton Class

Defines a ToggleButton to be used with a SettingsExpander.

public class SettingsExpanderToggleButton : ToggleButton
Inheritance:
object Visual UIElement FrameworkElement Control ContentControl ButtonBase ToggleButton object

Constructors

SettingsExpanderToggleButton()

Initializes an instance of the class.

public SettingsExpanderToggleButton()

Properties

CanToggleExpansion

Indicates if the user is allowed to toggle the expansion state.

public bool CanToggleExpansion { get; set; }

Property Value

bool:

true if the user can toggle the expansion state; otherwwise, false if the user cannot toggle the expansion state. The default value is true.

Methods

OnKeyDown(KeyEventArgs)

Provides class handling for the KeyDown routed event that occurs when the user presses a key while this control has focus.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

The event data.

OnKeyUp(KeyEventArgs)

Provides class handling for the KeyUp routed event that occurs when the user releases a key while this control has focus.

protected override void OnKeyUp(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

The event data for the KeyUp event.

OnToggle()

Called by the OnClick() method to implement toggle behavior.

protected override void OnToggle()

Fields

CanToggleExpansionProperty

Identifies the CanToggleExpansion dependency property.

public static readonly DependencyProperty CanToggleExpansionProperty