|
Cet article a fait l'objet d'une traduction automatique. Déplacez votre pointeur sur les phrases de l'article pour voir la version originale de ce texte. Informations supplémentaires.
|
Traduction
Source
|
IRawElementProviderFragmentRoot.ElementProviderFromPoint, méthode
Espace de noms : System.Windows.Automation.Provider
Assembly : UIAutomationProvider (dans UIAutomationProvider.dll)
Valeur de retour
Type : System.Windows.Automation.Provider.IRawElementProviderFragmentdelegate Rectangle MyDelegate(Rectangle clientRect); /// <summary> /// Gets the child element that is at the specified point. /// </summary> /// <param name="x">Distance from the left of the application window.</param> /// <param name="y">Distance from the top of the application window.</param> /// <returns>The provider for the element at that point.</returns> IRawElementProviderFragment IRawElementProviderFragmentRoot.ElementProviderFromPoint( double x, double y) { // The RectangleToScreen method on the control can't be called directly from // this thread, so use delegation. MyDelegate del = new MyDelegate(this.RectangleToScreen); Rectangle screenRectangle = (Rectangle)this.Invoke(del, new object[] { this.DisplayRectangle }); if (screenRectangle.Contains((int)x, (int)y)) { int index = (int)(((int)(y - screenRectangle.Y)) / itemHeight); if (index < myItems.Count) { return (IRawElementProviderFragment)myItems[index]; } else return (IRawElementProviderFragment)this; } else return null; }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (rôle principal du serveur non pris en charge), Windows Server 2008 R2 (rôle principal du serveur pris en charge avec SP1 ou version ultérieure ; Itanium non pris en charge)
Le .NET Framework ne prend pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.