Smrf.NodeXL.Visualization.Wpf.VertexDrawer.CreateFormattedTextWithWrap C# (CSharp) Method

CreateFormattedTextWithWrap() protected method

protected CreateFormattedTextWithWrap ( String sText, Color oColor, Double dFontSize ) : System.Windows.Media.FormattedText
sText String
oColor Color
dFontSize Double
return System.Windows.Media.FormattedText
    CreateFormattedTextWithWrap
    (
        String sText,
        Color oColor,
        Double dFontSize
    )
    {
        Debug.Assert(sText != null);
        Debug.Assert(dFontSize >= 0);

        FormattedText oFormattedText =
            m_oFormattedTextManager.CreateFormattedText(sText, oColor,
                dFontSize, m_dGraphScale);

        if (this.m_bLabelWrapText)
        {
            oFormattedText.MaxTextWidth =
                m_dLabelWrapMaxTextWidth * m_dGraphScale;

            oFormattedText.MaxTextHeight = MaximumLabelHeight * m_dGraphScale;
        }
        else
        {
            oFormattedText.MaxLineCount = 1;

            // (Leave the MaxTextWidth property set to the default value of 0.)
        }

        return (oFormattedText);
    }