MinMaxParagraphWidth Struct

Definizione

Rappresenta la maggiore e la minore larghezza possibili del paragrafo che può contenere il testo completo specificato.

C#
public struct MinMaxParagraphWidth : IEquatable<System.Windows.Media.TextFormatting.MinMaxParagraphWidth>
Ereditarietà
MinMaxParagraphWidth
Implementazioni

Esempio

Nell'esempio seguente viene illustrato come utilizzare la MinWidth proprietà per generare la larghezza minima del paragrafo per le righe formattate di testo.

C#
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;
    }
}

Proprietà

MaxWidth

Ottiene la larghezza massima del paragrafo che può includere completamente il contenuto del testo specificato.

MinWidth

Ottiene la larghezza minima del paragrafo che può includere completamente il contenuto del testo specificato.

Metodi

Equals(MinMaxParagraphWidth)

Consente di determinare se l'oggetto CharacterBufferReference è uguale all'oggetto CharacterBufferReference corrente.

Equals(Object)

Determina se l'oggetto specificato è uguale all'oggetto CharacterBufferReference corrente.

GetHashCode()

Usato come funzione hash per CharacterBufferReference. Adatto per l'uso in algoritmi hash e in strutture dei dati, ad esempio una tabella hash.

Operatori

Equality(MinMaxParagraphWidth, MinMaxParagraphWidth)

Confronta due stringhe CharacterBufferReference per verificarne l'uguaglianza.

Inequality(MinMaxParagraphWidth, MinMaxParagraphWidth)

Confrontare due oggetti CharacterBufferReference per stabilirne la disuguaglianza.

Si applica a

Prodotto Versioni
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
Windows Desktop 3.0, 3.1, 5, 6, 7

Vedi anche