GraffitiAnimatorContainer

View Categories

Enumerations #

This class exposes no enumerations.

Constants #

This class exposes no constants.

Events #

This class exposes no events.

Delegates #

Definition
AtKeyframe(currentKeyframe as GraffitiAnimatorKeyframe)
AnimationComplete()
AnimationProgress(animControl as GraffitiAnimatorControl, animOp as GraffitiAnimatorOperation, newValue as Double)

Methods #

NameParametersReturn Type
AddKeyframeName as String
waitTime as Integer = 0
GraffitiAnimatorControlAdds a new keyframe.
AddKeyframenewKeyframe as GraffitiAnimatorKeyframeGraffitiAnimatorControlAdds a new keyframe.
AddKeyframewaitTime as Integer = 0GraffitiAnimatorControlAdds a new keyframe.
AddOperationanimOp as GraffitiAnimatorOperationGraffitiAnimatorControlAdds a new animation operation to the stack.
ConstructorTarget as DesktopContainerGraffitiAnimatorControlInstantiates a new instance of the class.
MovenewLeft as Double
newTop as Double
animationLength as Integer
easing as GraffitiAnimator.Easings
GraffitiAnimatorControlMoves the control to the specified position.
OnCompletefinishFunction as AnimationCompleteGraffitiAnimatorControlInvokes the provided delegate when all animation has completed.
OnKeyframekeyframeFunction as AtKeyframeGraffitiAnimatorControlInvokes the provided delegate when the animation encounters a keyframe.
OnProgresschangeFunction as AnimationProgressGraffitiAnimatorControlInvokes the provided delegate as animation operations progress.
PlayDestroyWhenComplete as Boolean = TrueGraffitiAnimatorControlPlays the provided animation stack, optionally destructs itself when complete.
ResizenewWidth as Double
newHeight as Double
animationLength as Integer
easing as GraffitiAnimator.Easings
GraffitiAnimatorControlResizes the RectControl using the specified values.
ShakenumberOfShakes as Integer = 5
deltaX as Integer = 5
deltaY as Integer = 0
animationLength as Integer = 800
easing as GraffitiAnimator.Easings = GraffitiAnimator.Easings.CubicOut
GraffitiAnimatorControlCauses the RectControl to shake violently along the X-axis.
StopNoneNoneCancels all running animations and immediately applies the requested end values for those operations.

Properties #

NameTypeDefault ValueDescription
StateGraffitiAnimator.StatesIdleThe current running state of the animator.
TargetDesktopContainerNilThe UI element to be animated.

Examples #

Chaining #

This class was developed to make animation chaining simple for enthralling UI animations. Below is an example directly from the demo project that demonstrates how this is done. Me is a PushButton:

'// This is meant to show you how to use animation
'   chaining with a dynamically created object.
'   It makes use of Delegates for callbacks when
'   keyframes are reached or when the animation
'   chain is complete. Play() should always be the
'   the last command.
 
dim animControl as new GraffitiAnimatorControl( me )
 
Call animControl._
AddOperation( new GraffitiAnimatorOperation( "textsize", me.TextSize, me.TextSize * 2, 1000, GraffitiAnimator.Easings.BounceOut ) )._
Move( me.Left, 52, 1000, GraffitiAnimator.Easings.BounceOut )
 
Call animControl._
AddKeyframe( "MidBounce", 1000 )._
AddOperation( new GraffitiAnimatorOperation( "textsize", me.TextSize * 2, me.TextSize, 1000, GraffitiAnimator.Easings.BounceOut ) )._
Move( me.Left, 3, 1000, GraffitiAnimator.Easings.BounceOut )
 
Call animControl._
AddKeyframe( "BeforeResize", 0 )._
Resize( me.Width * 2, me.Height, 1000, GraffitiAnimator.Easings.ElasticOut )._
Move( me.Left - (me.Width / 2), me.Top, 1000, GraffitiAnimator.Easings.ElasticOut )._
Play()
 
Call animControl._
AddKeyframe( "MidResize", 1000 )._
Resize( me.Width, me.Height, 1000, GraffitiAnimator.Easings.ElasticOut )._
Move( me.Left, me.Top, 1000, GraffitiAnimator.Easings.ElasticOut )._
Play()
 
call animControl._
OnProgress( GraffitiAnimatorControl.AnimationProgress( WeakAddressOf bounceProgress ) )._
OnKeyframe( GraffitiAnimatorControl.AtKeyframe( WeakAddressOf bounceKeyframe ) )._
OnComplete( GraffitiAnimatorControl.AnimationComplete( WeakAddressOf bounceFinished ) )._
Play( True )

Notes #

This class currently has no notes.