First save the layout with DocumentHost panes.
When LoadLayout, the Panes which are in DocumentHost are inverted with the header, see the image attached.
Thanks
5 Answers, 1 is accepted
This only happens if you didn't set the RadDocking.SerailizationTag attached property to the pane. If you don't set this property the Save/Load layout won't be able to load the content of the pane as well so most probably you will need to set this property. For more information about how to use the Save/Load layout feature of the Docking control you could refer to the following blog post: http://blogs.telerik.com/miroslavnedyalkov/posts/09-04-22/raddocking_save_load_layout.aspx
We will fix the problem for one of the upcoming releases.
Kind regards,Miroslav Nedyalkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
I'm already doing this, set the SerializationTag for all windows.
You have an example of DocumentHost save, close the browser and reopen when it loads correctly?
Thanks
What I observed is that the panes with no serialization tag behave like you said, but these with serialization tag set behave correctly. Please find the attached project.
Regards,Miroslav Nedyalkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
I tried putting the SerializationTag but do not work.
I am sending a sample (download here), do the following:
- Run the project
- Create a Pane
- Save the Layout
- Close the project
- Rerun the project
- Load the layout
** At this point the problem will occur.
Thanks
Now I was able to reproduce the issue and was able to find a work-around. What I did was to change the code of the Area_ElementLoaded method to the following:
private
void
Area_ElementLoaded(
object
sender, LayoutSerializationEventArgs e)
{
if
(e.AffectedElement.GetType().Name ==
"RadPane"
)
{
var pane = (RadPane)e.AffectedElement;
pane.Content =
new
Control1();
pane.Dispatcher.BeginInvoke(() =>
{
if
(pane.IsInDocumentHost)
{
pane.Template = ((RadPane)e.AffectedElement).DocumentHostTemplate;
}
});
}
}
I will log the issue and we will fix it for one of the upcoming releases.
Best wishes,Miroslav Nedyalkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.