Smrf.NodeXL.Visualization.Wpf.CollapsedGroupDrawingManager.SetCollapsedDConnectorMotifEdgeWidth C# (CSharp) Method

SetCollapsedDConnectorMotifEdgeWidth() protected method

protected SetCollapsedDConnectorMotifEdgeWidth ( IEdge oEdge, Double dWidth ) : void
oEdge IEdge
dWidth Double
return void
    SetCollapsedDConnectorMotifEdgeWidth
    (
        IEdge oEdge,
        Double dWidth
    )
    {
        Debug.Assert(oEdge != null);
        AssertValid();

        // If the edge already has a width, save it.  This will be restored by
        // RestoreExternalEdge().

        Object oPerEdgeWidthAsObject;

        if ( oEdge.TryGetValue(ReservedMetadataKeys.PerEdgeWidth,
            typeof(Single), out oPerEdgeWidthAsObject) )
        {
            oEdge.SetValue(ReservedMetadataKeys.PreCollapsePerEdgeWidth,
                oPerEdgeWidthAsObject);
        }

        // Set the new width.

        oEdge.SetValue(ReservedMetadataKeys.PerEdgeWidth, (Single)dWidth);
    }