Specifics of Bars Layout Calculation
Take special note that the layout of bars is calculated on painting the form. If you somehow invalidate the layout of bars by calling a specific method, the bars' view information will be calculated only on repainting. Changing the layout of bars when it's not valid may cause incorrect rendering and in rare cases, exceptions.
If the current layout is not valid and you want to call a specific method that changes the layout, invoke the Bar.ApplyDockRowCol method before this call. This method will recalculate the view information, making the layout valid.