SizeKeyFrameCollection.IndexOf(SizeKeyFrame) Méthode
Définition
Recherche l’élément SizeKeyFrame spécifié et retourne l’index de base zéro de la première occurrence dans l’ensemble de la collection.Searches for the specified SizeKeyFrame and returns the zero-based index of the first occurrence within the entire collection.
public:
int IndexOf(System::Windows::Media::Animation::SizeKeyFrame ^ keyFrame);
public int IndexOf (System.Windows.Media.Animation.SizeKeyFrame keyFrame);
member this.IndexOf : System.Windows.Media.Animation.SizeKeyFrame -> int
Public Function IndexOf (keyFrame As SizeKeyFrame) As Integer
Paramètres
- keyFrame
- SizeKeyFrame
SizeKeyFrame à rechercher dans la collection.The SizeKeyFrame to locate in the collection.
Retours
Index de base zéro de la première occurrence de keyFrame
au sein de toute la collection, s’il est trouvé ; sinon, -1
.The zero-based index of the first occurrence of keyFrame
within the entire collection, if found; otherwise, -1
.
Remarques
La recherche est effectuée vers l’avant, en commençant par la première image clé et en terminant à la dernière image clé.The collection is searched forward starting at the first key frame and ending at the last key frame.
Cette méthode effectue une recherche linéaire ; par conséquent, la durée d’exécution moyenne est proportionnelle à Count .This method performs a linear search; therefore, the average execution time is proportional to Count. Autrement dit, cette méthode est une opération O (n), où n est Count .That is, this method is an O(n) operation, where n is Count.
Cette méthode détermine l’égalité en appelant Object.Equals .This method determines equality by calling Object.Equals.