From 76d8bcff56a3e06bd3f74c433ea6da930208462e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20=C5=A0olt=C3=A9s?= Date: Thu, 17 Jun 2021 07:08:56 +0200 Subject: [PATCH] Use IAnimationSetter instead of object to attached property --- src/Avalonia.Animation/Animation.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Avalonia.Animation/Animation.cs b/src/Avalonia.Animation/Animation.cs index 8571d49b42..b315b65154 100644 --- a/src/Avalonia.Animation/Animation.cs +++ b/src/Avalonia.Animation/Animation.cs @@ -194,17 +194,17 @@ namespace Avalonia.Animation [Content] public KeyFrames Children { get; } = new KeyFrames(); - // Store values for the Animator attached properties. - private static readonly Dictionary s_animators = new Dictionary(); + // Store values for the Animator attached properties for IAnimationSetter objects. + private static readonly Dictionary s_animators = new Dictionary(); /// - /// Gets the value of the Animator attached property for an object. + /// Gets the value of the Animator attached property for a setter. /// - /// The object. + /// The animation setter. /// The property animator type. - public static Type GetAnimator(object obj) + public static Type GetAnimator(IAnimationSetter setter) { - if (s_animators.TryGetValue(obj, out var type)) + if (s_animators.TryGetValue(setter, out var type)) { return type; } @@ -212,11 +212,11 @@ namespace Avalonia.Animation } /// - /// Sets the value of the Animator attached property for an object. + /// Sets the value of the Animator attached property for a setter. /// - /// The object. + /// The animation setter. /// The property animator value. - public static void SetAnimator(object obj, Type value) + public static void SetAnimator(IAnimationSetter setter, Type value) { s_animators[obj] = value; }