This question is locked. New answers and comments are not allowed.
private
string
SaveLayoutAsString()
{
MemoryStream stream =
new
MemoryStream();
this
.Docking.SaveLayout(stream);
stream.Seek(0, SeekOrigin.Begin);
StreamReader reader =
new
StreamReader(stream);
return
reader.ReadToEnd();
}
private
void
LoadLayoutFromString(
string
xml)
{
using
(Stream stream =
new
MemoryStream(Encoding.UTF8.GetBytes(xml)))
{
stream.Seek(0, SeekOrigin.Begin);
this
.Docking.LoadLayout(stream);
}
}
private
void
LoadTest_Click(
object
sender, RoutedEventArgs e)
{
LoadLayoutFromString(
this
.XmlTextBox.Text);
}
private
void
SaveLayoutTest_Click(
object
sender, RoutedEventArgs e)
{
this
.XmlTextBox.Text = SaveLayoutAsString();
}
<
telerik:RadDocking
x:Name
=
"Docking"
Grid.Row
=
"1"
BorderThickness
=
"0"
Padding
=
"0"
>
<
telerik:RadDocking.DocumentHost
>
<
telerik:RadSplitContainer
>
<
telerik:RadPaneGroup
x:Name
=
"DocumentGroup"
>
<
telerik:RadPane
x:Name
=
"LayoutXml"
Header
=
"Layout Xml"
telerik:RadDocking.SerializationTag
=
"LayoutXml"
telerik:RadDocking.FloatingSize
=
"450, 400"
>
<
TextBox
TextWrapping
=
"Wrap"
Grid.Row
=
"2"
x:Name
=
"XmlTextBox"
Background
=
"#19F4F4F5"
VerticalScrollBarVisibility
=
"Auto"
/>
</
telerik:RadPane
>
<
telerik:RadDocumentPane
Header
=
"Document 1"
Title
=
"Document 1"
telerik:RadDocking.SerializationTag
=
"DocumentPane"
>
<
TextBox
x:Name
=
"DocumentTextBox"
Text
=
"Some text"
Background
=
"#19F4F4F5"
/>
</
telerik:RadDocumentPane
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking.DocumentHost
>
</
telerik:RadDocking
>
code as same as demo,i think code is ok,but don't understand why do not show title???
i drag RadDocumentPane,title is show