/// <summary> /// Obtiene una animación que utiliza una ruta /// </summary> private DoubleAnimationUsingPath CreateDoubleAnimationUsingPath(UIElement control, ActionBaseModel action, PathGeometry pathGeometry, PathAnimationSource source, PropertyPath propertyPath) { DoubleAnimationUsingPath animation = new DoubleAnimationUsingPath(); // Asigna las propiedades de la animación animation.PathGeometry = pathGeometry; animation.Source = source; // Añade la animación al storyboard AddAnimationToStoryBoard(control, animation, action, propertyPath); // Devuelve la animación return(animation); }
/// <summary> /// Determines if the enumerated value is defined (valid) for the given enumerated type /// </summary> /// <param name="value"> /// The variable whose validity is verified. /// </param> /// <returns> /// True if valid, false otherwise. /// </returns> static internal bool IsValidPathAnimationSource(PathAnimationSource value) { return(0 <= value && (byte)value <= _maxPathAnimationSource); }
private DoubleAnimationUsingPath GetDoubleAnimationUsingPath(string path, double beginTime, double duration, PathAnimationSource source) { return(new DoubleAnimationUsingPath() { BeginTime = TimeSpan.FromSeconds(beginTime), PathGeometry = Geometry.Parse(path).GetFlattenedPathGeometry(), Duration = TimeSpan.FromSeconds(duration), Source = source, }); }
/// <summary> /// Determines if the enumerated value is defined (valid) for the given enumerated type /// </summary> /// <param name="value"> /// The variable whose validity is verified. /// </param> /// <returns> /// True if valid, false otherwise. /// </returns> static internal bool IsValidPathAnimationSource(PathAnimationSource value) { return (0 <= value && (byte)value <= _maxPathAnimationSource); }