/// <summary> /// Loads the preview control and resize. /// </summary> /// <param name="caller">The caller.</param> /// <param name="previewControl">The preview control.</param> /// <param name="height">The height.</param> /// <param name="width">The width.</param> public static void LoadPreviewControlAndResize(UserControl caller, UserControl previewControl) { // use Parent.Parent. First Parent is the kryptonSplitContainer2.Panel1, second parent is the kryptonSplitContainer2 Control[] ctrl = new Control[0]; if (caller.Parent != null && caller.Parent.Parent != null) ctrl = caller.Parent.Parent.Controls.Find(KRYPTONSPLITCONTAINER_PANEL2_ID, false); if (ctrl.Any()) { UIUtility.LoadControlAndResize(ctrl[0], previewControl, ctrl[0].Height, ctrl[0].Width); } }