RadRibbonBackstageItem

2 posts, 1 answers
  1. Bassam
    Bassam avatar
    8 posts
    Member since:
    Mar 2015

    Posted 24 Mar 2015 Link to this post

    Hi,

    I am interested in capturing when somebody clicks on the RadRibbonBackstageItem item to perform some action before It get opened or after it get closed. I tried wiring up the Click event but I didn't see it get fired at all. 

    I had no luck with Command as well. So, I am wondering what is the best way to achieve that? 

    <telerik:RadRibbonBackstageItem Header="Recent"  Icon="/Images/Recent.png" Click="OnRecentTabClicked" />


    The code behind for the method is: 

     public void OnRecentTabClicked(object sender, RoutedEventArgs e)
    {
      RadRibbonBackstageItem item = sender
    as RadRibbonBackstageItem;
      // do the rest....
    }



    Thanks,  
  2. Answer
    Martin
    Admin
    Martin avatar
    1101 posts

    Posted 25 Mar 2015 Link to this post

    Hi Bassam,

    The RadRibbonBackstageItem has a couple different behaviors - it can be selectable and non-selectable. You can change the RadRibbonBackstageItem's behavior by setting its IsSelectable property. When the property is set to False, the item will behave like a button and its Click event will be fired. On the other hand, if IsSelectable is set to True (which is the default value) the item will act as an item from a Selector (like ListBox or TabControl) and the Click event won't be invoked. In this case you can listen for a RadRibbonBackstageItem click by subscribing for the backstage's SelectionChanged event.
    private void RadRibbonBackstage_SelectionChanged(object sender, RadSelectionChangedEventArgs e)
    {
        RadRibbonBackstageItem backstageItem = e.AddedItems[0] as RadRibbonBackstageItem;
        // do the rest....
    }

    Regards,
    Martin
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top