We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Change Tab event

What event do I use to tell me the RibbonTab has changed and how do I know when RibbonTab is selected.


2 Replies

AD Administrator Syncfusion Team June 26, 2009 12:22 PM UTC

The Ribbon is a Selector. Its children are RibbonTabs. So listen for the event SelectionChanged. For example:


private void MyRibbon_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (e.AddedItems.Count != 1)
{
throw new ArgumentException("MyRibbon_SelectionChanged: e.AddedItems.Count != 1");
}

RibbonTab tab = e.AddedItems[0] as RibbonTab;
if (tab != null)
{
// Do something
}
}


Kind regards,
Daniel Rose
EXAPT Systemtechnik GmbH


BA Balavasanth Syncfusion Team June 30, 2009 03:27 PM UTC


Hi Anton,

Thanks for your interests in Syncfusion products.

We really thank Daniel Rose for posting his update in this thread. As Daniel said you can make use of the Selection Changed event of the Ribbon to tell the RibbonTab has been changed. For knowing when the RibbonTab is selected you can make use of the IsChecked property of the Ribbon Tab to achieve your requirement.

Please let us know if you have any questions.

Regards,
Bala.

Loader.
Live Chat Icon For mobile
Up arrow icon