ClassRadToggleButton
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
RadToggleButton()
Initializes a new instance of the RadToggleButton class.
Declaration
public RadToggleButton()
Fields
ActivateEvent
Identifies the Activate routed event.
Declaration
public static readonly RoutedEvent ActivateEvent
Field Value
RoutedEvent
CornerRadiusProperty
Identifies the CornerRadius property.
Declaration
public static readonly DependencyProperty CornerRadiusProperty
Field Value
DependencyProperty
IsBackgroundVisibleProperty
Identifies the IsBackgroundVisible property.
Declaration
public static readonly DependencyProperty IsBackgroundVisibleProperty
Field Value
DependencyProperty
PreviewClickEvent
Identifies the PreviewClick property.
Declaration
public static readonly RoutedEvent PreviewClickEvent
Field Value
RoutedEvent
Properties
CornerRadius
Gets or sets a value that represents the degree to which the corners of the control are rounded. This is a dependency property.
Declaration
public CornerRadius CornerRadius { get; set; }
Property Value
CornerRadius
IsBackgroundVisible
Sets the visual appearance of the chrome not to render in Normal mode.
Declaration
[Browsable(false)]
public bool IsBackgroundVisible { get; set; }
Property Value
Methods
OnApplyTemplate()
Invoked whenever application code or internal processes (such as a rebuilding layout pass) call .
Declaration
public override void OnApplyTemplate()
OnClick()
Called when a control is clicked by the mouse or the keyboard.
Declaration
protected override void OnClick()
OnCreateAutomationPeer()
Creates a RadToggleButtonAutomationPeer.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
OnGotFocus(RoutedEventArgs)
Invoked on got focus.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
e
RoutedEventArgs
OnInitialized(EventArgs)
Raises the event. This method is invoked whenever is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
e
The RoutedEventArgs that contains the event data.
OnLostFocus(RoutedEventArgs)
Invoke on focus lost.
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
e
RoutedEventArgs
OnMouseEnter(MouseEventArgs)
Invoke on mouse enter.
Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
e
MouseEventArgs
OnMouseLeave(MouseEventArgs)
Invoke on mouse leave.
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
e
MouseEventArgs
OnMouseLeftButtonUp(MouseButtonEventArgs)
Invoke on mouse left button up.
Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
e
MouseButtonEventArgs
Events
Activate
Occurs when button is clicked.
Declaration
public event EventHandler<RadRoutedEventArgs> Activate
Event Value
PreviewClick
Occurs when the content will be Clicked. If the event handler set True for the Handled property then the button will not be clicked.
Declaration
public event RoutedEventHandler PreviewClick
Event Value
RoutedEventHandler