can someone explain me how can I add a fade in and a fade out animation to a textblock when I load a form in a Windows Store application? I tried the WPF method but it didn't work... Thank you :)
Not sure if this is what you're looking for (or what "WPF method" didn't work), but with this resource:
<Page.Resources>
<Storyboard x:Name="Storyboard1">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="textBlock">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:4" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Page.Resources>
invoked from OnNavigatedTo
you'll get a fade-in effect (here on a specific instance called textBlock.) Obviously, you can adjust the duration and easing function to your liking - and perhaps generalize for use across various controls.
var f = this.Resources["Storyboard1"] as Storyboard;
if (f != null) f.Begin();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With