Events Overview

This topic covers the specific events exposed by the RadRibbonView control and its sub elements. The events are first grouped by control and then by their general purpose.

Telerik UI for WPF Ninja image

The Events is part of Telerik UI for WPF, a professional grade UI library with 160+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

RadRibbonView

RadRibbonView provides a couple of useful events that can be used for customization purposes.

  • ApplicationButtonDoubleClick - occurs when the user double clicks on the application button. The ApplicationButtonDoubleClick event handler receives two arguments:

    • The sender argument contains the RadRibbonView. This argument is of type object, but can be cast to the RadRibbonView type.
    • A RadRoutedEventArgs object.
  • ApplicationMenuOpenStateChanged - occurs when the user opens or closes the ApplicationMenu. The ApplicationMenuOpenStateChanged event handler receives two arguments:

    • The sender argument contains the RadRibbonView. This argument is of type object, but can be cast to the RadRibbonView type.
    • A RadRoutedEventArgs object.
  • ToolBarPositionChanged - occurs when the location of the toolbar has changed. The ToolBarPositionChanged event handler receives two arguments:

    • The sender argument contains the RadRibbonView. This argument is of type object, but can be cast to the RadRibbonView type.
    • A RadRoutedEventArgs object.
  • HelpRequested - occurs when the user clicks on the help button. The HelpRequested event handler receives two arguments:

    • The sender argument contains the RadRibbonView. This argument is of type object, but can be cast to the RadRibbonView type.
    • A RadRoutedEventArgs object.
  • CollapsedChanged - occurs when the ribbon bar collapsed state has changed. The CollapsedChanged event handler receives two arguments:

    • The sender argument contains the RadRibbonView. This argument is of type object, but can be cast to the RadRibbonView type.
    • A RadRoutedEventArgs object.
  • LayoutModeChanged - occurs when the ribbon view layout mode has changed. The LayoutModeChanged event handler receives two arguments:

    • The sender argument contains the RadRibbonView control. This argument is of type object, but can be cast to the RadRibbonView type.
    • A RadRoutedEventArgs object.

Selection

  • PreviewSelectionChanged- occurs when the selected tab is going to be changed. The PreviewSelectionChanged event handler receives two arguments:

    • The sender argument contains the RadRibbonView. This argument is of type object, but can be cast to the RadRibbonView type.
    • The second argument is RadSelectionChangedEventArgs containing all additional information about the event:
      • AddedItems - an IList collection of the selected items
      • RemovedItems - an IList collection of the unselected items
  • SelectionChanged - occurs when the selected tab has changed. The SelectedTabChanged event handler receives two arguments:

    • The sender argument contains the RadRibbonView. This argument is of type object, but can be cast to the RadRibbonView type.
    • The second argument is RadSelectionChangedEventArgs containing all additional information about the event:
      • AddedItems - an IList collection of the selected items
      • RemovedItems - an IList collection of the unselected items

When a RadRibbonTab is selected the lifecycle of the raised events is:

  • PreviewSelectionChanged
  • SelectionChanged

You could cancel the selection process by setting the RadSelectionChangedEventArgs's Handled property to True in the PreviewSelectionChanged event handler.

When your application is started the PreviewSelectionChanged and SelectionChanged events are always raised.

Minimization

  • The MinimizedChanged event is raised when the the ribbon is changing its minimized state. The MinimizedChanged event handler receives two arguments:

    • The sender argument contains the RadRibbonView. This argument is of type object, but can be cast to the RadRibbonView type.
    • A Telerik.Windows.RadRoutedEventArgs object containing all the additional information about the event
  • The MinimizedPopupOpenStateChanged event is raised when the minimized popup changes its open state. The MinimizedPopupOpenStateChanged event handler receives two arguments:

    • The sender argument contains the RadRibbonView. This argument is of type object, but can be cast to the RadRibbonView type.
    • A Telerik.Windows.RadRoutedEventArgs object containing all the additional information about the event.
  • The PreviewPopupOpened event is raised when the minimized popup is about to be opened. The PreviewPopupOpened event handler receives two arguments:

    • The sender argument contains the RadRibbonView. This argument is of type object, but can be cast to the RadRibbonView type.
    • A Telerik.Windows.RadRoutedEventArgs object containing all the additional information about the event.

    You can cancel the opening of the minimized popup by setting the RadRoutedEventArgs's Handled property to True.

  • The PopupOpened event is raised when the minimized popup changes its open state. The PopupOpened event handler receives two arguments:

    • The sender argument contains the RadRibbonView. This argument is of type object, but can be cast to the RadRibbonView type.
    • A Telerik.Windows.RadRoutedEventArgs object containing all the additional information about the event.

RadGallery

  • ActivatePreview - occurs when the mouse cursor is over a gallery item. The ActivatePreview event handler receives two arguments:

    • The sender argument contains the RadGallery. This argument is of type object, but can be cast to the RadGallery type.
    • A RadRoutedEventArgs object.
  • DeactivatePreview- occurs when the mouse cursor leaves the gallery item. The DeactivatePreview event handler receives two arguments:

    • The sender argument contains the RadGallery. This argument is of type object, but can be cast to the RadGallery type.
    • A RadRoutedEventArgs object.

When a preview should be activated for a gallery item, the lifecycle of the raised events is:

  • ActivatePreview
  • DeactivatePreview

RadRibbonGroup

  • LaunchDialog- occurs when ribbon bar collapsed state has changed. The LaunchDialog event handler receives two arguments:
    • The sender argument contains the RadRibbonGroup. This argument is of type object, but can be cast to the RadRibbonGroup type.
    • A RadRoutedEventArgs object.
In this article