vb System.Windows.Media.TextFormatting.TextFormatter.FormatMinMaxParagraphWidth类(方法)实例源码

下面列出了vb System.Windows.Media.TextFormatting.TextFormatter.FormatMinMaxParagraphWidth 类(方法)源码代码实例,从而了解它的用法。

作者:VB.NET开发    项目:System.Windows.Media.TextFormattin   
Dim minMaxParaWidth As MinMaxParagraphWidth = formatter.FormatMinMaxParagraphWidth(customTextSource, 0, customTextParagraphProperties)

' Format each line of text from the text store and draw it.
Do While textStorePosition < customTextSource.Text.Length
    ' Create a textline from the text store using the TextFormatter object.
    Using myTextLine As TextLine = formatter.FormatLine(customTextSource, textStorePosition, minMaxParaWidth.MinWidth, customTextParagraphProperties, Nothing)
        ' Draw the formatted text into the drawing context.
        myTextLine.Draw(drawingContext, linePosition, InvertAxes.None)

        ' Update the index position in the text store.
        textStorePosition += myTextLine.Length

        ' Update the line position coordinate for the displayed line.
        linePosition.Y += myTextLine.Height
    End Using
Loop


问题


面经


文章

微信
公众号

扫码关注公众号