Hello!
I have a issue about show conent of RadDocumentPane when LoadLayout.
in my project,I LoadLayout of a docking from xml file,the Layout can be loaded right,
the conent in other RadPane can be shown right,but content in RadDocumentPane can not show.
this is my code:
<telerik:RadDocking x:Name="MainDocking">
<telerik:RadDocking.DocumentHost >
<telerik:RadSplitContainer>
<telerik:RadSplitContainer InitialPosition="DockedLeft" Orientation="Vertical">
<telerik:RadPaneGroup>
<telerik:RadPane Header="a1" telerik:RadDocking.SerializationTag="a2" CanUserClose="False">
<TextBlock Text="CanShow" />
</telerik:RadPane>
</telerik:RadPaneGroup>
</telerik:RadSplitContainer>
<telerik:RadSplitContainer>
<telerik:RadPaneGroup>
<telerik:RadDocumentPane x:Name="documentPane" CanUserClose="False" Title="Robot" Header="Robot">
<TextBlock Text="CanNotShow" />
</telerik:RadDocumentPane>
</telerik:RadPaneGroup>
</telerik:RadSplitContainer>
</telerik:RadSplitContainer>
</telerik:RadDocking.DocumentHost>
</telerik:RadDocking>
back code:
private MainWindow()
{
InitializeComponent();
LoadLayout();
}
public void LoadLayout()
{
var path = Path.Combine(vm.rootPath, "1.xml");
using (var fileStream = File.Open(path, FileMode.Open, FileAccess.Read))
{
var reader = new StreamReader(fileStream);
var serializationString = reader.ReadToEnd();
LoadLayoutFromString(serializationString);
}
}
private void LoadLayoutFromString(string xml)
{
using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(xml)))
{
stream.Seek(0, SeekOrigin.Begin);
this.MainDocking.LoadLayout(stream);
}
}
what should I do?