RadControls for WPF

RadRibbonBar supports collapsing, which means that the ribbon may automatically collapse to save space when the application is resized to a smaller size.

Properties

The following properties are related to the collapse functionality:

  • RadRibbonBar.IsCollapsed - gives you information about the current state of the RadRibbonBar control. The value of the IsCollapsed property is True if the ribbon bar is collapsed. Respectively - False, if the ribbon is not collapsed. The RadRibbonBar's IsCollapsed property is read-only.
  • RadRibbonBar.CollapseThresholdSize - gets/sets the size under which the ribbon will collapse. By default this property is set to (250,300) but you can configure it to better meet the requirements of your applicaiton.
CopyXAML
<telerik:RadRibbonBar x:Name="radRibbonBar"
                      CollapseThresholdSize="100,100">
</telerik:RadRibbonBar>

Events

You can use the CollapsedChanged event to be notified when the ribbon collapse state is changed.

CopyXAML
<telerik:RadRibbonBar x:Name="radRibbonBar"
                      CollapseThresholdSize="100,100"
                      CollapsedChanged="radRibbonBar_CollapsedChanged">
</telerik:RadRibbonBar>
CopyC#
private void radRibbonBar_CollapsedChanged( object sender, RadRoutedEventArgs e )
{
    RadRibbonBar ribbonBar = sender as RadRibbonBar;
    bool isCollapsed = ribbonBar.IsCollapsed;
}
CopyVB.NET
Private Sub radRibbonBar_CollapsedChanged(ByVal sender As Object, ByVal e As RadRoutedEventArgs)
    Dim ribbonBar As RadRibbonBar = TryCast(sender, RadRibbonBar)
    Dim isCollapsed As Boolean = ribbonBar.IsCollapsed
End Sub

For more information about the events, exposed by the RadRibbonControl, check out the Events - Overview topic.

See Also