Update Layout Livelock in Toolbar

Hello,

we are using the toolbarmanager and toolbaradv like this:

Image_5402_1701943270217

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.




Image_7346_1701943440063

The minemenu control decides using DateTemplates which sub control it uses. A subcrontrol for instance looks like this


Image_4586_1701943575167

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).


Image_2793_1701944918183

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.


1 Reply

BS Bhaskar Suresh Syncfusion Team December 15, 2023 03:11 PM UTC

Hi,


Sorry for the delayed response.


We are unable to reproduce the reported issue based on the given information. Please refer to the sample provided for your reference.

Could you please share the following information so that we can provide a solution?

  • Code snippet of the control.
  • Modified sample that replicates the issue.


Regards,

Bhaskar Suresh


Attachment: ToolBarAdv_1_f3f6996c.zip

Loader.
Up arrow icon