build 2016 - p486 - using expression animations to create engaging and custom ui

9
#Build2016 Using Expression Animations to Create Engaging & Custom UI Anthony Young & Lindsay Kubasik Developer & Program Manager Windows UI Platform

Upload: windows-developer

Post on 13-Jan-2017

271 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Build 2016 - P486 - Using Expression Animations to Create Engaging and Custom UI

#Build2016

Using Expression Animations to Create Engaging & Custom UIAnthony Young & Lindsay KubasikDeveloper & Program ManagerWindows UI Platform

Page 2: Build 2016 - P486 - Using Expression Animations to Create Engaging and Custom UI

Demo

Expression Animations in UI

Page 3: Build 2016 - P486 - Using Expression Animations to Create Engaging and Custom UI

Platform BasicsKey Frame AnimationsExpression Animations

Page 4: Build 2016 - P486 - Using Expression Animations to Create Engaging and Custom UI

Demo

Hello World ExampleGears Expression

Page 5: Build 2016 - P486 - Using Expression Animations to Create Engaging and Custom UI

+ - * / % ?Operators

Keywords

Functions

ConstructorsAbs(), Min(), Clamp(), Lerp(), Ln(), ToRadians(), and more...

Vector2(), Vector3(), Matrix4x4(), Quaternion(), and more...

this.StartingValue this.Target

Page 6: Build 2016 - P486 - Using Expression Animations to Create Engaging and Custom UI

Demo

A Few More Samples

Page 7: Build 2016 - P486 - Using Expression Animations to Create Engaging and Custom UI

Property Sets//App will update this property when needed_propSet.InsertScalar(“hour”, GetHourOfDay());

ExpressionAnimation colorExpression = _compositor.CreateExpressionAnimation();

colorExpression.Expression = “(props.hour >= 6) && (props.hour <= 18) ? color1 : color2";

colorExpression.SetReferenceParameter(“props", _propSet);colorExpression.SetColorParameter(“color1", Colors.LightBlue);colorExpression.SetColorParameter(“color2", Colors.DarkBlue);

_visualA.Brush.StartAnimation(“Color", colorExpression);

Page 8: Build 2016 - P486 - Using Expression Animations to Create Engaging and Custom UI

Demo

Expression Keyframe in GearsPerformance Tips: Templates & Property Sets

Page 9: Build 2016 - P486 - Using Expression Animations to Create Engaging and Custom UI

• Check out sample code & ask questions via GitHub (https://github.com/Microsoft/composition/)

• Follow us on twitter @WinComposition• Re-visit Build on Channel 9• Continue your education at

Microsoft Virtual Academy online

Call to Action