TextBlock.GetPositionFromPoint(Point, Boolean) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Retourne une TextPointer position la plus proche d’un spécifié Point.
public:
System::Windows::Documents::TextPointer ^ GetPositionFromPoint(System::Windows::Point point, bool snapToText);
public System.Windows.Documents.TextPointer GetPositionFromPoint(System.Windows.Point point, bool snapToText);
member this.GetPositionFromPoint : System.Windows.Point * bool -> System.Windows.Documents.TextPointer
Public Function GetPositionFromPoint (point As Point, snapToText As Boolean) As TextPointer
Paramètres
- point
- Point
Dans Point l’espace de coordonnées pour TextBlock lequel retourner un TextPointer.
- snapToText
- Boolean
true pour renvoyer un TextPointer point d’insertion le plus pointproche , qu’il soit ou non point à l’intérieur d’un cadre englobant d’un caractère ; false pour retourner null s’il point n’est pas à l’intérieur d’un cadre englobant d’un caractère.
Retours
Vers TextPointer le point spécifié, ou null si snapToText c’est false le cas et si le point spécifié ne se trouve pas dans une zone englobante de caractères dans la zone de TextBlock contenu.
Exceptions
Les informations de disposition actuelles et valides pour le contrôle ne sont pas disponibles.
Remarques
Cette méthode retourne toujours une valeur valide TextPointer lorsqu’elle snapToText est true.