private static void ClearTranslateTransformAnimation( TranslateTransform transform ) { if( transform == null ) return; // Force a local value before removing the potential animation clock of this transform to avoid leaving the current animated value after animation is removed transform.X = 0d; transform.ApplyAnimationClock( TranslateTransform.XProperty, null ); }