Ribbon ToggleButton

The RadRibbonToggleButton represents an extension of the RadToggleButton. It provides an easier interaction with the RadRibbonView control. What is special about the RadRibbonToggleButton is that it has two states - checked and unchecked. To switch between these states just click on it.

To learn more about the RadToggleButtonButton control read its documentation. RadRibbonToggleButton

<telerik:RadRibbonToggleButton CollapseToMedium="Never" 
                               CollapseToSmall="WhenGroupIsMedium" 
                               IsAutoSize="True" 
                               LargeImage="Icons/32/Equation.png" 
                               Size="Large" 
                               SmallImage="Icons/16/Equation.png" 
                               Text="Symbol" /> 

This button has its initial size set to Large and its text label set to "Symbol". As the IsAutoSize property is set to True the button will change its size depending on the RadRibbonGroup's size. The button will also never collapse to its Medium size and will collapse to its Small size when the RadRibbonGroup collapses to Medium. Silverlight RadRibbonView Large Toggle Button

Handling Changes in the the Button's Checked State

Besides the Click event, the RadRibbonToggleButton control exposes two additional events - Checked and Unchecked. They are meant to notify for changes in the checked state of the toggle button.

<telerik:RadRibbonToggleButton Checked="RadRibbonToggleButton_Checked" 
                               CollapseToMedium="Never" 
                               CollapseToSmall="WhenGroupIsMedium" 
                               IsAutoSize="True" 
                               LargeImage="Icons/32/Equation.png" 
                               Size="Large" 
                               SmallImage="Icons/16/Equation.png" 
                               Text="Symbol" 
                               Unchecked="RadRibbonToggleButton_Unchecked" /> 

private void RadRibbonToggleButton_Checked(object sender, RoutedEventArgs e) 
{ 
} 
private void RadRibbonToggleButton_Unchecked(object sender, RoutedEventArgs e) 
{ 
} 
Private Sub RadRibbonToggleButton_Checked(sender As Object, e As RoutedEventArgs) 
 
End Sub 
 
Private Sub RadRibbonToggleButton_Unchecked(sender As Object, e As RoutedEventArgs) 
 
End Sub 

See Also

In this article