Exemplo n.º 1
0
        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------

        #region Constructors

        /// <summary>
        /// Initializes a new instance of the GiveFeedbackEventArgs class.
        /// </summary>
        /// <param name="effects">
        /// The effect of the drag operation.
        /// </param>
        /// <param name="useDefaultCursors">
        /// Use the default cursors.
        /// </param>
        internal GiveFeedbackEventArgs(DragDropEffects effects, bool useDefaultCursors)
        {
            if (!DragDrop.IsValidDragDropEffects(effects))
            {
                Debug.Assert(false, "Invalid effects");
            }

            this._effects           = effects;
            this._useDefaultCursors = useDefaultCursors;
        }
Exemplo n.º 2
0
        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------

        #region Constructors

        /// <summary>
        /// Constructs a DragEventArgs instance.
        /// </summary>
        /// <param name="data">
        /// The data object used in this drag drop operation.
        /// </param>
        /// <param name="dragDropKeyStates">
        /// The current state of the mouse button and modifier keys.
        /// </param>
        /// <param name="allowedEffects">
        /// Allowed effects of a drag-and-drop operation.
        /// </param>
        /// <param name="target">
        /// The target of the event.
        /// </param>
        /// <param name="point">
        /// The current mouse position of the target.
        /// </param>
        internal DragEventArgs(IDataObject data, DragDropKeyStates dragDropKeyStates, DragDropEffects allowedEffects, DependencyObject target, Point point)
        {
            if (!DragDrop.IsValidDragDropKeyStates(dragDropKeyStates))
            {
                Debug.Assert(false, "Invalid dragDropKeyStates");
            }

            if (!DragDrop.IsValidDragDropEffects(allowedEffects))
            {
                Debug.Assert(false, "Invalid allowedEffects");
            }

            if (target == null)
            {
                Debug.Assert(false, "Invalid target");
            }

            this._data = data;
            this._dragDropKeyStates = dragDropKeyStates;
            this._allowedEffects    = allowedEffects;
            this._target            = target;
            this._dropPoint         = point;
            this._effects           = allowedEffects;
        }