/// <summary> /// Gets the value of the Animator attached property for a setter. /// </summary> /// <param name="setter">The animation setter.</param> /// <returns>The property animator type.</returns> public static Type GetAnimator(IAnimationSetter setter) { if (s_animators.TryGetValue(setter, out var type)) { return(type); } return(null); }
protected override void OnApplyTemplate(TemplateAppliedEventArgs e) { base.OnApplyTemplate(e); _circle = e.NameScope.Find <Ellipse>("Circle"); var style = _circle.Styles[0] as Style; _ripple = style.Animations[0] as Animation; _toWidth = _ripple.Children[2].Setters[1]; _fromMargin = _ripple.Children[0].Setters[0]; _toMargin = _ripple.Children[2].Setters[0]; style.Animations.Remove(_ripple); }
/// <summary> /// Sets the value of the Animator attached property for a setter. /// </summary> /// <param name="setter">The animation setter.</param> /// <param name="value">The property animator value.</param> public static void SetAnimator(IAnimationSetter setter, Type value) { s_animators[setter] = value; }