// Token: 0x0600030A RID: 778 RVA: 0x000086F4 File Offset: 0x000068F4
        internal static object BroadcastUnloadedEvent(object root)
        {
            DependencyObject dependencyObject = (DependencyObject)root;

            object[] unloadedPending = (object[])dependencyObject.GetValue(FrameworkElement.UnloadedPendingProperty);
            bool     isLoaded        = BroadcastEventHelper.IsLoadedHelper(dependencyObject);

            BroadcastEventHelper.RemoveUnloadedCallback(dependencyObject, unloadedPending);
            BroadcastEventHelper.BroadcastUnloadedSynchronously(dependencyObject, isLoaded);
            return(null);
        }
Ejemplo n.º 2
0
        // handle the Unloaded event from the mentor
        void OnMentorUnloaded(object sender, RoutedEventArgs e)
        {
            FrameworkObject foMentor = new FrameworkObject((DependencyObject)sender);

            // stop listening for Unloaded, start listening for Loaded
            foMentor.Unloaded -= new RoutedEventHandler(OnMentorUnloaded);
            foMentor.Loaded   += new RoutedEventHandler(OnMentorLoaded);

            // broadcast the Unloaded event to my framework subtree
            //FireUnloadedOnDescendentsInternal();
            BroadcastEventHelper.BroadcastUnloadedSynchronously(this, IsLoaded);
        }