OK here's the situation:
I'm using the merge feature. I open a MDI child form where the child form has 4 toolbars. Initially I want to show only one toolbar that's associated to several tabs on the form. This all works as I would expect.
In the selected tab change event I hide and unhide the toolbars as needed. The problem happens when I close the form when the non-default toolbar is displayed. When the form is re-opened with the same or different data the non-default toolbar shows up on the main tab even though I preset the form on initialization to set the visible property of that toolbar to false and the visible property of the default toolbar to true.
And it ignores changing the toolbars based on selected tab change until I select the tab that makes that non-default toolbar visible. After that the toolbars show and hide correctly.
I've tried RefreshMerge on both the parent and the child toolbarmanager with no luck. Is there something I'm missing?
It is possibly a bug. I just looked through the UltraToolbarsManager code and it appears the UltraToolbar.Visible property is synchronized from the child toolbar to the merged parent toolbar while the child is merged. But it seems that when a child is re-merged, we are not forcing a synchronization. You might be able to work around this by toggling the visibility of all child toolbars immediately after the merge occurs: override OnMdiChildActivate on the parent Form, call the base implementation first, and then call some method on the current child Form to toggle the Visible property on all its toolbars. What I mean by that is just change the Visible property to the opposite of the current value and then do the same thing again, so it ends up getting the same value with which it started.
In the meantime, I have forwarded this post to the Developer Support Manager and a DS engineer will be contacting you about this issue.
Actually I came up with a simpler solution. Just set the toolbars prior to closing the form back to the way they were. This seems to have worked. I don't know why I didn't think of it before.