internal static void UpdateToolBarPosition(RadToolBarTray tray, RadToolBar toolBar, ToolBarPositionInfo positionInfo, bool allowNewBandCreation) { toolBar.Band = (allowNewBandCreation && positionInfo.NewBand.HasValue) ? positionInfo.NewBand.Value : (positionInfo.Band.HasValue ? positionInfo.Band.Value : 0); toolBar.BandIndex = positionInfo.BandIndex; for (int i = 0; i < positionInfo.BandIndex; i++) { positionInfo.ToolBars[i].BandIndex = i < positionInfo.BandIndex ? i : i + 1; } }