TextFormatter.FormatLine Yöntem

Tanım

Belge içeriğini biçimlendirmek ve görüntülemek için kullanılan bir TextLine oluşturur.

Aşırı Yüklemeler

FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak)

Belge içeriğini biçimlendirmek ve görüntülemek için kullanılan bir TextLine oluşturur.

FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak, TextRunCache)

Belge içeriğini biçimlendirmek ve görüntülemek için kullanılan bir TextLine oluşturur.

FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak)

Belge içeriğini biçimlendirmek ve görüntülemek için kullanılan bir TextLine oluşturur.

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

Parametreler

textSource
TextSource

TextSource Satırın metin kaynağını temsil eden değer.

firstCharIndex
Int32

Int32 Satırdaki başlangıç karakterinin karakter dizinini belirten bir değer.

paragraphWidth
Double

Satırın Double doldurduğu paragrafın genişliğini belirten değer.

paragraphProperties
TextParagraphProperties

TextParagraphProperties Akış yönü, hizalama veya girintileme gibi paragraf özelliklerini temsil eden bir değer.

previousLineBreak
TextLineBreak

TextLineBreak Metin biçimlendirme işlemi tarafından paragraftaki önceki satırın nerede kırıldığı bakımından metin biçimlendirici durumunu belirten bir değer.

Döndürülenler

TextLine

TextLine Görüntülenebilen bir metin satırını temsil eden değer.

Örnekler

Aşağıdaki örnek, biçimlendirilmiş TextLinebir döndürmek için yönteminin FormatLine nasıl kullanılacağını gösterir.

// 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)

Şunlara uygulanır

FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak, TextRunCache)

Belge içeriğini biçimlendirmek ve görüntülemek için kullanılan bir TextLine oluşturur.

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

Parametreler

textSource
TextSource

TextSource Satırın metin kaynağını temsil eden nesne.

firstCharIndex
Int32

Int32 Satırdaki başlangıç karakterinin karakter dizinini belirten bir değer.

paragraphWidth
Double

Satırın Double doldurduğu paragrafın genişliğini belirten değer.

paragraphProperties
TextParagraphProperties

TextParagraphProperties Akış yönü, hizalama veya girintileme gibi paragraf özelliklerini temsil eden bir nesne.

previousLineBreak
TextLineBreak

TextLineBreak Metin biçimlendirme işlemi tarafından paragraftaki bir önceki satırın nerede kırıldığı bakımından metin biçimlendirici durumunu belirten bir nesne.

textRunCache
TextRunCache

TextRunCache Metnin düzeni için önbelleğe alma mekanizmasını temsil eden nesne.

Döndürülenler

TextLine

TextLine Görüntülenebilen bir metin satırını temsil eden değer.

Açıklamalar

Bu yöntem, önemli performans etkileri olan TextLine uygulamalarda performansı geliştirmek için kullanılır.

Şunlara uygulanır