I use diagram each Tab Item.
And I tried save & load diagram.
it worked. but, connection's Source/Target is null when I change the tab.
then I checked DeserializeLink in GraphSource.
'base.DeserializeLink(connection, info)' is not return Source/Target.
Help me,,,
in GraphSource.
public override void SerializeLink(Link link, SerializationInfo info){
this.ClearCache();
base.SerializeLink(link, info);
}
public override Link DeserializeLink(IConnection connection, SerializationInfo info)
{
return base.DeserializeLink(connection, info);
}
I made some sample.
In sample, seems like linked. but, Source/Target's Content is null in GraphSource Link.
Thank you for the project. I've tested it with the latest version of Telerik UI for WPF, but I wasn't able to reproduce the issue. On my side, the Source and Target properties of the connection are not null in the DeserializeLink() method. Here are the steps that I follow:
Please let me know if I am missing anything.
I also attached the test project that I've used.
It looks like it's connected, but Source/Target is null in Graphsource links property using tab_SelectionChanged Event on behind-code.
I Checked another Method in GraphSource. When I check the param of the method, Source/Target is null.
This is Method that I added in GraphSource.
public override void AddLink(Link link)
{
base.AddLink(link);
}
this steps are correct.
Next, Set break point on tab_SelectionChanged in behind-code.
and graphsource's link info is somethig worng in diagram that loaded file.
sorry, I didn't explain well.
your image is correct Source and Target's Data is null.
if Diagram's datacontext is changed and return, that info cause error.
So, I want keep Source and Target's Info when Loaded.
In your image, link's info is different.
I think link's info is same in diagram1 and diagram2.
In my project, I use diagram in tab to usercontrol.
so tab's selecteditem is changed to viewmodel.
if link's info in graphsource is different that diagram's link is different.
I am afraid that without recreating this I cannot tell what exactly happens. If you can modify my project (from one of the previous replies here) to produce the same issue I will take a look.
I found my mistake when recreating example.
Thanks a lot.