Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
 /// <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);
 }
Esempio n. 3
0
 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,
     });
 }
Esempio n. 4
0
 /// <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);
 }