A dockmanager was created and 2 toolwindows are the configuration windows which should be hidden after a calculate is requested and thus adding the necessary tool windows dynamically. However, when setting the configuration toolwindows to autohide, the DockManager.ToolWindowLayoutData drops them.
Here's the xml before the autohide set.
<?xml version="1.0"?>
<!--Actipro Docking/MDI for WinFormsCopyright (c) 2001-2018 Actipro Software LLC. All rights reserved.http://www.actiprosoftware.com -->
<ToolWindowLayout Version="1.0">
<LayoutData>
<HostContainerControl>
<ToolWindowContainer SelectedToolWindowGuid="bac27f8f-9df2-4bcc-92d7-72522a834101" Size="713, 1015" Dock="Top">
<ToolWindow Text="Summary of RMP" ImageIndex="-1" DockedSize="200, 35" AutoHideSize="1650, 1018" Guid="bac27f8f-9df2-4bcc-92d7-72522a834101" Key="RandomMatchProbability">
<AutoHideStateInfo RootDock="Top" />
<DockedInsideHostStateInfo RootDock="Top" IsAttached="False">
<DockedBy Guid="1e49cbaa-aa48-4d62-a558-a544d317d7a1" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
<DockedBy Guid="72adc2da-14f8-429e-944e-0d42c6edf188" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
</DockedInsideHostStateInfo>
<DockedOutsideHostStateInfo IsAttached="False" />
</ToolWindow>
</ToolWindowContainer>
<ToolWindowContainer SelectedToolWindowGuid="1e49cbaa-aa48-4d62-a558-a544d317d7a1" Size="592, 1015" Dock="Left">
<ToolWindow Text="Configuration Summary" ImageIndex="-1" DockedSize="588, 527" AutoHideSize="600, 600" Guid="1e49cbaa-aa48-4d62-a558-a544d317d7a1" Key="twConfiguration" FloatingSize="600, 600">
<AutoHideStateInfo RootDock="Left" />
<DockedInsideHostStateInfo RootDock="Left" IsAttached="False">
<DockedBy Guid="72adc2da-14f8-429e-944e-0d42c6edf188" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
</DockedInsideHostStateInfo>
<DockedOutsideHostStateInfo IsAttached="False" />
</ToolWindow>
</ToolWindowContainer>
<ToolWindowContainer SelectedToolWindowGuid="72adc2da-14f8-429e-944e-0d42c6edf188" Size="365, 1015" Dock="Left">
<ToolWindow Text="Target Profile" ImageIndex="-1" DockedSize="361, 600" AutoHideSize="325, 600" Guid="72adc2da-14f8-429e-944e-0d42c6edf188" Key="twSpecimen" FloatingSize="350, 600">
<AutoHideStateInfo RootDock="Left" />
<DockedInsideHostStateInfo RootDock="Left" IsAttached="False" />
<DockedOutsideHostStateInfo IsAttached="False" />
</ToolWindow>
</ToolWindowContainer>
</HostContainerControl>
<AutoHide Dock="Left" />
<AutoHide Dock="Right" />
<AutoHide Dock="Top">
<AutoHideGroup>
<ToolWindow Text="Number of Allele Summary" ImageIndex="-1" AutoHideSize="1650, 1018" Guid="b1404306-7661-4d81-b730-0bddac9d02f0" Key="AlleleSummary">
<AutoHideStateInfo RootDock="Top">
<AttachedToBefore Guid="6cf95560-83e7-4756-9abc-3be47fea67ff" />
<AttachedToBefore Guid="0cc57624-cddb-4eea-8c6b-32174fc30931" />
<AttachedToBefore Guid="a626e9f4-25e2-407d-a77e-27ddc9b52896" />
</AutoHideStateInfo>
<DockedInsideHostStateInfo RootDock="Top" IsAttached="False">
<DockedBy Guid="bac27f8f-9df2-4bcc-92d7-72522a834101" RootDock="Top" IsTopMost="True" DockOperationType="BottomOuter" />
<DockedBy Guid="1e49cbaa-aa48-4d62-a558-a544d317d7a1" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
<DockedBy Guid="72adc2da-14f8-429e-944e-0d42c6edf188" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
</DockedInsideHostStateInfo>
<DockedOutsideHostStateInfo IsAttached="False" />
</ToolWindow>
<ToolWindow Text="Probability vs. Population Graph" ImageIndex="-1" AutoHideSize="1650, 1018" Guid="6cf95560-83e7-4756-9abc-3be47fea67ff" Key="GraphProbVsPop">
<AutoHideStateInfo RootDock="Top">
<AttachedToBefore Guid="0cc57624-cddb-4eea-8c6b-32174fc30931" />
<AttachedToBefore Guid="a626e9f4-25e2-407d-a77e-27ddc9b52896" />
<AttachedToAfter Guid="b1404306-7661-4d81-b730-0bddac9d02f0" />
</AutoHideStateInfo>
<DockedInsideHostStateInfo RootDock="Top" IsAttached="False">
<DockedBy Guid="bac27f8f-9df2-4bcc-92d7-72522a834101" RootDock="Top" IsTopMost="True" DockOperationType="BottomOuter" />
<DockedBy Guid="1e49cbaa-aa48-4d62-a558-a544d317d7a1" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
<DockedBy Guid="72adc2da-14f8-429e-944e-0d42c6edf188" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
</DockedInsideHostStateInfo>
<DockedOutsideHostStateInfo IsAttached="False" />
</ToolWindow>
<ToolWindow Text="Probability vs. Loci Graph" ImageIndex="-1" AutoHideSize="1650, 1018" Guid="0cc57624-cddb-4eea-8c6b-32174fc30931" Key="GraphProbVsLociGraph">
<AutoHideStateInfo RootDock="Top">
<AttachedToBefore Guid="a626e9f4-25e2-407d-a77e-27ddc9b52896" />
<AttachedToAfter Guid="b1404306-7661-4d81-b730-0bddac9d02f0" />
<AttachedToAfter Guid="6cf95560-83e7-4756-9abc-3be47fea67ff" />
</AutoHideStateInfo>
<DockedInsideHostStateInfo RootDock="Top" IsAttached="False">
<DockedBy Guid="bac27f8f-9df2-4bcc-92d7-72522a834101" RootDock="Top" IsTopMost="True" DockOperationType="BottomOuter" />
<DockedBy Guid="1e49cbaa-aa48-4d62-a558-a544d317d7a1" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
<DockedBy Guid="72adc2da-14f8-429e-944e-0d42c6edf188" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
</DockedInsideHostStateInfo>
<DockedOutsideHostStateInfo IsAttached="False" />
</ToolWindow>
<ToolWindow Text="Relatedness Statistics" ImageIndex="-1" AutoHideSize="1650, 1018" Guid="a626e9f4-25e2-407d-a77e-27ddc9b52896" Key="Relatedness">
<AutoHideStateInfo RootDock="Top">
<AttachedToAfter Guid="b1404306-7661-4d81-b730-0bddac9d02f0" />
<AttachedToAfter Guid="6cf95560-83e7-4756-9abc-3be47fea67ff" />
<AttachedToAfter Guid="0cc57624-cddb-4eea-8c6b-32174fc30931" />
</AutoHideStateInfo>
<DockedInsideHostStateInfo RootDock="Top" IsAttached="False">
<DockedBy Guid="bac27f8f-9df2-4bcc-92d7-72522a834101" RootDock="Top" IsTopMost="True" DockOperationType="BottomOuter" />
<DockedBy Guid="1e49cbaa-aa48-4d62-a558-a544d317d7a1" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
<DockedBy Guid="72adc2da-14f8-429e-944e-0d42c6edf188" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
</DockedInsideHostStateInfo>
<DockedOutsideHostStateInfo IsAttached="False" />
</ToolWindow>
</AutoHideGroup>
</AutoHide>
<AutoHide Dock="Bottom" />
<TabbedDocuments Orientation="Horizontal" />
<FloatingContainers />
<Hidden />
</LayoutData>
<CustomData />
</ToolWindowLayout>
Then we set:
twConfiguration.State = ToolWindowState.AutoHide;
twSpecimen.State = ToolWindowState.AutoHide;
Here's the layout after the set:
<?xml version="1.0"?>
<!--Actipro Docking/MDI for WinFormsCopyright (c) 2001-2018 Actipro Software LLC. All rights reserved.http://www.actiprosoftware.com -->
<ToolWindowLayout Version="1.0">
<LayoutData>
<HostContainerControl>
<ToolWindowContainer SelectedToolWindowGuid="bac27f8f-9df2-4bcc-92d7-72522a834101" Size="1647, 1015" Dock="Top">
<ToolWindow Text="Summary of RMP" ImageIndex="-1" DockedSize="200, 35" AutoHideSize="1650, 1018" Guid="bac27f8f-9df2-4bcc-92d7-72522a834101" Key="RandomMatchProbability">
<AutoHideStateInfo RootDock="Top" />
<DockedInsideHostStateInfo RootDock="Top" IsAttached="False">
<DockedBy Guid="1e49cbaa-aa48-4d62-a558-a544d317d7a1" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
<DockedBy Guid="72adc2da-14f8-429e-944e-0d42c6edf188" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
</DockedInsideHostStateInfo>
<DockedOutsideHostStateInfo IsAttached="False" />
</ToolWindow>
</ToolWindowContainer>
</HostContainerControl>
<AutoHide Dock="Left" />
<AutoHide Dock="Right" />
<AutoHide Dock="Top">
<AutoHideGroup>
<ToolWindow Text="Number of Allele Summary" ImageIndex="-1" AutoHideSize="1650, 1018" Guid="b1404306-7661-4d81-b730-0bddac9d02f0" Key="AlleleSummary">
<AutoHideStateInfo RootDock="Top">
<AttachedToBefore Guid="6cf95560-83e7-4756-9abc-3be47fea67ff" />
<AttachedToBefore Guid="0cc57624-cddb-4eea-8c6b-32174fc30931" />
<AttachedToBefore Guid="a626e9f4-25e2-407d-a77e-27ddc9b52896" />
</AutoHideStateInfo>
<DockedInsideHostStateInfo RootDock="Top" IsAttached="False">
<DockedBy Guid="bac27f8f-9df2-4bcc-92d7-72522a834101" RootDock="Top" IsTopMost="True" DockOperationType="BottomOuter" />
<DockedBy Guid="1e49cbaa-aa48-4d62-a558-a544d317d7a1" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
<DockedBy Guid="72adc2da-14f8-429e-944e-0d42c6edf188" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
</DockedInsideHostStateInfo>
<DockedOutsideHostStateInfo IsAttached="False" />
</ToolWindow>
<ToolWindow Text="Probability vs. Population Graph" ImageIndex="-1" AutoHideSize="1650, 1018" Guid="6cf95560-83e7-4756-9abc-3be47fea67ff" Key="GraphProbVsPop">
<AutoHideStateInfo RootDock="Top">
<AttachedToBefore Guid="0cc57624-cddb-4eea-8c6b-32174fc30931" />
<AttachedToBefore Guid="a626e9f4-25e2-407d-a77e-27ddc9b52896" />
<AttachedToAfter Guid="b1404306-7661-4d81-b730-0bddac9d02f0" />
</AutoHideStateInfo>
<DockedInsideHostStateInfo RootDock="Top" IsAttached="False">
<DockedBy Guid="bac27f8f-9df2-4bcc-92d7-72522a834101" RootDock="Top" IsTopMost="True" DockOperationType="BottomOuter" />
<DockedBy Guid="1e49cbaa-aa48-4d62-a558-a544d317d7a1" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
<DockedBy Guid="72adc2da-14f8-429e-944e-0d42c6edf188" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
</DockedInsideHostStateInfo>
<DockedOutsideHostStateInfo IsAttached="False" />
</ToolWindow>
<ToolWindow Text="Probability vs. Loci Graph" ImageIndex="-1" AutoHideSize="1650, 1018" Guid="0cc57624-cddb-4eea-8c6b-32174fc30931" Key="GraphProbVsLociGraph">
<AutoHideStateInfo RootDock="Top">
<AttachedToBefore Guid="a626e9f4-25e2-407d-a77e-27ddc9b52896" />
<AttachedToAfter Guid="b1404306-7661-4d81-b730-0bddac9d02f0" />
<AttachedToAfter Guid="6cf95560-83e7-4756-9abc-3be47fea67ff" />
</AutoHideStateInfo>
<DockedInsideHostStateInfo RootDock="Top" IsAttached="False">
<DockedBy Guid="bac27f8f-9df2-4bcc-92d7-72522a834101" RootDock="Top" IsTopMost="True" DockOperationType="BottomOuter" />
<DockedBy Guid="1e49cbaa-aa48-4d62-a558-a544d317d7a1" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
<DockedBy Guid="72adc2da-14f8-429e-944e-0d42c6edf188" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
</DockedInsideHostStateInfo>
<DockedOutsideHostStateInfo IsAttached="False" />
</ToolWindow>
<ToolWindow Text="Relatedness Statistics" ImageIndex="-1" AutoHideSize="1650, 1018" Guid="a626e9f4-25e2-407d-a77e-27ddc9b52896" Key="Relatedness">
<AutoHideStateInfo RootDock="Top">
<AttachedToAfter Guid="b1404306-7661-4d81-b730-0bddac9d02f0" />
<AttachedToAfter Guid="6cf95560-83e7-4756-9abc-3be47fea67ff" />
<AttachedToAfter Guid="0cc57624-cddb-4eea-8c6b-32174fc30931" />
</AutoHideStateInfo>
<DockedInsideHostStateInfo RootDock="Top" IsAttached="False">
<DockedBy Guid="bac27f8f-9df2-4bcc-92d7-72522a834101" RootDock="Top" IsTopMost="True" DockOperationType="BottomOuter" />
<DockedBy Guid="1e49cbaa-aa48-4d62-a558-a544d317d7a1" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
<DockedBy Guid="72adc2da-14f8-429e-944e-0d42c6edf188" RootDock="Left" IsTopMost="True" DockOperationType="RightOuter" />
</DockedInsideHostStateInfo>
<DockedOutsideHostStateInfo IsAttached="False" />
</ToolWindow>
</AutoHideGroup>
</AutoHide>
<AutoHide Dock="Bottom" />
<TabbedDocuments Orientation="Horizontal" />
<FloatingContainers />
<Hidden />
</LayoutData>
<CustomData />
</ToolWindowLayout>
[Modified 5 years ago]