TextSource.GetPrecedingText(Int32) Méthode

Définition

Récupère l’étendue de texte immédiatement avant la position spécifiée TextSource .

public:
 abstract System::Windows::Media::TextFormatting::TextSpan<System::Windows::Media::TextFormatting::CultureSpecificCharacterBufferRange ^> ^ GetPrecedingText(int textSourceCharacterIndexLimit);
public abstract System.Windows.Media.TextFormatting.TextSpan<System.Windows.Media.TextFormatting.CultureSpecificCharacterBufferRange> GetPrecedingText(int textSourceCharacterIndexLimit);
abstract member GetPrecedingText : int -> System.Windows.Media.TextFormatting.TextSpan<System.Windows.Media.TextFormatting.CultureSpecificCharacterBufferRange>
Public MustOverride Function GetPrecedingText (textSourceCharacterIndexLimit As Integer) As TextSpan(Of CultureSpecificCharacterBufferRange)

Paramètres

textSourceCharacterIndexLimit
Int32

Position de l’index de caractères où la récupération de texte s’arrête.

Retours

Valeur CultureSpecificCharacterBufferRange qui représente l’étendue de texte immédiatement avant textSourceCharacterIndexLimit.

Remarques

La GetPrecedingText méthode retourne une valeur vide CultureSpecificCharacterBufferRange si l’étendue de texte immédiatement avant textSourceCharacterIndexLimit ne contient aucun texte, tel qu’un objet inline ou une exécution masquée.

Cette méthode retourne une étendue de texte de longueur nulle s’il n’y a pas de valeurs précédentes textSourceCharacterIndexLimit.

S’applique à