Smrf.NodeXL.ExcelTemplate.TaskPane.CreateNodeXLControl C# (CSharp) Method

CreateNodeXLControl() protected method

protected CreateNodeXLControl ( ) : void
return void
    CreateNodeXLControl()
    {
        // AssertValid();

        // Control hierarchy:
        //
        // 1. ehElementHost contains a NodeXLWithAxesControl.
        //
        // 2. The NodeXLWithAxesControl contains a NodeXLControl.

        oNodeXLControl = new NodeXLControl();

        m_oNodeXLWithAxesControl = new NodeXLWithAxesControl(oNodeXLControl);

        // Don't show the axes now.  If they are supposed to be shown, the
        // Ribbon, which is responsible for maintaining the visibility of the
        // axes, will send a NoParamCommand.ShowGraphAxes command to the
        // TaskPane later.

        m_oNodeXLWithAxesControl.ShowAxes = false;

        oNodeXLControl.SelectionChanged +=
            new System.EventHandler(this.oNodeXLControl_SelectionChanged);

        oNodeXLControl.VerticesMoved += new VerticesMovedEventHandler(
            this.oNodeXLControl_VerticesMoved);

        oNodeXLControl.GraphMouseUp += new GraphMouseButtonEventHandler(
            this.oNodeXLControl_GraphMouseUp);

        oNodeXLControl.LayingOutGraph += new System.EventHandler(
            this.oNodeXLControl_LayingOutGraph);

        oNodeXLControl.GraphLaidOut += new AsyncCompletedEventHandler(
            this.oNodeXLControl_GraphLaidOut);

        oNodeXLControl.KeyDown += new System.Windows.Input.KeyEventHandler(
            this.oNodeXLControl_KeyDown);

        ehNodeXLControlHost.Child = m_oNodeXLWithAxesControl;
    }
TaskPane