Exemplo n.º 1
0
        private void Element_Loaded(object sender, RoutedEventArgs e)
        {
            ((FrameworkElement)sender).Loaded -= Element_Loaded;

            this.Storyboard = AdornedElement
                              .FindLogicalParents <Storyboard>()
                              .FirstOrDefault();

            OnLoaded((FrameworkElement)AdornedElement);

            RendererLoaded?.Invoke(this, e);
        }
Exemplo n.º 2
0
        private void Element_Loaded(object sender, RoutedEventArgs e)
        {
            var element = sender as FrameworkElement;

            if (!element.IsVisible)
            {
                return;
            }

            element.Loaded -= Element_Loaded;

            this.Storyboard = AdornedElement
                              .FindLogicalParents <Storyboard>()
                              .FirstOrDefault();

            OnLoaded((FrameworkElement)AdornedElement);

            RendererLoaded?.Invoke(this, e);
        }