This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, Could you please point me in the right direction in regards to serialising custom nodes that are built on top of the FlowDiagramNode (or ProcessNode). Specifically, Im interested in whether the xml produced by serialisation is capable of storing the connection points (i.e. data and location) that were added to a node before it has been serialised. Thank you for your time, Kyryll
|
|
|
Ooops! SOrry I was in a hurry and didnt see the example :-) I have already implemented my serialisation! Sorry for confusion:-) Kyryll |
|
|
Hiya, Still have a little question for you :) I have implemented both the serialiser for the custom node and the serialiser for custom data type on the activity node. It seems to me that the order in which deserialisation happens is: 1. Custom data type 2. Custom node type My problem is that by the time I get to deserialising the custom node type I dont have access (through the e As Mindscape.WpfDiagramming.FlowDiagrams.UnknownNodeDeserializedEventArgs) to the custom data object I just desrialised and so I cannot assign it to the data property on my custom node. :( I think one solution for me is to do the whole deserialising of the node together with desirialising the data, but its somewhat messy because we use a mix of custom nodes and the nodes provided in the Mindscape.WpfDiagramming.FlowDiagrams namespace and all of these need data serialisation but not all need custom node serialisation. In other words, I can find ways around this, but think the neatest solution would be to be able to access the "just deserialized" data object through the EventArgs What do you think? (Hope this make sense:)) Kyryll |
|
|
If anyone is doing something simillar to what I have described above - the solution Ive come up with is to add a property to the custom serialiser to hold the reference to the last deserialised object. Then in the deserialisation of the custom node, cast the sender into the FlowDiagramXmlSerialiser and then further cast the NodeContentSerialiser into your custom serialiser and you will get access to the property I mentioned in the first paragraph. Hope this helps someone :-) Im happy to provide code samples :-) Cheers, Kyryll |
|
|
Hi Kyryll, Thanks for the update on this. Just to let you know, we will be looking at whether we can provide more support for this, but since it's not urgent/showstopping we wanted to wait until the developer who best knows that code got back from holiday (next week). We'll keep you informed. |
|
|
Thanks Ivan :-) After cleaning up/revising my code from last night I came to the conclusion that there is nothing wrong with performing this serialisation the way that I did it. It was more a matter of exploring and understanding of what goes on under the hood of the FlowDiagramXmlSerialiser and hopefully now anyone interested in using custom serialisers for nodes + data can refer to this thread ;-) Thanks again, Kyryll |
|