MinMaxParagraphWidth MinMaxParagraphWidth MinMaxParagraphWidth MinMaxParagraphWidth Struct

Definition

Stellt die kleinstmögliche und größtmögliche Absatzbreite dar, die den angegebenen Textinhalt vollständig enthalten kann.Represents the smallest and largest possible paragraph width that can fully contain the specified text content.

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)
Vererbung
MinMaxParagraphWidthMinMaxParagraphWidthMinMaxParagraphWidthMinMaxParagraphWidth
Implementiert

Beispiele

Im folgenden Beispiel wird gezeigt, wie die MinWidth -Eigenschaft verwendet wird, um die minimale Absatz Breite für die formatierten Textzeilen zu generieren.The following example shows how to use the MinWidth property to generate the minimum paragraph width for the formatted lines of text.

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

Eigenschaften

MaxWidth MaxWidth MaxWidth MaxWidth

Ruft die größtmögliche Absatzbreite ab, die den angegebenen Textinhalt vollständig enthalten kann.Gets the largest paragraph width possible that can fully contain the specified text content.

MinWidth MinWidth MinWidth MinWidth

Ruft die kleinstmögliche Absatzbreite ab, die den angegebenen Textinhalt vollständig enthalten kann.Gets the smallest paragraph width possible that can fully contain the specified text content.

Methoden

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Bestimmt, ob das angegebene Objekt und das aktuelle CharacterBufferReference-Objekt gleich sind.Determines whether the specified object is equal to the current CharacterBufferReference object.

Equals(MinMaxParagraphWidth) Equals(MinMaxParagraphWidth) Equals(MinMaxParagraphWidth) Equals(MinMaxParagraphWidth)

Bestimmt, ob die CharacterBufferReference und das aktuelle CharacterBufferReference-Objekt gleich sind.Determines whether the CharacterBufferReference is equal to the current CharacterBufferReference object.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Dient als Hashfunktion für CharacterBufferReference.Serves as a hash function for CharacterBufferReference. Sie ist für die Verwendung in Hashalgorithmen und Datenstrukturen, z. B. in einer Hashtabelle, geeignet.It is suitable for use in hashing algorithms and data structures such as a hash table.

Operatoren

Equality(MinMaxParagraphWidth, MinMaxParagraphWidth) Equality(MinMaxParagraphWidth, MinMaxParagraphWidth) Equality(MinMaxParagraphWidth, MinMaxParagraphWidth) Equality(MinMaxParagraphWidth, MinMaxParagraphWidth)

Überprüft zwei CharacterBufferReference-Zeichenfolgen auf Gleichheit.Compare two CharacterBufferReference strings for equality.

Inequality(MinMaxParagraphWidth, MinMaxParagraphWidth) Inequality(MinMaxParagraphWidth, MinMaxParagraphWidth) Inequality(MinMaxParagraphWidth, MinMaxParagraphWidth) Inequality(MinMaxParagraphWidth, MinMaxParagraphWidth)

Überprüft zwei CharacterBufferReference-Objekte auf Ungleichheit.Compare two CharacterBufferReference objects for inequality.

Gilt für:

Siehe auch