VitNX_DockPanel.GetDockPanelState Method
This language is not supported or no code example is available.
Return Value
DockPanelState
public DockPanelState GetDockPanelState()
{
var state = new DockPanelState();
state.Regions.Add(new DockRegionState(VitNX_DockArea.Document));
state.Regions.Add(new DockRegionState(VitNX_DockArea.Left,
_regions[VitNX_DockArea.Left].Size));
state.Regions.Add(new DockRegionState(VitNX_DockArea.Right,
_regions[VitNX_DockArea.Right].Size));
state.Regions.Add(new DockRegionState(VitNX_DockArea.Bottom,
_regions[VitNX_DockArea.Bottom].Size));
var _groupStates = new Dictionary<VitNX_DockGroup, DockGroupState>();
var orderedContent = _contents.OrderBy(c => c.Order);
foreach (var content in orderedContent)
{
foreach (var region in state.Regions)
{
if (region.Area == content.DockArea)
{
DockGroupState groupState;
if (_groupStates.ContainsKey(content.DockGroup))
groupState = _groupStates[content.DockGroup];
else
{
groupState = new DockGroupState();
region.Groups.Add(groupState);
_groupStates.Add(content.DockGroup, groupState);
}
groupState.Contents.Add(content.SerializationKey);
groupState.VisibleContent = content.DockGroup.VisibleContent.SerializationKey;
}
}
}
return state;
}
This language is not supported or no code example is available.
.NET Framework
Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
.NET Core
Supported in: 5.0+, 6.0+