Beispiel #1
0
        private void ReevaluateDirectlyOverAsync(DependencyObject element, DependencyObject oldParent, bool isCoreParent)
        {
            if (element != null)
            {
                if (_directlyOverTreeState == null)
                {
                    _directlyOverTreeState = new DeferredElementTreeState();
                }

                if (isCoreParent)
                {
                    _directlyOverTreeState.SetCoreParent(element, oldParent);
                }
                else
                {
                    _directlyOverTreeState.SetLogicalParent(element, oldParent);
                }
            }

            if (_reevaluateOver == null)
            {
                _reevaluateOver = Dispatcher.BeginInvoke(DispatcherPriority.Input,
                                                         (DispatcherOperationCallback) delegate(object args)
                {
                    TouchDevice thisRef     = (TouchDevice)args;
                    thisRef._reevaluateOver = null;
                    thisRef.OnHitTestInvalidatedAsync(this, EventArgs.Empty);
                    return(null);
                }, this);
            }
        }