MinMaxParagraphWidth MinMaxParagraphWidth MinMaxParagraphWidth MinMaxParagraphWidth Struct

定義

指定したテキスト コンテンツをすべて格納できる最小および最大の段落幅を表します。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)
継承
MinMaxParagraphWidthMinMaxParagraphWidthMinMaxParagraphWidthMinMaxParagraphWidth
実装

次の例は、 MinWidthプロパティを使用して、書式設定されたテキスト行の段落の最小幅を生成する方法を示しています。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

プロパティ

MaxWidth MaxWidth MaxWidth MaxWidth

指定したテキスト コンテンツをすべて格納できる最大の段落幅を取得します。Gets the largest paragraph width possible that can fully contain the specified text content.

MinWidth MinWidth MinWidth MinWidth

指定したテキスト コンテンツをすべて格納できる最小の段落幅を取得します。Gets the smallest paragraph width possible that can fully contain the specified text content.

メソッド

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

指定したオブジェクトが、現在の CharacterBufferReference オブジェクトと等しいかどうかを判断します。Determines whether the specified object is equal to the current CharacterBufferReference object.

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

CharacterBufferReference が現在の CharacterBufferReference オブジェクトと等しいかどうかを判断します。Determines whether the CharacterBufferReference is equal to the current CharacterBufferReference object.

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

CharacterBufferReference のハッシュ関数として機能します。Serves as a hash function for CharacterBufferReference. ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。It is suitable for use in hashing algorithms and data structures such as a hash table.

演算子

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

2 つの CharacterBufferReference 文字列を比較して、等しいかどうかを確認します。Compare two CharacterBufferReference strings for equality.

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

2 つの CharacterBufferReference オブジェクトを比較して、等しくないかどうかを確認します。Compare two CharacterBufferReference objects for inequality.

適用対象

こちらもご覧ください