RadToggleButton
Represents a toggle button control that allows users to switch between two states: checked and unchecked. This control supports customization of corner radius, background visibility, and command binding for a more interactive user experience. The RadToggleButton raises events when activated and allows pre-click handling through the PreviewClick event. It also provides visual state management to reflect different interaction states like mouse over, pressed, and focused.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.dll
Syntax:
[TelerikToolboxCategory("Buttons")]
public class RadToggleButton : ToggleButton
Inheritance: objectRadToggleButton
Derived Classes:
Constructors
Initializes a new instance of the RadToggleButton class.
public RadToggleButton()
Fields
ActivateEvent
RoutedEvent
Identifies the Activate routed event.
public static readonly RoutedEvent ActivateEvent
CornerRadiusProperty
DependencyProperty
Identifies the CornerRadius property.
public static readonly DependencyProperty CornerRadiusProperty
IsBackgroundVisibleProperty
DependencyProperty
Identifies the IsBackgroundVisible property.
public static readonly DependencyProperty IsBackgroundVisibleProperty
PreviewClickEvent
RoutedEvent
Identifies the PreviewClick property.
public static readonly RoutedEvent PreviewClickEvent
Properties
CornerRadius
CornerRadius
Gets or sets a value that represents the degree to which the corners of the control are rounded. This is a dependency property.
public CornerRadius CornerRadius { get; set; }
Sets the visual appearance of the chrome not to render in Normal mode.
[Browsable(false)]
public bool IsBackgroundVisible { get; set; }
Methods
Invoked whenever application code or internal processes (such as a rebuilding layout pass) call .
public override void OnApplyTemplate()
Called when a control is clicked by the mouse or the keyboard.
protected override void OnClick()
OnCreateAutomationPeer()
AutomationPeer
Creates a RadToggleButtonAutomationPeer.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
Invoked on got focus.
protected override void OnGotFocus(RoutedEventArgs e)
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Invoke on focus lost.
protected override void OnLostFocus(RoutedEventArgs e)
Invoke on mouse enter.
protected override void OnMouseEnter(MouseEventArgs e)
Invoke on mouse leave.
protected override void OnMouseLeave(MouseEventArgs e)
Invoke on mouse left button up.
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Events
Occurs when button is clicked.
public event EventHandler<RadRoutedEventArgs> Activate
PreviewClick
RoutedEventHandler
Occurs when the content will be Clicked. If the event handler set True for the Handled property then the button will not be clicked.
public event RoutedEventHandler PreviewClick