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

LoadLayout breaks the theme.

2 Answers 66 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Inseok
Top achievements
Rank 1
Inseok asked on 22 Apr 2011, 03:19 PM
Hi, I'm facing at strange behavior of LoadLayout feature.
Please let me know, is the behavior by design or not.

I created a solution to test LoadLayout feature. You can download it here:
http://cid-60778ca3c47c21fe.office.live.com/self.aspx/Public/DockingViewTest.zip

Here's the instruction to reproduce it.
1) Open the solution, and add references for RadDocking.

2) Run it. Just a Pane will show on the DocumentHost. (screenshot #01)

3) Click 'SetTheme' button, then it style up the RadDocking with MyResources.xaml in the project. (screenshot #02)
(If you click the 'Add a pane...' button, then you can see 'themed' new Pane on new SplitContainer.)

4) Click 'LoadLayout1' button, it will perform LoadLayout with MyLayout1.xml in the project. (screenshot #03)
Everything is fine. All panes are keeping the style which I 'themed'.

5) Click 'LoadLayout2' button, then it will load MyLayout2.xml and the style of 'New Pane 1' Pane will be broken. (screenshot #04)

The only difference between MyLayout1.xml and MyLayout2.xml is, a SerializationTag of RadPaneGroup which named "New Group 1" and "Changed Group ..." in the middle of the files.

RadDocking arranges all the layout on the docking and if there's no such a item which matches the SerializationTag, then it creates new item for it. But at this time, RadDocking doesn't seem to use it's GeneratedItemsFactory (I tested it), and it just create 'empty-not-themed' item.
As the result, the theme will be broken as I told above.

An interesting thing is, if you click the 'LoadLayout2' button once again, then it fixes the theme and everything's okay again.
Of course, now it has known SerializationTag, so that RadDocking doesn't make new item, I guess.

I think;
1) RadDocking should use it's GeneratedItemsFactory when it loads layout, so that I can have single way to customize generated item.
2) RadDocking should keep the theme when it loads new element whether the item has known SerializationTag or not.

Well, may be I can use ElementLoading event to set the theme manually. But I don't think it is necessary.

Regards,

2 Answers, 1 is accepted

Sort by
0
Accepted
Miroslav Nedyalkov
Telerik team
answered on 27 Apr 2011, 08:52 AM
Hello Inseok,

Thank you for reporting us this problem.

You are correct that there are some issues with theming and Save/Load layout and we will target them as we are planning to update the way the theming work. For now you could just remove the SerilizationgTag property from all elements you don't need to hold reference to, like SplitContainers and PaneGroups.

I understand that in many cases you need to have references to the PangGroups, but you could just remove the SerializationTag from the SplitContainers - this should resolve the issue.

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
0
Inseok
Top achievements
Rank 1
answered on 06 May 2011, 08:39 AM
Hello Miroslav,
I removed all SerializationTag from the SplitContainer in the layout XML as your advice, and it works fine.

Thanks for the answer.
Regards,
Inseok
Tags
Docking
Asked by
Inseok
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Inseok
Top achievements
Rank 1
Share this question
or