view Chronosv2/source/DragAndDrop/IDataDropObjectProvider.cs @ 25:81f9b72a44ce

Tidy up
author adminsh@apollo
date Tue, 20 Mar 2012 21:22:00 +0000
parents 443821e55f06
children
line wrap: on
line source

using System.Windows;
using System.Windows.Input;

namespace Chronos.Presentation.DragAndDrop
{
    // This is an interface that can be implemented to help the DragHelper ( aka the source )
    public interface IDataDropObjectProvider
    {
        #region · Properties ·

        //Flag of actions sypported by implementation of  IDataDropObjectProvider
        DragDropProviderActions SupportedActions
        {
            get;
        }

        #endregion

        #region · Methods ·

        // Called before StartDrag () to get the Data () to be used in the DataObject 
        object GetData();

        // Called before StartDrag () to add other formats , this way you can drag drop externally.. 
        void AppendData(ref IDataObject data, MouseEventArgs e);

        // Called to get the visual ( UIElement visual brush of the object being dragged..         
        UIElement GetVisual(MouseEventArgs e);

        // Gives feedback during Drag 
        void GiveFeedback(GiveFeedbackEventArgs args);

        // implements ContinueDrag -- to canceld the D&D.. 
        void ContinueDrag(QueryContinueDragEventArgs args);

        // called by the TARGET object .. this will attempt to "unparent" the current child so we can add it a child some where else.. 
        bool UnParent();

        #endregion
    }
}