This question is locked. New answers and comments are not allowed.
I am animating my text right now, in this manner.
I want to do couple of things :
1) play animation repeatedly until user action --> this didnt work when I called the animate(), one after another.
2) animate different text strings one after another. - when I tried to animate 3 textblocks one after another, they all played at same time. Also, with sleep 500 secs between them, they still started same time.
Is there any sample code you can provide here ?
In XAML:
<Grid.Resources>
<telerikCore:RadScaleAnimation x:Key="radScaleAnimation" Duration="0:0:2" AutoReverse="True"/>
</Grid.Resources>
<TextBlock Name="target1" Text="Congratulations !" Margin="10" TextWrapping="Wrap"
HorizontalAlignment="Center"
FontSize="{StaticResource PhoneFontSizeMedium}" Foreground="Red" />
In CS file :
void animate()
{ scaleAnimation = this.LayoutRoot.Resources["radScaleAnimation"] as RadScaleAnimation;
scaleAnimation.StartScaleX = 0.5;
scaleAnimation.EndScaleX = 4;
scaleAnimation.StartScaleY = 0.5;
scaleAnimation.EndScaleY = 4;
EasingFunctionBase ease = new QuadraticEase();
ease.EasingMode = EasingMode.EaseInOut;
scaleAnimation.Easing = ease;
RadAnimationManager.Play(this.target1, scaleAnimation);
I want to do couple of things :
1) play animation repeatedly until user action --> this didnt work when I called the animate(), one after another.
2) animate different text strings one after another. - when I tried to animate 3 textblocks one after another, they all played at same time. Also, with sleep 500 secs between them, they still started same time.
Is there any sample code you can provide here ?
In XAML:
<Grid.Resources>
<telerikCore:RadScaleAnimation x:Key="radScaleAnimation" Duration="0:0:2" AutoReverse="True"/>
</Grid.Resources>
<TextBlock Name="target1" Text="Congratulations !" Margin="10" TextWrapping="Wrap"
HorizontalAlignment="Center"
FontSize="{StaticResource PhoneFontSizeMedium}" Foreground="Red" />
void animate()
{ scaleAnimation = this.LayoutRoot.Resources["radScaleAnimation"] as RadScaleAnimation;
scaleAnimation.StartScaleX = 0.5;
scaleAnimation.EndScaleX = 4;
scaleAnimation.StartScaleY = 0.5;
scaleAnimation.EndScaleY = 4;
EasingFunctionBase ease = new QuadraticEase();
ease.EasingMode = EasingMode.EaseInOut;
scaleAnimation.Easing = ease;
RadAnimationManager.Play(this.target1, scaleAnimation);
}