This is a migrated thread and some comments may be shown as answers.

Splitterposition loading issue

1 Answer 71 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Thomas Felis
Top achievements
Rank 1
Thomas Felis asked on 28 Jan 2011, 03:15 PM
Hello,

I have an issue with the raddocking's loadlayout().
When i try to load a layout, sometimes the splittercontainer's position fails to load correctly.

I've made a small demo to represent the problem.

<telerikDocking:RadDocking x:Name="dokcingMain">
           <telerikDocking:RadDocking.DocumentHost>
               <telerikDocking:RadSplitContainer>
                   <telerikDocking:RadPaneGroup x:Name="PaneGroup" >
                       <telerikDocking:RadPane telerikDocking:RadDocking.SerializationTag="pane1"
                                               Header="Pane1" BorderThickness="0"
                                               CanUserClose="False" CanFloat="False" CanUserPin="False"
                                               ContextMenuTemplate="{x:Null}"/>
                       <telerikDocking:RadPane telerikDocking:RadDocking.SerializationTag="pane2"
                                               Header="Pane1" BorderThickness="0"
                                               CanUserClose="False" CanFloat="False" CanUserPin="False"
                                               ContextMenuTemplate="{x:Null}"/>
                       <telerikDocking:RadPane telerikDocking:RadDocking.SerializationTag="pane3"
                                               Header="Pane3" BorderThickness="0"
                                               CanUserClose="False" CanFloat="False" CanUserPin="False"
                                               ContextMenuTemplate="{x:Null}"/>
                       <telerikDocking:RadPane telerikDocking:RadDocking.SerializationTag="pane4"
                                               Header="Pane4" CanUserClose="False"
                                               CanUserPin="False" CanFloat="False"
                                               ContextMenuTemplate="{x:Null}"/>
                       <telerikDocking:RadPane telerikDocking:RadDocking.SerializationTag="pane5"
                                               Header="Pane5" BorderThickness="0"
                                               CanUserClose="False" CanFloat="False" CanUserPin="False"
                                               ContextMenuTemplate="{x:Null}"/>
                       <telerikDocking:RadPane telerikDocking:RadDocking.SerializationTag="pane6"
                                               Header="Pane6" BorderThickness="0"
                                               CanUserClose="False" CanFloat="False" CanUserPin="False"
                                               ContextMenuTemplate="{x:Null}"/>
                       <telerikDocking:RadPane telerikDocking:RadDocking.SerializationTag="pane7"
                                               Header="Pane7" BorderThickness="0"
                                               CanUserClose="False"
                                               ContextMenuTemplate="{x:Null}"/>
                   </telerikDocking:RadPaneGroup>
               </telerikDocking:RadSplitContainer>
           </telerikDocking:RadDocking.DocumentHost>
       </telerikDocking:RadDocking>


After i started the demo, I floated the Pane7, then I re-docked it to the inner-left area (so there will be 2 radpanegroups at the end).
I set the splitter's position by hand, then saved the layout to an xml file.

Here is the result:
<RadDocking>
  <DocumentHost>
    <RadSplitContainer>
      <Items>
        <RadPaneGroup RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True" SplitterChange="42,2180640734751" SelectedIndex="0">
          <Items>
            <RadPane SerializationTag="pane7" IsDockable="True" Title="Pane7" Header="Pane7" CanUserClose="False" />
          </Items>
        </RadPaneGroup>
        <RadPaneGroup SplitterChange="456,781935926525" SelectedIndex="0">
          <Items>
            <RadPane SerializationTag="pane1" IsDockable="True" Title="Pane1" Header="Pane1" CanUserClose="False" CanUserPin="False" CanFloat="False" />
            <RadPane SerializationTag="pane2" IsDockable="True" Title="Pane1" Header="Pane1" CanUserClose="False" CanUserPin="False" CanFloat="False" />
            <RadPane SerializationTag="pane3" IsDockable="True" Title="Pane3" Header="Pane3" CanUserClose="False" CanUserPin="False" CanFloat="False" />
            <RadPane SerializationTag="pane4" IsDockable="True" Title="Pane4" Header="Pane4" CanUserClose="False" CanUserPin="False" CanFloat="False" />
            <RadPane SerializationTag="pane5" IsDockable="True" Title="Pane5" Header="Pane5" CanUserClose="False" CanUserPin="False" CanFloat="False" />
            <RadPane SerializationTag="pane6" IsDockable="True" Title="Pane6" Header="Pane6" CanUserClose="False" CanUserPin="False" CanFloat="False" />
          </Items>
        </RadPaneGroup>
      </Items>
    </RadSplitContainer>
  </DocumentHost>
  <SplitContainers />
</RadDocking>

As you can see, the first radpanegroup is approximately ~42px wide, while the second is 456px. So far so good...
But when i try to load these settings, the splitter's position fails to load correctly.

I've made a screenshots before and after the layout loading.

Before:
Right splitter position screenshot

After:
Wrong splitter position screenshot

Have you got any idea what could cause this behaviour? Any help will be appreciated.

Greetings,
Thomas

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 03 Feb 2011, 09:43 AM
Hello Thomas,

 
Could you please explain when the layout fails to load correctly? If you send us a sample project that reproduces the problem it would be very helpful in further pinpointing the problem.

I am glad to assist you further.

Greetings,
George
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
Docking
Asked by
Thomas Felis
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or