Smrf.NodeXL.ExcelTemplate.LayoutUserSettings.TransferToLayout C# (CSharp) Method

TransferToLayout() public method

public TransferToLayout ( ILayout layout ) : void
layout ILayout
return void
    TransferToLayout
    (
        ILayout layout
    )
    {
        Debug.Assert(layout != null);
        AssertValid();

        layout.Margin = this.Margin;
        layout.LayoutStyle = this.LayoutStyle;
        layout.BoxLayoutAlgorithm = this.BoxLayoutAlgorithm;
        layout.GroupRectanglePenWidth = this.GroupRectanglePenWidth;
        layout.IntergroupEdgeStyle = this.IntergroupEdgeStyle;
        layout.ImproveLayoutOfGroups = this.ImproveLayoutOfGroups;
        layout.MaximumVerticesPerBin = this.MaximumVerticesPerBin;
        layout.BinLength = this.BinLength;

        if (layout is FruchtermanReingoldLayout)
        {
            FruchtermanReingoldLayout oFruchtermanReingoldLayout =
                (FruchtermanReingoldLayout)layout;

            oFruchtermanReingoldLayout.C = this.FruchtermanReingoldC;

            oFruchtermanReingoldLayout.Iterations =
                this.FruchtermanReingoldIterations;
        }
    }

Usage Example

コード例 #1
0
        CreateLayout
        (
            LayoutUserSettings oLayoutUserSettings
        )
        {
            Debug.Assert(oLayoutUserSettings != null);
            AssertValid();

            LayoutManager oLayoutManager = new LayoutManager();

            oLayoutManager.Layout = oLayoutUserSettings.Layout;
            ILayout oLayout = oLayoutManager.CreateLayout();

            oLayoutUserSettings.TransferToLayout(oLayout);

            // Don't use groups or binning, even if the user is using one of those
            // in the NodeXLControl.

            oLayout.LayoutStyle = LayoutStyle.Normal;

            return(oLayout);
        }
All Usage Examples Of Smrf.NodeXL.ExcelTemplate.LayoutUserSettings::TransferToLayout