Created
February 22, 2024 11:17
-
-
Save foglio1024/da38be33a7e9e163b0ff8b58138512cd to your computer and use it in GitHub Desktop.
Animate a Border size based on on the target control size
This file contains 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
<Panel> | |
<Border x:Name="AnimatedBorder"> | |
<Control x:Name="AnimatedBorderGovernor" | |
Fill="Transparent" | |
Width="{Binding #Target.Bounds.Width}" | |
Height="{Binding #Target.Bounds.Height}" | |
> | |
<Control.Transitions> | |
<Transitions> | |
<DoubleTransition Property="Height" Duration="..." Easing="..."/> | |
<DoubleTransition Property="Width" Duration="..." Easing="..."/> | |
</Transitions> | |
</Control.Transitions> | |
</Control> | |
</Border> | |
<TransitioningContentControl x:Name="Target"/> | |
</Panel> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment