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

RibbonView and quick access toolbar menu customization

3 Answers 70 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Pavel
Top achievements
Rank 1
Pavel asked on 15 Oct 2018, 09:26 AM

Hello!

How can I dynamically customize RibbonView quick access toolbar? I want to show and hide buttons using quick access toolbar menu like in Microsoft Office applications. It seems that this is not possible and menu is not customizable either.

Thank you.

 

3 Answers, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 18 Oct 2018, 08:41 AM
Hello Pavel,

If I understood your requirement correctly, you wish to dynamically modify the collection of RadRibbonView's quick access toolbar. Please let me know if I'm mistaken in this assumption.

If that is indeed the desired result, you can bind the QuickAccessToolBar's ItemsSource to a collection in your viewmodel and define an ItemTemplate for its items. Provided this collection implements the INotifyCollectionChanged interface, it will update the toolbar once new items are added.

I've attached a small sample project to my reply demonstrating the approach I have in mind.

Could you please have a look and let me know if it will work for you? If this is not what you had in mind, please provide more details on your exact setup and requirement and I will gladly assist you further.

I look forward to your reply.

Regards,
Dilyan Traykov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Pavel
Top achievements
Rank 1
answered on 18 Oct 2018, 10:16 AM

Hello!

Thank you for your answer.

I want to customize the toolbar using it's menu. But the menu itself is not customizable. Can you please check how this menu looks like in the Microsoft Office application? It contains list of available buttons with checkmarks. User can show or hide any button on the toolbar using this menu.

How can I add custom items to the toolbar menu?

Thank you.

0
Dilyan Traykov
Telerik team
answered on 19 Oct 2018, 11:27 AM
Hello Pavel,

Please excuse me for the misunderstanding.

I've updated the project to demonstrate a possible approach for customizing the toolbar per your requirement. For the purpose I've modified the control template of the QuickAccessToolBar element and added an ItemsControl bound to the ItemsSource of the QuickAccessToolBar of the RadRibbonView. The ItemTemplate of the control in turn uses the properties of the data items to show and hide the items from the toolbar itself.

Please note that these changes are specific to the Office2016 theme and if you're using another one you should extract and modify the templates accordingly.

Please have a look and let me know whether this would work for you.

Regards,
Dilyan Traykov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
RibbonView and RibbonWindow
Asked by
Pavel
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Pavel
Top achievements
Rank 1
Share this question
or