Hi,
I'm trying to get the ID, SourceNodeID and TargetNodeID from a ConnectorViewModel in the ItemAdded event, but it always arrives in as null.
How do I get a reference to the ConnectorViewModel with all it's underlying data whan a user creates a connection between 2 Nodes ?
(diagram.Info as IGraphInfo).ItemAdded += item_added;
private void item_added(object sender, ItemAddedEventArgs args)
{
if (args.Item is ConnectorViewModel)
{
AddToMessageLog("ConnectorViewModel Added ");
ConnectorViewModel connector = args.Item as ConnectorViewModel;
MessageBox.Show(connector.SourceNodeID.ToString());
}
}
I'm not only trying to learn sfDiagram for WPF, but also trying to learn WPF and C#.NET at the same time as I've come from a Web Developer background, so sorry if the question is a bit simple.
Thanks in advance :)