Exemplo n.º 1
0
        TransferToGraphDrawer
        (
            GraphDrawer graphDrawer
        )
        {
            Debug.Assert(graphDrawer != null);
            AssertValid();

            Font oFont = this.Font;

            System.Windows.Media.Typeface oTypeface =
                WpfGraphicsUtil.FontToTypeface(oFont);

            Double dFontSize = WpfGraphicsUtil.WindowsFormsFontSizeToWpfFontSize(
                oFont.Size);

            VertexDrawer oVertexDrawer = graphDrawer.VertexDrawer;

            oVertexDrawer.SetFont(oTypeface, dFontSize);

            oVertexDrawer.LabelFillColor =
                WpfGraphicsUtil.ColorToWpfColor(this.VertexLabelFillColor);

            oVertexDrawer.LabelPosition      = this.VertexLabelPosition;
            oVertexDrawer.MaximumLabelLength = this.VertexLabelMaximumLength;

            EdgeDrawer oEdgeDrawer = graphDrawer.EdgeDrawer;

            oEdgeDrawer.SetFont(oTypeface, dFontSize);
            oEdgeDrawer.MaximumLabelLength = this.EdgeLabelMaximumLength;
        }
Exemplo n.º 2
0
        TransferToNodeXLWithAxesControl
        (
            NodeXLWithAxesControl nodeXLWithAxesControl
        )
        {
            Debug.Assert(nodeXLWithAxesControl != null);
            AssertValid();

            Font oAxisFont = this.AxisFont;

            nodeXLWithAxesControl.SetFont(
                WpfGraphicsUtil.FontToTypeface(oAxisFont),

                WpfGraphicsUtil.WindowsFormsFontSizeToWpfFontSize(
                    oAxisFont.Size));

            TransferToNodeXLControl(nodeXLWithAxesControl.NodeXLControl);
        }