Esempio n. 1
0
        private void CreateDockContents()
        {
            var theWorkspace = Workbench.MainWorkspace as MockWorkspace;

            foreach (var item in theWorkspace.MainControls)
            {
                var newContent = new DockContentEx(item.Value, item.Key.Title);
                newContent.CloseButtonVisible = true;
                newContent.Icon              = item.Key.DefaultIcon;
                newContent.PartAttribute     = item.Key;
                newContent.PersistString     = item.Key.ID;
                newContent.DefaultDockState  = ShellHelper.Convert(item.Key.Dock);
                newContent.DefaultAlignment  = ShellHelper.Convert(item.Key.Alignment);
                newContent.DefaultProportion = item.Key.Proportion;

                _dockContents[item.Key] = newContent;
            }
        }