I'm creating a RadPane and Save the Layout.
When I open the application, collects the serialized layout and performs LoadLayout(). It works without problems.
8 Answers, 1 is accepted
Could you please provide a sample project that demonstrates the issue and a step-by-step instructions how to reproduce it - this will help us better understand what the problem is and assist you fixing it.
You could also refer to the following blog post that corresponds to your scenario: http://blogs.telerik.com/miroslavnedyalkov/posts/10-03-04/how_to_activate_a_pane_in_the_telerik_docking_control_for_wpf_and_silverlight.aspx.
Greetings,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.
When I click on Open Pane, the application first checks if there is, if exists, creates a pane, if not exists, simply calls the method Focus ().
When I create a pane, unpinned and save the layout, close the application, open again and try to load layout. Aftet, try to Open Pane, not find the pane.
What you need to do to fix this problem is to set the SerializationTag attached property to the group, you are referencing in the code-behind.
Sincerely yours,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 the project you sent, but seems that it works as expected. Could you please tell us what do you think is not working correctly? I went trough the code using your break points and it seems that creates the pane only when there is no pane in the docking with this name.
If you could send us a step-by-step instructions what you and what you expect to happen every step this would be very helpful.
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.
Now I see. The problem is that when the Docking control is loading the layout, it cannot find your pane in the default docking to associate it with the loaded pane (with the SerializationTag) and creates an empty pane with the saved settings. What you need to do to override this behavior is to handle the ElementLoading event of the Docking control and to use the event args to create your pane. Please find the attached project - I edited your project and fixed this issue.
One more thing - I noticed that you are using a memory stream in order to save or load the layout. You don't need to do this - you could use directly the isolated storage file stream. I changed this in the example to demonstrate the idea.
Hope this helps!
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.