TextFormatter.FormatLine メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ドキュメント コンテンツの書式設定と表示に使用する TextLine を作成します。
オーバーロード
| 名前 | 説明 |
|---|---|
| FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak) |
ドキュメント コンテンツの書式設定と表示に使用する TextLine を作成します。 |
| FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak, TextRunCache) |
ドキュメント コンテンツの書式設定と表示に使用する TextLine を作成します。 |
FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak)
ドキュメント コンテンツの書式設定と表示に使用する TextLine を作成します。
public:
abstract System::Windows::Media::TextFormatting::TextLine ^ FormatLine(System::Windows::Media::TextFormatting::TextSource ^ textSource, int firstCharIndex, double paragraphWidth, System::Windows::Media::TextFormatting::TextParagraphProperties ^ paragraphProperties, System::Windows::Media::TextFormatting::TextLineBreak ^ previousLineBreak);
public abstract System.Windows.Media.TextFormatting.TextLine FormatLine(System.Windows.Media.TextFormatting.TextSource textSource, int firstCharIndex, double paragraphWidth, System.Windows.Media.TextFormatting.TextParagraphProperties paragraphProperties, System.Windows.Media.TextFormatting.TextLineBreak previousLineBreak);
abstract member FormatLine : System.Windows.Media.TextFormatting.TextSource * int * double * System.Windows.Media.TextFormatting.TextParagraphProperties * System.Windows.Media.TextFormatting.TextLineBreak -> System.Windows.Media.TextFormatting.TextLine
Public MustOverride Function FormatLine (textSource As TextSource, firstCharIndex As Integer, paragraphWidth As Double, paragraphProperties As TextParagraphProperties, previousLineBreak As TextLineBreak) As TextLine
パラメーター
- textSource
- TextSource
行のテキスト ソースを表す TextSource 値。
- paragraphProperties
- TextParagraphProperties
フローの方向、配置、インデントなど、段落のプロパティを表す TextParagraphProperties 値。
- previousLineBreak
- TextLineBreak
テキストフォーマッタの状態を指定する TextLineBreak 値。段落内の前の行がテキスト書式設定プロセスによって分割された場所を示します。
返品
表示できるテキスト行を表す TextLine 値。
例
次の例は、 FormatLine メソッドを使用して書式設定された TextLineを返す方法を示しています。
// Create a textline from the text store using the TextFormatter object.
TextLine myTextLine = formatter.FormatLine(
customTextSource,
0,
400,
customTextParagraphProperties,
null);
// Draw the formatted text into the drawing context.
myTextLine.Draw(drawingContext, new Point(0, 0), InvertAxes.None);
' Create a textline from the text store using the TextFormatter object.
Dim myTextLine As TextLine = formatter.FormatLine(customTextSource, 0, 400, customTextParagraphProperties, Nothing)
' Draw the formatted text into the drawing context.
myTextLine.Draw(drawingContext, New Point(0, 0), InvertAxes.None)
適用対象
FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak, TextRunCache)
ドキュメント コンテンツの書式設定と表示に使用する TextLine を作成します。
public:
abstract System::Windows::Media::TextFormatting::TextLine ^ FormatLine(System::Windows::Media::TextFormatting::TextSource ^ textSource, int firstCharIndex, double paragraphWidth, System::Windows::Media::TextFormatting::TextParagraphProperties ^ paragraphProperties, System::Windows::Media::TextFormatting::TextLineBreak ^ previousLineBreak, System::Windows::Media::TextFormatting::TextRunCache ^ textRunCache);
public abstract System.Windows.Media.TextFormatting.TextLine FormatLine(System.Windows.Media.TextFormatting.TextSource textSource, int firstCharIndex, double paragraphWidth, System.Windows.Media.TextFormatting.TextParagraphProperties paragraphProperties, System.Windows.Media.TextFormatting.TextLineBreak previousLineBreak, System.Windows.Media.TextFormatting.TextRunCache textRunCache);
abstract member FormatLine : System.Windows.Media.TextFormatting.TextSource * int * double * System.Windows.Media.TextFormatting.TextParagraphProperties * System.Windows.Media.TextFormatting.TextLineBreak * System.Windows.Media.TextFormatting.TextRunCache -> System.Windows.Media.TextFormatting.TextLine
Public MustOverride Function FormatLine (textSource As TextSource, firstCharIndex As Integer, paragraphWidth As Double, paragraphProperties As TextParagraphProperties, previousLineBreak As TextLineBreak, textRunCache As TextRunCache) As TextLine
パラメーター
- textSource
- TextSource
行のテキスト ソースを表す TextSource オブジェクト。
- paragraphProperties
- TextParagraphProperties
フロー方向、配置、インデントなどの段落プロパティを表す TextParagraphProperties オブジェクト。
- previousLineBreak
- TextLineBreak
テキストフォーマッタの状態を指定する TextLineBreak オブジェクト。段落内の前の行がテキスト書式設定プロセスによって分割された場所に関して指定されます。
- textRunCache
- TextRunCache
テキストのレイアウトのキャッシュ メカニズムを表す TextRunCache オブジェクト。
返品
表示できるテキスト行を表す TextLine 値。
注釈
この方法は、 TextLine がパフォーマンスに大きな影響を与えるアプリケーションのパフォーマンスを向上させるために使用されます。