Share via


MinMaxParagraphWidth.MinWidth 속성

정의

지정된 텍스트 내용 전체를 포함할 수 있는 가능한 최소 단락 너비를 가져옵니다.

public:
 property double MinWidth { double get(); };
public double MinWidth { get; }
member this.MinWidth : double
Public ReadOnly Property MinWidth As Double

속성 값

Double

가능한 최소 단락 너비를 나타내는 Double입니다.

예제

다음 예제에서는 사용 하는 방법의 MinWidth 서식이 지정 된 줄의 텍스트에 대 한 최소 단락 너비를 생성 하는 속성입니다.

MinMaxParagraphWidth minMaxParaWidth =
    formatter.FormatMinMaxParagraphWidth(customTextSource, 0, customTextParagraphProperties);

// Format each line of text from the text store and draw it.
while (textStorePosition < customTextSource.Text.Length)
{
    // Create a textline from the text store using the TextFormatter object.
    using (TextLine myTextLine = formatter.FormatLine(
        customTextSource,
        textStorePosition,
        minMaxParaWidth.MinWidth,
        customTextParagraphProperties,
        null))
    {
        // 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;
    }
}
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

설명

최소 단락 너비 있는 가장 큰 텍스트 내용을 단어에 해당 합니다.

적용 대상