0
votes

I am developing a desktop application using 'WPF Ribbon Application' in C# 2010.

Can anyone please tell me, how to retain / save the layout of Quick Access ToolBar set by the user during run-time, so that the same layout shall be shown to the user again, when he opens the application next time?

Thanks in advance.

--- Viru

1

1 Answers

0
votes

I found the solution to my problem. I am sharing this with you so that you won't get stuck, if you get the same problem.

I researched further to find out the least complex method to save the layout of Quick Access ToolBar (QAT).

What I found is:

Microsoft has given an excellent example of using RibbonControlLibrary through WPF at: https://www.microsoft.com/en-in/download/details.aspx?id=11877

This example shows & suggests that the layout of the QAT should be saved in an XML file. For this we need to save the 'Tab Index', 'Group Index' and the 'ControlIndices' for every item added to the QAT.

And most importantly, this example shows that the layout of the QAT is saved to the XML at the time of closing the main window. So it is utmost important to make sure that your window closing event triggers the code to save QAT layout to XML.

Thanks.

---Viru