Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
70
Merging new tools into a user defined UltraToolbarsManager
posted

I am curious of the best method to handle the following situation:

We have an app that uses a UltraToolbarsManager.  The user has the ability to have their own unique toolbars (for layout) and we use the LoadFromBinary and SaveAsBinary methods to achieve this.  The problem is that when we add new tools to the application's default UltraToolbarsManager, the user's unique toolbar gets loaded over the default and they don't have the newly added tools.  How can I "merge" or make these new tools available for the user defined toolbars? 

I was thinking of creating a helper method to spin through the tools and add missing ones to the user defined toolbar but ran into the error "Can't add tool to Tools collection - tool is from a different ToolbarsManager".

We have worked around this issue in the past by programmatically adding each new tool after the LoadFromBinary call, but this solution is not ideal.  Personally, I would prefer to kill off the user defined toolbars feature before continuing with our workaround path of hard coding new tools.

Perhaps there is a simple solution to this that I am not aware; I am only about 6 months into Infragistic's controls.

  • 44743
    Verified Answer
    posted

    There is currently no way to merge a layout file into the current state of the UltraToolbarsManager. You could submit a feature request for layout merging. That would help you achieve this sort of thing.

    But until that is implemented, you will have to find another way. You solution of looping through the new tools and programmatically adding them after loading the layout seems like the right thing to do. I'm surprised you're getting an error like that. Can you post some code that shows how you are trying to do this?