Start template animation as soon as the control is loaded

I have the following code inside mine ControlTemplate:

<EventTrigger RoutedEvent="ControlTemplate.Loaded">
            <EventTrigger.EnterActions>
                <BeginStoryboard>

And I want to run the Storyboard, which I defined in the ControlTemplate when the control is loaded. So my question is: what does the ControlTemplate raise a loaded event?

I cannot use FrameworkElement.Loaded as an object, which is the object of my animation, is not available when the Loaded event is fired.

PS ControlTemplate.Loadeddoes not work

+3
source share
1 answer

ControlTemplate Loaded. Loaded XXX.Loaded, XXX - , , ControlTemplate.

+2

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


All Articles