New to Telerik UI for WinUI? Download free 30-day trial

Toggle Button

The RadToggleButton control extends the native ToggleButton component by providing an additional command target support and consistent theming with the other Telerik components.

The ToggleButton is a basic WinUI conrtol that allows you to click on it and change its toggle state (checked or unchecked). The RadToggleButton implementation comes with a full ICommandSource implementation that provides also a CommandTarget property compared to the native Button where this is missing.

The following example shows how to define a button in XAML and subscribe to its Checked and Unchecked events. Alterntively, you can use the Click event and the IsChecked property.

Defining RadButton

<telerikControls:RadToggleButton Content="RadToggleButton"  
                                 Checked="RadToggleButton_Checked"  
                                 Unchecked="RadToggleButton_Unchecked"/> 

Defining Checked and Unchecked event handlers

private void RadToggleButton_Checked(object sender, RoutedEventArgs e) 
{ 
} 
 
private void RadToggleButton_Unchecked(object sender, RoutedEventArgs e) 
{ 
} 
Checked ToggleButton

See Also

In this article
Not finding the help you need?