Exemplo n.º 1
0
        internal DataPackageOperation Moved(IDragEventSource src)
        {
            if (_state >= State.Completing || src.FrameId <= _lastFrameId)
            {
                return(_acceptedOperation);
            }

            var wasOverWindow = _isOverWindow;

            _isOverWindow = Window.Current.Bounds.Contains(src.GetPosition(null));

            Update(src);             // It's required to do that as soon as possible in order to update the view's location

            if (wasOverWindow && !_isOverWindow)
            {
                Enqueue(RaiseRecoverableLeave);
            }
            else
            {
                Enqueue(RaiseEnterOrOver, isIgnorable: _state == State.Over);                 // This is ignorable only if we already over
            }

            return(_acceptedOperation);
        }
Exemplo n.º 2
0
 internal Point GetPosition(object?relativeTo) => _source.GetPosition(relativeTo);