MinMaxParagraphWidth 구조체

정의

지정된 텍스트 내용 전체를 포함할 수 있는 최소 및 최대 단락 너비를 나타냅니다.

public value class MinMaxParagraphWidth : IEquatable<System::Windows::Media::TextFormatting::MinMaxParagraphWidth>
public struct MinMaxParagraphWidth : IEquatable<System.Windows.Media.TextFormatting.MinMaxParagraphWidth>
type MinMaxParagraphWidth = struct
Public Structure MinMaxParagraphWidth
Implements IEquatable(Of MinMaxParagraphWidth)
상속
MinMaxParagraphWidth
구현

예제

다음 예제에서는 사용 하는 방법의 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

속성

MaxWidth

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

MinWidth

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

메서드

Equals(MinMaxParagraphWidth)

CharacterBufferReference가 현재 CharacterBufferReference 개체와 같은지 여부를 확인합니다.

Equals(Object)

지정한 개체와 현재 CharacterBufferReference 개체가 같은지 여부를 확인합니다.

GetHashCode()

CharacterBufferReference에 대한 해시 함수 역할을 합니다. 해시 알고리즘 및 해시 테이블과 같은 데이터 구조에서 사용하기에 적합합니다.

연산자

Equality(MinMaxParagraphWidth, MinMaxParagraphWidth)

CharacterBufferReference 문자열이 같은지 비교합니다.

Inequality(MinMaxParagraphWidth, MinMaxParagraphWidth)

CharacterBufferReference 개체가 다른지 비교합니다.

적용 대상

추가 정보