Hello,
we are using the toolbarmanager and toolbaradv like this:
Because toolbaradvs should be added using a click on a menu item we decided to use an observable collection where an viewmodel is added. We added then to our view an Dependency property of type Observable collection. The View reacts than when adding a viewmodel and creates a view called MiniMenuControl.
The minemenu control decides using DateTemplates which sub control it uses. A subcrontrol for instance looks like this
Usually we have about 3 of such mini menus docked in the toolbar. When adding a new menu it is floated in the beginning (as can be seen in the code above). When adding such a new menu a live lock is triggered in which UpdateLayout is called again and again. This process seems to never end. We debugged this and in the call stack (please see the arrow in the screenshot below) UpdateLayout() is called always on the ToolBarManager. (the UiElement on which Measure is called it the ToolBarManager).
We also observed that the existing docked ToolbarAdvs (we initilize the ObservableCollection always with 3 minimenus) can only be moved with a lot of stuttering. So moving them out to the floating state ofen ends that a new band is created to which the other ToolbarAdvs are moved to and the toolbaradv which should be moved out got stuck in Band 0. Then only on the second drag its getting into the floating state.
The only remedy we found out is to reduce the complexity a lot. So removing the grids and actually having only a few controls in ToolbarAdv. The stuttering however is still there. Is there any way to stop this live lock?
Thx in advance.