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,
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,