Labels not appearing on links drawn interactively

Hi Walter,

I want to bind link labels to the link drawn interactively. The labels are unique for each link.
I am setting them in the Linkdrawn event, and the property itself is notifiable, am binding it to a textbox inside the link panel of the link template
Am not seeing any labels. On the otherhand when I re-open a saved diagram, I do see labels set as I add those created links to diagramModel through diagramModel.AddLink(connector);
How can I set these labels as I draw links on the canvas? Should I add them some way to a diagram model for them to reflect on the UI?
Am using a transaction. I did see entity relationship example, there labels are added statically in the Link source. I need a way to set certain properties on the link, like Label, stroke etc when I draw a link. Kindly help.

All LinkDrawn listeners are called within the LinkingTool’s transaction that creates a new Link, so you don’t need to conduct your own transaction for any changes that you make in a LinkDrawn listener.

So I cannot explain why you don’t see the label. You aren’t talking about during the user’s dragging, are you? Just about what is seen after the new link has been successfully created, yes?

Just to be sure, I added a LinkDrawn listener to the Flow Chart sample in GoWpfDemo, defined as:

private void myDiagram_LinkDrawn(object sender, DiagramEventArgs e) {
  var link = e.Part as Link;
  var d = link.Data as MyLinkData;
  d.Text = "NEW!";
}

When I drew a new Link from a diamond-shape “Conditional” Node, it showed a “NEW!” label instead of the default “Yes” text.

Yes, I want to see the label after the new link has been successfully created. I have done exactly what you suggest in myDiagram_LinkDrawn event and my labels don’t update from “Yes” what I have set in ctor of link model , Am afraid something very fundamental is off with the way my link template is binding. I bind the link template to the diagrams LinkTemplate property, I have nothing explicitly added in the LinkSource, I capture links in LinkDrawn event, save them and restore them on the diagram by adding them in the diagramModel. But I don’t do anything to add them in diagramModel while the user is drawing them because I think Goxam takes care of it. Am running out of ideas!!! Help :(

Here is my label xaml

This was a notifying issue at the property , and its taken care. Thank you!