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

UndrawVertex() public method

public UndrawVertex ( IVertex vertex, GraphDrawingContext graphDrawingContext ) : void
vertex IVertex
graphDrawingContext GraphDrawingContext
return void
    UndrawVertex
    (
        IVertex vertex,
        GraphDrawingContext graphDrawingContext
    )
    {
        Debug.Assert(vertex != null);
        Debug.Assert(graphDrawingContext != null);
        AssertValid();

        // Retrieve the VertexDrawingHistory object for the vertex, if one
        // exists.  (If the vertex was previously hidden, there won't be a
        // VertexDrawingHistory object for it.)

        VertexDrawingHistory oVertexDrawingHistory;

        if ( TryGetVertexDrawingHistory(vertex, out oVertexDrawingHistory) )
        {
            // Remove the VertexDrawingHistory object from the vertex.

            vertex.RemoveKey(ReservedMetadataKeys.VertexDrawingHistory);

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

            m_oAllVertexDrawingVisuals.Children.Remove(
                oVertexDrawingHistory.DrawingVisual);
        }
    }