This question is locked. New answers and comments are not allowed.
I'm loading a saved RadDock layout and finding my Header values to be broken.
I'm hooking into ElementLoading (and ElementLoaded, but the latter just for diagnostics) so that I can create the RadPane for the AffectedElementSerializationTag myself. When I create the RadPane, I set its Content, Header and Title. The Content is another UserControl. The Header is set to a custom object (class name "RegisteredPane"), and the Title is set to the same object. I have a custom HeaderTemplate and TitleTemplate that data bid to the RegisteredPane objects.
After I construct my RadPane in ElementLoading, the Header (and Title) are set properly. When ElementLoaded is invoked, I am handed the RadPane I just constructed and the Header (and Title) are still correct. But by the time it's display, my Header (and Title) are replaced with a string that is the ToString() of my RegisteredPane class.
I suspect that after the ElementLoading/ElementLoaded phase of LoadLayout, RadDock is setting the previously saved Header (and Title) values, which, since they were objects, were serialized to just strings when being saved.
What can I do to interfere/pre-empt/prevent this behavior?
I'm hooking into ElementLoading (and ElementLoaded, but the latter just for diagnostics) so that I can create the RadPane for the AffectedElementSerializationTag myself. When I create the RadPane, I set its Content, Header and Title. The Content is another UserControl. The Header is set to a custom object (class name "RegisteredPane"), and the Title is set to the same object. I have a custom HeaderTemplate and TitleTemplate that data bid to the RegisteredPane objects.
After I construct my RadPane in ElementLoading, the Header (and Title) are set properly. When ElementLoaded is invoked, I am handed the RadPane I just constructed and the Header (and Title) are still correct. But by the time it's display, my Header (and Title) are replaced with a string that is the ToString() of my RegisteredPane class.
I suspect that after the ElementLoading/ElementLoaded phase of LoadLayout, RadDock is setting the previously saved Header (and Title) values, which, since they were objects, were serialized to just strings when being saved.
What can I do to interfere/pre-empt/prevent this behavior?