// Token: 0x06000305 RID: 773 RVA: 0x000085D4 File Offset: 0x000067D4
        internal static void AddUnloadedCallback(DependencyObject d, DependencyObject logicalParent)
        {
            DispatcherOperationCallback dispatcherOperationCallback = new DispatcherOperationCallback(BroadcastEventHelper.BroadcastUnloadedEvent);
            LoadedOrUnloadedOperation   loadedOrUnloadedOperation   = MediaContext.From(d.Dispatcher).AddLoadedOrUnloadedCallback(dispatcherOperationCallback, d);
            DispatcherOperation         dispatcherOperation         = d.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, dispatcherOperationCallback, d);

            d.SetValue(FrameworkElement.UnloadedPendingPropertyKey, new object[]
            {
                loadedOrUnloadedOperation,
                dispatcherOperation,
                logicalParent
            });
        }
        /// <summary>
        /// Add the unloaded callback to the MediaContext queue
        /// </summary>
        internal static void AddUnloadedCallback(DependencyObject d, DependencyObject logicalParent)
        {
            Debug.Assert(d is FrameworkElement || d is FrameworkContentElement);

            DispatcherOperationCallback unloadedCallback = new DispatcherOperationCallback(BroadcastEventHelper.BroadcastUnloadedEvent);

            // Add the pending unloaded event information to the MediaContext's pending
            // LoadedOrUnloadedCallbacks list so these can be called pre render
            LoadedOrUnloadedOperation unloadedOp = MediaContext.From(d.Dispatcher).AddLoadedOrUnloadedCallback(unloadedCallback, d);

            // Post to the dispatcher queue as a backup to fire the broadcast
            // event in case the tree change never triggers a Layout
            DispatcherOperation operation = d.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, unloadedCallback, d);

            // Set the UnloadedPending property
            d.SetValue(FrameworkElement.UnloadedPendingPropertyKey, new object[] { unloadedOp, operation, logicalParent });
        }