Hello!
This might be a stupid question. But how do I reset the Layout of a ultraToolbarsManager?
I use the Ribbon and the Office2007 style.
Quick description of my problem.
When I close a Form, I save the Layout to file like this (all changes as e.g. minimizing the toolbar will be persisted):this.ultraToolbarsManager1.SaveAsXml(fileName, true):
When I open the Form again, I load the Layout like this (the layout is loaded and the toolbar will appear minimized):this.ultraToolbarsManager1.LoadFromXml(fileName):
My question is, how can I get back to the original layout (that is the layout as it was the first time I opened the Form)?
I would expect a ultraToolbarsManager1.ClearLayout or something similar, but can't find it.
I would be very grateful for any help, thanks!
RegardsØyvind Liland
This feature has not yet been implemented. If you would like to bump up the priority, I would recommend submitting another feature request for it here. And I am not sure about other posts on the forums, but a quick search should show you topics related to UltraToolbarsManager and loading layouts.
Sorry to open an old thread Mike.
Did this feature of Layout Merging ever get implemented. I don't see any API for it in Infragistics 2010 volume 1. Are there any posts elsewhere in the forum about doing the merging ourselves?
Sorry, I forgot to mention how to work around this:
You can manually get around this by letting the layout file load. Then you can check the root tools collection of the toolbars manager. If any tools from the update are not present, you can manually add them to the manager and put instances of those tools in their default locations.
Loading a layout will clear all tools and settings from the toolbars manager and load the settings and tools from the file. After the load, the toolbars manager has no knowledge of the old configuration of itself. To revert back to the original layout, you will have to save a layout file in the Load event of the Form before loading the previously saved layout. This layout can be stored as a MemoryStream object in the application. Whenever you want to reset to the original layout, just load this stream into the toolbars manager.
As for the questions about updating your toolbars manager and then loading in a previous layout file, as I have mentioned, loading a layout file will completely overwrite all tools and settings of the toolbars manager, so the updates will be lost. To be able to load an old layout and keep updates to the toolbars manager, it would have to support layout file merging. You can submit a feature request for this here: http://devcenter.infragistics.com/Protected/RequestFeature.aspx. I believe there have been a few requests for this already, but another request will increase the chances that it will get implemented sooner.
Hello......?
Any Infragistics guys there?