Hello everybody,
I'm trying to serialize the docking layout with some custom data describing my controls hosted by the ActiPro docking site using the Help:
Layout Serialization:
...
One benefit of our XML object hierarchy serialization framework is that you can insert and later retrieve information anywhere within the serialized data. Any time an object is serialized or deserialized, an event fires. You can intercept this event and save/load custom data.
The Serialization topic explains how to do this.
Serialization:
...
The Node property in the event arguments provides the XmlObjectBase that is being serialized, and that represents the serializable data for the object indicated in the Item property. You can set the Tag property of the Node to save any custom data with the serialized data.
For a good example of serializing custom data, see the NavigationBar Layout Save/Load QuickStart.
The Quickstart has the following:It appears that "custom data" can only be string, is that correct?
Thanks,
Andrey.
I'm trying to serialize the docking layout with some custom data describing my controls hosted by the ActiPro docking site using the Help:
Layout Serialization:
...
One benefit of our XML object hierarchy serialization framework is that you can insert and later retrieve information anywhere within the serialized data. Any time an object is serialized or deserialized, an event fires. You can intercept this event and save/load custom data.
The Serialization topic explains how to do this.
Serialization:
...
The Node property in the event arguments provides the XmlObjectBase that is being serialized, and that represents the serializable data for the object indicated in the Item property. You can set the Tag property of the Node to save any custom data with the serialized data.
For a good example of serializing custom data, see the NavigationBar Layout Save/Load QuickStart.
The Quickstart has the following:
private void OnObjectSerialized(object sender, ItemSerializationEventArgs e)
{
// Store some custom data in the layout... this is called every time an object is serialized
if (e.Node is XmlNavigationBarLayout)
e.Node.Tag = "Custom data in root layout element, injected in this sample's code-behind";
else if (e.Item == mailPane)
e.Node.Tag = "Custom data for Mail pane only";
}
Thanks,
Andrey.