Fixed FrameworkElement.Loaded event handling.