WPF: user control animation at boot

I am developing an application in which I have a user control inside a window. I want to do some growing animation to fit this control when it attaches to a window. Can anyone help me with this?

+6
source share
1 answer

In your style:

<YourControl.Triggers> <EventTrigger RoutedEvent="YourControl.Loaded"> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="Width" From="0" To="150" Duration="0:0:5" /> <DoubleAnimation Storyboard.TargetProperty="Height" From="0" To="100" Duration="0:0:5" /> </Storyboard> </BeginStoryboard> </EventTrigger> </YourControl.Triggers> 
+11
source

Source: https://habr.com/ru/post/887192/


All Articles