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

SaveLayout generates extra XML

1 Answer 22 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 09 Nov 2011, 09:32 PM
Hello,

I'm working with the Docking framework, and saving/loading the layout. I've noticed that the XML generated by the SaveLayout seems to generate a lot of extra XML after the actual template. It looks like it's exporting snippets of the rest of the layout. Here's an example:

<?xml version="1.0" encoding="utf-8"?>
<RadDocking>
<DocumentHost>
<RadSplitContainer Orientation="Horizontal">
<Items>
<RadPaneGroup SerializationTag="SearchResultsPaneGroup" SelectedIndex="0">
<Items>
<RadPane SerializationTag="SearchResults" IsDockable="True" Title="Search Results" Header="Search Results" CanUserClose="False" />
</Items>
</RadPaneGroup>
</Items>
</RadSplitContainer>
</DocumentHost>
<SplitContainers>
<RadSplitContainer Dock="DockedLeft" Width="240" Orientation="Horizontal">
<Items>
<RadPaneGroup RelativeWidth="300" RelativeHeight="200" SelectedIndex="-1">
<Items>
<RadPane SerializationTag="SearchWindow" IsPinned="False" IsDockable="False" Title="Search" Header="Search" CanUserClose="False" AutoHideWidth="236" AutoHideHeight="602" />
</Items>
</RadPaneGroup>
</Items>
</RadSplitContainer>
<RadSplitContainer Dock="DockedRight" Width="240" Orientation="Horizontal">
<Items>
<RadPaneGroup RelativeWidth="500" RelativeHeight="200" SelectedIndex="0">
<Items>
<RadPane SerializationTag="Messages" IsDockable="True" Title="Messages" Header="Messages" CanUserClose="False" />
</Items>
</RadPaneGroup>
</Items>
</RadSplitContainer>
</SplitContainers>
</RadDocking>


litContainers>
</RadDocking>
orizontal">
<Items>
<RadPaneGroup RelativeWidth="500" RelativeHeight="200" SelectedIndex="0">
<Items>
<RadPane SerializationTag="Messages" IsDockable="True" Title="Messages" Header="Messages" CanUserClose="False" />
</Items>
</RadPaneGroup>
</Items>
</RadSplitContainer>
</SplitContainers>
</RadDocking>
AutoGenerated="True" SelectedIndex="0">
<Items>
<RadPane SerializationTag="SearchWindow" IsDockable="True" Title="Search" Header="Search" CanUserClose="False" />
</Items>
</RadPaneGroup>
</Items>
</RadSplitContainer>
<RadSplitContainer Dock="DockedLeft" Width="240" Orientation="Horizontal">
<Items>
<RadPaneGroup RelativeWidth="300" RelativeHeight="200" SelectedIndex="-1">
<Items />
</RadPaneGroup>
</Items>
</RadSplitContainer>
<RadSplitContainer Dock="DockedRight" Width="240" Orientation="Horizontal">
<Items>
<RadPaneGroup RelativeWidth="500" RelativeHeight="200" SelectedIndex="0">
<Items>
<RadPane SerializationTag="Messages" IsDockable="True" Title="Messages" Header="Messages" CanUserClose="False" />
</Items>
</RadPaneGroup>
</Items>
</RadSplitContainer>
</SplitContainers>
</RadDocking>

The second half of that (after "litContainers>) is not proper XML, and seems to be a few random portions of the first half. Is this intentional?

I do note that this XML is loaded correctly by the LoadLayout Method, but it keeps the output from being read by any XML parser.

Thanks,

Ryan Brown

1 Answer, 1 is accepted

Sort by
0
Ivo
Telerik team
answered on 11 Nov 2011, 10:31 AM
Hi Ryan,

I would suggest you use FileMode.Create instead of FileMode.OpenOrCreate into the SaveLayout() method.

Best wishes,
Ivo
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Docking
Asked by
Ryan
Top achievements
Rank 1
Answers by
Ivo
Telerik team
Share this question
or