Browse Source

Add comments

pull/6082/head
Wiesław Šoltés 5 years ago
parent
commit
65b115c6e1
  1. 11
      src/Avalonia.Animation/Animation.cs

11
src/Avalonia.Animation/Animation.cs

@ -194,8 +194,14 @@ namespace Avalonia.Animation
[Content]
public KeyFrames Children { get; } = new KeyFrames();
// Store values for the Animator attached properties.
private static readonly Dictionary<object, Type> s_animators = new Dictionary<object, Type>();
/// <summary>
/// Gets the value of the Animator attached property for an object.
/// </summary>
/// <param name="obj">The object.</param>
/// <returns>The property animator type.</returns>
public static Type GetAnimator(object obj)
{
if (s_animators.TryGetValue(obj, out var type))
@ -205,6 +211,11 @@ namespace Avalonia.Animation
return null;
}
/// <summary>
/// Sets the value of the Animator attached property for an object.
/// </summary>
/// <param name="obj">The object.</param>
/// <param name="value">The property animator value.</param>
public static void SetAnimator(object obj, Type value)
{
s_animators[obj] = value;

Loading…
Cancel
Save