Hello, I would like to save the contents of the Quick Access Toolbar between user sessions, but not the rest of the ribbon toolbars. Currently I have a main form with a ribbon,and several MDI child forms with ribbons.
I am not opposed to homebrewing up a serialization to store just the QAT tools, but I am unsure how to uniquely identify each tool (and which form they came from!) so that I can add them to the QAT upon startup next time.
What pieces of tool data would allow me to do this? How can I add a tool that exists on another form that may not be open when the program is loaded?
I am extremely disappointed that this has yet to be answered.
agreed! I'd like to do the same thing!
I save them in a XML file, if you save your XML file in the 'Roaming' folder in Windows, they wil persist between different Windows session.
do i answer your question?
Thanks for your reply. Is it possible i can refer your code for save it and load it again next time?
you can loop through your ribbon collection of type: Infragistics.Win.UltraWinToolbars.QuickAccessToolbar. i save the info in 2 arrays (keys, values).
you save them in a XML file
While (teller < toolbar.Tools.Count) keys(i) = "QAT" + CStr(teller) + " " + "Setting" values(i) = toolbar.Tools(teller).Key teller += 1 i += 1 End While
When you have to load them, get your settings from the xml file and reinsert the tools in QAT. 'Str' are my xmlSettings. 'Toolbar' is my Infragistics.Win.UltraWinToolbars.QuickAccessToolbar
While (teller < str.Count) Dim key As String = "QAT" & teller + 1 & " Setting" toolbar.Tools.AddTool(str(key)) teller += 1 End While
So disappointing that we have to do this ourselves.. surely the QAT is the first (and probably only) thing that everybody wants to save.
We have the same issue here - want to save the QAT without losing the ability to add new buttons
Hello all,
Thank you for providing your feedback about our UltraToolbarsManager, and thanks to Fidura for providing your save/load code. This is a good implementation. I wanted to provide some additional background about our design process for this component.
When using the Ribbon, the QAT is the only thing that is customizable by default. The RibbonCustomizationProvider is required to modify the rest of the Ribbon. This means that, for most use cases, saving the entire toolbar should work.
I discussed this with the lead developer working on the UltraToolbarsManager. The UltraToolbarsManager keeps track of two different types of tools. Root tools belong to the Tools collection of the UltraToolbarsManager, and instance tools belong to the tools collection of a particular toolbar or menu. An instance tool is a specific occurrence of a root tool. The issue with saving just the QAT lies with what action to take if a file was loaded that contained QAT tools which don't exist in the root tools collection. It isn't ideal to skip over these tools because they are clearly intended to be there, and adding them doesn’t seem valid since the backing event handler code for the tool would still not exist. We avoid this issue by enforcing that all the tool information stays together.
If you would like to see a feature to load and save just the QAT in the Toolbars Manager, I recommend submitting this as a product idea. If the idea has enough support from our users, we will work together with the community to figure out the most desirable way to implement this. You can suggest new product ideas for future versions on our ideas site.
Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case.
Thank you in advance for submitting your product idea.
For anyone on this thread, please let me know if you have further questions.