22// The .NET Foundation licenses this file to you under the MIT license.
33// See the LICENSE file in the project root for more information.
44
5+ using System ;
56using Windows . Foundation . Collections ;
67using Windows . UI . Xaml ;
78using Windows . UI . Xaml . Hosting ;
@@ -130,7 +131,7 @@ public static void SetAnimations(UIElement element, ImplicitAnimationSet value)
130131 /// <param name="e">The <see cref="DependencyPropertyChangedEventArgs"/> instance for the current event.</param>
131132 private static void OnShowAnimationsPropertyChanged ( DependencyObject d , DependencyPropertyChangedEventArgs e )
132133 {
133- static void OnAnimationsChanged ( IObservableVector < DependencyObject > sender , IVectorChangedEventArgs args )
134+ static void OnAnimationsChanged ( object sender , EventArgs e )
134135 {
135136 var collection = ( ImplicitAnimationSet ) sender ;
136137
@@ -142,15 +143,15 @@ static void OnAnimationsChanged(IObservableVector<DependencyObject> sender, IVec
142143
143144 if ( e . OldValue is ImplicitAnimationSet oldCollection )
144145 {
145- oldCollection . VectorChanged -= OnAnimationsChanged ;
146+ oldCollection . AnimationsChanged -= OnAnimationsChanged ;
146147 }
147148
148149 if ( d is UIElement element &&
149150 e . NewValue is ImplicitAnimationSet collection )
150151 {
151152 collection . ParentReference = new ( element ) ;
152- collection . VectorChanged -= OnAnimationsChanged ;
153- collection . VectorChanged += OnAnimationsChanged ;
153+ collection . AnimationsChanged -= OnAnimationsChanged ;
154+ collection . AnimationsChanged += OnAnimationsChanged ;
154155
155156 ElementCompositionPreview . SetIsTranslationEnabled ( element , true ) ;
156157 ElementCompositionPreview . SetImplicitShowAnimation ( element , collection . GetCompositionAnimationGroup ( ) ) ;
@@ -164,7 +165,7 @@ static void OnAnimationsChanged(IObservableVector<DependencyObject> sender, IVec
164165 /// <param name="e">The <see cref="DependencyPropertyChangedEventArgs"/> instance for the current event.</param>
165166 private static void OnHideAnimationsPropertyChanged ( DependencyObject d , DependencyPropertyChangedEventArgs e )
166167 {
167- static void OnAnimationsChanged ( IObservableVector < DependencyObject > sender , IVectorChangedEventArgs args )
168+ static void OnAnimationsChanged ( object sender , EventArgs e )
168169 {
169170 var collection = ( ImplicitAnimationSet ) sender ;
170171
@@ -176,15 +177,15 @@ static void OnAnimationsChanged(IObservableVector<DependencyObject> sender, IVec
176177
177178 if ( e . OldValue is ImplicitAnimationSet oldCollection )
178179 {
179- oldCollection . VectorChanged -= OnAnimationsChanged ;
180+ oldCollection . AnimationsChanged -= OnAnimationsChanged ;
180181 }
181182
182183 if ( d is UIElement element &&
183184 e . NewValue is ImplicitAnimationSet collection )
184185 {
185186 collection . ParentReference = new ( element ) ;
186- collection . VectorChanged -= OnAnimationsChanged ;
187- collection . VectorChanged += OnAnimationsChanged ;
187+ collection . AnimationsChanged -= OnAnimationsChanged ;
188+ collection . AnimationsChanged += OnAnimationsChanged ;
188189
189190 ElementCompositionPreview . SetIsTranslationEnabled ( element , true ) ;
190191 ElementCompositionPreview . SetImplicitHideAnimation ( element , collection . GetCompositionAnimationGroup ( ) ) ;
@@ -198,7 +199,7 @@ static void OnAnimationsChanged(IObservableVector<DependencyObject> sender, IVec
198199 /// <param name="e">The <see cref="DependencyPropertyChangedEventArgs"/> instance for the current event.</param>
199200 private static void OnAnimationsPropertyChanged ( DependencyObject d , DependencyPropertyChangedEventArgs e )
200201 {
201- static void OnAnimationsChanged ( IObservableVector < DependencyObject > sender , IVectorChangedEventArgs args )
202+ static void OnAnimationsChanged ( object sender , EventArgs e )
202203 {
203204 var collection = ( ImplicitAnimationSet ) sender ;
204205
@@ -210,15 +211,15 @@ static void OnAnimationsChanged(IObservableVector<DependencyObject> sender, IVec
210211
211212 if ( e . OldValue is ImplicitAnimationSet oldCollection )
212213 {
213- oldCollection . VectorChanged -= OnAnimationsChanged ;
214+ oldCollection . AnimationsChanged -= OnAnimationsChanged ;
214215 }
215216
216217 if ( d is UIElement element &&
217218 e . NewValue is ImplicitAnimationSet collection )
218219 {
219220 collection . ParentReference = new ( element ) ;
220- collection . VectorChanged -= OnAnimationsChanged ;
221- collection . VectorChanged += OnAnimationsChanged ;
221+ collection . AnimationsChanged -= OnAnimationsChanged ;
222+ collection . AnimationsChanged += OnAnimationsChanged ;
222223
223224 ElementCompositionPreview . SetIsTranslationEnabled ( element , true ) ;
224225 ElementCompositionPreview . GetElementVisual ( element ) . ImplicitAnimations = collection . GetImplicitAnimationCollection ( ) ;
0 commit comments