Problems after Deserializing

Nov 17, 2014 at 9:23 AM
I have an AvalonDock object that I save (serialize) when I exit the application and load (deserialize) when I enter.

This is my xaml:
<AD:DockingManager Name="DOCK_Manager" >
            <avalonDock:LayoutRoot >

                <avalonDock:LayoutRoot.RightSide>
                    <avalonDock:LayoutAnchorSide>
                        <avalonDock:LayoutAnchorGroup x:Name="GROUP_Record">
                            <avalonDock:LayoutAnchorable Title="Record" x:Name="CONTAINER_Record_Parent"  AutoHideMinWidth="220" ContentId="RecordID"
                                                         CanClose="True" CanFloat="True" CanHide="False" CanAutoHide="True">
                                <Grid x:Name="CONTAINER_Record"/>
                            </avalonDock:LayoutAnchorable>

                        </avalonDock:LayoutAnchorGroup>
                    </avalonDock:LayoutAnchorSide>

                </avalonDock:LayoutRoot.RightSide>

                <avalonDock:LayoutPanel Orientation="Horizontal" >

                    <avalonDock:LayoutAnchorablePaneGroup DockWidth="250" Orientation="Vertical" x:Name="GROUP_1" >
                        <avalonDock:LayoutAnchorablePane x:Name="PANE_Script_1" >
                            <avalonDock:LayoutAnchorable Title="Script 1" x:Name="SCRIPT_Container_1" ContentId="Script_1ID" CanClose="True" CanAutoHide="True" CanHide="False">
                                <my:Script_New />
                            </avalonDock:LayoutAnchorable>
                            <avalonDock:LayoutAnchorable Title="Script 2" x:Name="SCRIPT_Container_2"  ContentId="Script_2ID" CanHide="False">
                                <my:Script_New />
                            </avalonDock:LayoutAnchorable>
                            <avalonDock:LayoutAnchorable Title="Script 3" x:Name="SCRIPT_Container_3"  ContentId="Script_3ID" CanHide="False">
                                <my:Script_New />
                            </avalonDock:LayoutAnchorable>
                        </avalonDock:LayoutAnchorablePane>

                        <avalonDock:LayoutAnchorablePane>
                            <avalonDock:LayoutAnchorable Title="Terminal" x:Name="CONTAINER_Terminal_Parent" ContentId="TerminalID" CanHide="False">
                                <Grid x:Name="CONTAINER_Terminal"/>
                            </avalonDock:LayoutAnchorable >
                            <avalonDock:LayoutAnchorable Title="Output" x:Name="CONTAINER_Output" ContentId="OutputID" CanHide="False">
                                <my:OutputScript_New/>
                            </avalonDock:LayoutAnchorable>
                        </avalonDock:LayoutAnchorablePane>
                    </avalonDock:LayoutAnchorablePaneGroup>

                    <avalonDock:LayoutAnchorablePaneGroup Orientation="Vertical">
                        <avalonDock:LayoutAnchorablePane>
                            <avalonDock:LayoutAnchorable Title="Scope" x:Name="CONTAINER_Scope_Parent" ContentId="ScopeID" CanHide="False">
                                <Border BorderBrush="Gray" BorderThickness="1" x:Name="CONTAINER_Scope">
                                </Border>
                            </avalonDock:LayoutAnchorable>
                        </avalonDock:LayoutAnchorablePane>

                        <avalonDock:LayoutAnchorablePane>
                            <avalonDock:LayoutAnchorable Title="Watch" x:Name="CONTAINER_Watch_Parent" ContentId="WatchID" CanHide="False">
                                <Grid x:Name="CONTAINER_Watch"/>
                            </avalonDock:LayoutAnchorable>
                            <avalonDock:LayoutAnchorable Title="Data Table" x:Name="CONTAINER_DataTable"  ContentId="DataTableID" CanHide="False">
                                <my:DataTable_New />
                            </avalonDock:LayoutAnchorable>
                            <avalonDock:LayoutAnchorable Title="Motion" x:Name="CONTAINER_Motion_Parent" ContentId="MotionID" CanHide="False">
                                <Grid x:Name="CONTAINER_Motion"/>
                            </avalonDock:LayoutAnchorable>
                            <avalonDock:LayoutAnchorable Title="Measure" x:Name="CONTAINER_Measure_Parent" ContentId="MeasureID" CanHide="False">
                                <Grid x:Name="CONTAINER_Measure"/>
                            </avalonDock:LayoutAnchorable>
                            <avalonDock:LayoutAnchorable Title="Parameters Table" x:Name="CONTAINER_ParametersTable_Parent" ContentId="ParametersTableID" CanHide="False">
                                <Grid x:Name="CONTAINER_ParametersTable"/>
                            </avalonDock:LayoutAnchorable>

                        </avalonDock:LayoutAnchorablePane>
                    </avalonDock:LayoutAnchorablePaneGroup>

                </avalonDock:LayoutPanel>

            </avalonDock:LayoutRoot>

        </AD:DockingManager>
I allow the user to add LayoutAnchorable to PANE_Script_1.
If I use Deserialize when the app is running, the LayoutAnchorable is not added.
If I don't use Deserialize, and just let the window be created acording to the xmal, the LayoutAnchorable is added properly.

Dose anybody know whats wrong?