/// <summary> /// Toogles off/on the info pane for the given vertex /// </summary> /// <param name="vertexControl">The vertex control.</param> /// <param name="toggleInfoPaneForNodeCommand">The toggle info pane for node command.</param> private static void Toogle(GraphSharp.Controls.VertexControl vertexControl, ICommand toggleInfoPaneForNodeCommand) { if (toggleInfoPaneForNodeCommand != null) { var node = vertexControl.Vertex as ExperimentNode; if (node != null) { Point suggestedLocation = new Point(); var param = new TraceLab.UI.WPF.Commands.ToggleNodeInfoParameters() { SuggestedLocation = suggestedLocation, Node = node }; if (vertexControl != null) { const int padding = 5; suggestedLocation = new Point(vertexControl.TopLeftX + vertexControl.ActualWidth, vertexControl.TopLeftY + vertexControl.ActualHeight + padding); param.SuggestedLocation = suggestedLocation; } toggleInfoPaneForNodeCommand.Execute(param); } } }