/// <summary>
        /// Executes the handler immediately if the element is loaded, otherwise wires it to the Loaded event.
        /// </summary>
        /// <param name="element">The element.</param>
        /// <param name="handler">The handler.</param>
        /// <returns>true if the handler was executed immediately; false otherwise</returns>
        public static bool ExecuteOnLoad(System.Windows.FrameworkContentElement element, RoutedEventHandler handler)
        {
#if SILVERLIGHT
            if ((bool)element.GetValue(IsLoadedProperty))
            {
#elif WinRT
            if (IsElementLoaded(element))
            {
#else
            if (element.IsLoaded)
            {
#endif
                handler(element, new RoutedEventArgs());
                return(true);
            }

            RoutedEventHandler loaded = null;
            loaded = (s, e) => {
                element.Loaded -= loaded;
#if SILVERLIGHT
                element.SetValue(IsLoadedProperty, true);
#endif
                handler(s, e);
            };
            element.Loaded += loaded;
            return(false);
        }
 // Token: 0x0600031A RID: 794 RVA: 0x00008CE3 File Offset: 0x00006EE3
 private static void UpdateIsLoadedCache(FrameworkContentElement fce, DependencyObject parent)
 {
     if (fce.GetValue(FrameworkElement.LoadedPendingProperty) == null)
     {
         fce.IsLoadedCache = BroadcastEventHelper.IsLoadedHelper(parent);
         return;
     }
     fce.IsLoadedCache = false;
 }
 /// <summary>
 ///     Updates the IsLoadedCache on the current FrameworkContentElement
 /// </summary>
 private static void UpdateIsLoadedCache(
     FrameworkContentElement fce,
     DependencyObject parent)
 {
     if (fce.GetValue(FrameworkElement.LoadedPendingProperty) == null)
     {
         // Propagate the change to your logical ancestry
         fce.IsLoadedCache = IsLoadedHelper(parent);
     }
     else
     {
         // Clear the cache if Loaded is pending
         fce.IsLoadedCache = false;
     }
 }
 /// <summary>
 ///     Updates the IsLoadedCache on the current FrameworkContentElement
 /// </summary>
 private static void UpdateIsLoadedCache(
     FrameworkContentElement fce,
     DependencyObject        parent)
 {
     if (fce.GetValue(FrameworkElement.LoadedPendingProperty) == null)
     {
         // Propagate the change to your logical ancestry
         fce.IsLoadedCache = IsLoadedHelper(parent);
     }
     else
     {
         // Clear the cache if Loaded is pending
         fce.IsLoadedCache = false;
     }
 }