AutomationElementCollection.Item[Int32] Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Belirtilen dizinde değerini AutomationElement alır.
public:
property System::Windows::Automation::AutomationElement ^ default[int] { System::Windows::Automation::AutomationElement ^ get(int index); };
public System.Windows.Automation.AutomationElement this[int index] { get; }
member this.Item(int) : System.Windows.Automation.AutomationElement
Default Public ReadOnly Property Item(index As Integer) As AutomationElement
Parametreler
- index
- Int32
Koleksiyondaki öğesinin sıfır tabanlı dizini.
Özellik Değeri
AutomationElement Belirtilen dizinde.
Özel durumlar
için index
negatif bir tamsayı belirtildi veya index
değerinden büyük veya buna Counteşit.
Örnekler
Aşağıdaki örnekte, ilk öğe bir AutomationElementCollectionöğesinden alınır.
// desktopChildren is a collection of AutomationElement objects.
AutomationElement firstWindow;
try
{
firstWindow = desktopChildren[0];
}
catch (IndexOutOfRangeException)
{
Console.WriteLine("No AutomationElement at that index.");
}
' desktopChildren is a collection of AutomationElement objects.
Dim firstWindow As AutomationElement
Try
firstWindow = desktopChildren(0)
Catch ex As IndexOutOfRangeException
Console.WriteLine("No AutomationElement at that index.")
End Try