This is a migrated thread and some comments may be shown as answers.

RadRibbonBackstageItem

1 Answer 139 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Bassam
Top achievements
Rank 1
Bassam asked on 24 Mar 2015, 06:29 PM
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,  

1 Answer, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 25 Mar 2015, 09:36 AM
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.

 
Tags
RibbonView and RibbonWindow
Asked by
Bassam
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or