C# Class ModernWPF.Animation

Quick utility for doing simple ad-hoc animations.
Show file Open project: soukoku/ModernWPF

Public Methods

Method Description
FadeIn ( UIElement element, System.TimeSpan duration, System.Action completedCallback = null ) : void

Animates the element's opacity from 0 to 1.

FadeOut ( UIElement element, System.TimeSpan duration, System.Action completedCallback = null ) : void

Animates the element's opacity to 1.

SlideIn ( UIElement element, SlideFromDirection direction, System.TimeSpan duration ) : void

Slides the element in with translate transform.

SlideIn ( UIElement element, SlideFromDirection direction, System.TimeSpan duration, double startOffset ) : void

Slides the element in with translate transform.

SlideIn ( UIElement element, SlideFromDirection direction, System.TimeSpan duration, double startOffset, IEasingFunction easing, System.Action completedCallback = null ) : void

Slides the element in with translate transform

Private Methods

Method Description
Animation ( ) : System
FindOrCreateRenderXform ( UIElement element ) : TranslateTransform

Method Details

FadeIn() public static method

Animates the element's opacity from 0 to 1.
public static FadeIn ( UIElement element, System.TimeSpan duration, System.Action completedCallback = null ) : void
element UIElement The element.
duration System.TimeSpan The duration.
completedCallback System.Action The completed callback.
return void

FadeOut() public static method

Animates the element's opacity to 1.
public static FadeOut ( UIElement element, System.TimeSpan duration, System.Action completedCallback = null ) : void
element UIElement The element.
duration System.TimeSpan The duration.
completedCallback System.Action The completed callback.
return void

SlideIn() public static method

Slides the element in with translate transform.
public static SlideIn ( UIElement element, SlideFromDirection direction, System.TimeSpan duration ) : void
element UIElement The element.
direction SlideFromDirection The direction.
duration System.TimeSpan The duration.
return void

SlideIn() public static method

Slides the element in with translate transform.
public static SlideIn ( UIElement element, SlideFromDirection direction, System.TimeSpan duration, double startOffset ) : void
element UIElement The element.
direction SlideFromDirection The direction.
duration System.TimeSpan The duration.
startOffset double The start offset.
return void

SlideIn() public static method

Slides the element in with translate transform
public static SlideIn ( UIElement element, SlideFromDirection direction, System.TimeSpan duration, double startOffset, IEasingFunction easing, System.Action completedCallback = null ) : void
element UIElement The element.
direction SlideFromDirection The direction.
duration System.TimeSpan The duration.
startOffset double The start offset.
easing IEasingFunction The easing.
completedCallback System.Action The completed callback.
return void