Obtain SelectedItem from Graph

Jun 23, 2011 at 9:34 PM

Is there a way to obtain a SelectedItem from a Graph?  I have a DataTemplate that describes the look of each of the Verticies and I want to show details about a Vertex when it is clicked on.  

Jun 24, 2011 at 4:40 PM

Hey man, I had the same problem, here was my solution:

You have a GraphLayout named graphLayout. 

Itterate through graphLayout.Children and it will contain the VertexControl and EdgeControl's. Attach event handlers to the MouseDown Events of these controls, and voila, you've got something happening when you click the vertex;

Jun 24, 2011 at 4:41 PM

*when you click the vertex or edge