Last active
July 8, 2024 16:25
-
-
Save s-fernandez-v/93cdae35b653f82f899761e9af1dc4f3 to your computer and use it in GitHub Desktop.
Text reveal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Grid | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<Grid.Resources> | |
<Storyboard x:Key="anim"> | |
<!--Gradually unclip fs_text --> | |
<RectAnimation Storyboard.TargetName="FsTextClip" | |
Storyboard.TargetProperty="Clip.Rect" | |
From="0,0,0,204.58" | |
To="0,0,613.66,204.58" | |
Duration="0:0:0.6" | |
BeginTime="0:0:1"/> | |
</Storyboard> | |
</Grid.Resources> | |
<Grid.Triggers> | |
<EventTrigger RoutedEvent="Grid.Loaded"> | |
<BeginStoryboard Storyboard="{StaticResource anim}"/> | |
</EventTrigger> | |
</Grid.Triggers> | |
<Canvas x:Name="FsTextClip" Width="600" Height="200" Background="Silver"> | |
<Canvas.Clip> | |
<RectangleGeometry Rect="0,0,0,204.58"/> | |
</Canvas.Clip> | |
<TextBlock Text="This is a text inside a canvas that will reveal with an animation."/> | |
</Canvas> | |
</Grid> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment