Smrf.NodeXL.Visualization.Wpf.GraphDrawer.UndrawEdge C# (CSharp) Method

UndrawEdge() public method

public UndrawEdge ( IEdge edge, GraphDrawingContext graphDrawingContext ) : void
edge IEdge
graphDrawingContext GraphDrawingContext
return void
    UndrawEdge
    (
        IEdge edge,
        GraphDrawingContext graphDrawingContext
    )
    {
        Debug.Assert(edge != null);
        Debug.Assert(graphDrawingContext != null);
        AssertValid();

        // Retrieve the EdgeDrawingHistory object for the edge, if one exists.
        // (If the edge was previously hidden, there won't be an
        // EdgeDrawingHistory object for it.)

        EdgeDrawingHistory oEdgeDrawingHistory;

        if ( TryGetEdgeDrawingHistory(edge, out oEdgeDrawingHistory) )
        {
            // Remove the EdgeDrawingHistory object from the edge.

            edge.RemoveKey(ReservedMetadataKeys.EdgeDrawingHistory);

            // Remove the edge's DrawingVisual object, which will cause the
            // edge to disappear.

            GetEdgeDrawingVisuals(oEdgeDrawingHistory).Children.Remove(
                oEdgeDrawingHistory.DrawingVisual);
        }
    }