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
|
Segments saved like this:
Cannot load the segments back to the diagram like this:
and parsing them to the Connection constructor:
does not load any of previous lines. It is not an option to load them from the default serializer provided by Mindscape. It seems like I draw the lines using the pathfinder again. Regards, Michael |
|
|
Hello Michael For connections that you want to specify the segment list, you can set IsUserModified to true. This is a signal for the pathfinders to only re-find a path if absolutely necessary. Jason Fauchelle |
|
|
Hi' Jason The IsUserModified helped, but........ Skipping the first segment, cause the line to be rendered correct with the movable segment as before. However the position of the line is not restored accordingly. Rendering all segments again cause the position of lines to be as before, but no movable segment is rendered. Saving:
Loading:
Regards, Michael |
|
|
Hello Michael That sounds bizarre. Your code looks correct (except for skipping the first segment). I have not been able to reproduce this at my end. Could you please send a repro project, then I'll be able to find the problem for you. Jason Fauchelle |
|
|
Sorry for the late reply, I've been very busy....... Please have a look in the attached repro project, there is a pdf file with a little description included as well. Regards, Michael |
|
|
No worries Michael Thanks for the repro project. The reason why the segments are not movable is because of one small piece of missing logic. In your DoLoadCustom method, while creating the segments, you need to manually set the PreviousSegment property of each segment to reference the previous segment. (I've made a note for the foundation to automatically handle this in a future version). Here is one possible modification of your code that will achieve this:
Your custom loading and saving logic does not seem to currently use the IsUserModified flag that I previously mentioned. If you implement the support for this flag, then your custom load and save implementations will correctly maintain the users segments positions. After you implement this, if the positions are still lost, you'll need to get the latest nightly build of WPF Diagramming as I noticed the version you are using has a bug related to this. Nightly builds can be downloaded from your account page. Let me know if there are further problems. -Jason Fauchelle |
|
|
Hi' Jason Once again, you saved my day........ Thanks :-) The PreviousSegment "thing" did the trick. Regards, Michael |
|