public override void RestoreLayout() { var layoutStream = RestoreLayoutFromDataStore(); if (layoutStream != null) { _verticalGrid.RestoreLayoutFromStream(layoutStream); } }
/// <summary> /// 设置布局数据 /// </summary> /// <param name="dockManager">停靠管理器</param> /// <param name="layoutData">布局数据</param> public static void SetLayoutData(this VGridControlBase control, byte[] layoutData) { if (layoutData.IsNullOrEmpty()) { return; } using (MemoryStream buffer = new MemoryStream(layoutData)) { control.RestoreLayoutFromStream(buffer); } }