Edge OnClick events?

Sep 21, 2009 at 10:34 AM

Hey guys,

I'd like to be able to double click/right click on an edge and fire off events (e.g. display a dialog) - does anyone have any experience of doing this in graphsharp and, if so, does anyone have any code samples?

Thanks!

Martin BG

Developer
Oct 6, 2009 at 1:02 AM

I don't have a code sample for you, but the easiest thing to do would be to make a style that applies to the EdgeControl class that attaches your event (implemented in your view).  This could fire a command on your view model for the edge.  Alternatively, you could write an attached behavior that turns clicks / right-clicks / double-clicks into various different commands that it looks for via bindings on your edge view model.