/// <summary> /// Builds the editors layout. /// </summary> public virtual void BuildLayout() { // Clear layout var parentScrollV = (Panel.Parent as Panel)?.VScrollBar?.Value ?? -1; Panel.IsLayoutLocked = true; Panel.DisposeChildren(); ClearLayout(); Editor.Setup(this); Panel.UnlockChildrenRecursive(); Panel.PerformLayout(); // Restore scroll value if (parentScrollV != -1) { ((Panel)Panel.Parent).VScrollBar.Value = parentScrollV; } }