This project is read-only.

Shortcuts

Property Shortcuts

AutoAlphaCollapsedTo

Ease opacity of an object and set Visibility to Collapsed if 0 or Visible if greater than 0

    element.AutoAlphaCollapsedTo(0, time, ease, delay);
If you just want Opacity

    element.AlphaTo(0, time, ease, delay);

SlideTo

Ease an object's Canvas.Left and Canvas.Right. You can target X/Y individually with XTo and YTo.

    element.SlideTo(pt.X, pt.Y, time, ease, delay);

DimensionTo

Ease an object's Width and Height properties. You can target Width and Height individually with HeightTo and WidthTo.

    double width = (new Random().NextDouble()*100) + 100;
    double height = (new Random().NextDouble()*100) + 100; 

    element.DimensionsTo(width, height, time, ease, delay);

Transform Shortcuts


Make sure before you target an objects transform group with shortcuts that the transforms actually exist. In order to run these shortcuts you must standardize the order of the transforms on the object and make sure that they exist. Optionally you can set the RenderTransformOrigin at the same time.

    element.NormalizeTransformGroup();
    element.RenderTransformOrigin = new Point(.5, .5);

OffsetTo

Ease an object's TranslateTransform

    element.SlideTo(pt.X, pt.Y, time, ease, delay);

RotateTo

Ease an object's RotateTransform

    double rotation = new Random().NextDouble()*360; 

    element.RotateTo(rotation, time, ease, delay);

ScaleTo

Ease an object's ScaleTransform

    double xScale = new Random().NextDouble() + .5;
    double yScale = new Random().NextDouble() + .5; 

    element.ScaleTo(xScale, yScale, time, ease, delay);

SkewTo

Ease an object's SkewTransform

    double xSkew = new Random().NextDouble() + 50;
    double ySkew = new Random().NextDouble() + 50; 

    element.SkewTo(xSkew, ySkew, time, ease, delay);

Last edited Mar 2, 2010 at 8:46 PM by jgraup, version 1

Comments

FiscusMedia Mar 4, 2011 at 10:50 PM 
NOTE: This documentation has a bug: OffsetTo lists element.SlideTo. So animating a Canvas.Top or Canvas.Left = SlideTo. Animating Translate.X or Translate.Y = OffsetTo