C# Class GongSolutions.Wpf.DragDrop.DragDrop

Afficher le fichier Open project: punker76/gong-wpf-dragdrop Class Usage Examples

Méthodes publiques

Свойство Type Description
DataFormat System.Windows.DataFormat
DefaultDragAdornerOpacityProperty System.Windows.DependencyProperty
DragAdornerTemplateProperty System.Windows.DependencyProperty
DragAdornerTemplateSelectorProperty System.Windows.DependencyProperty
DragDirectlySelectedOnlyProperty System.Windows.DependencyProperty
DragDropContextProperty System.Windows.DependencyProperty
DragDropCopyKeyStateProperty System.Windows.DependencyProperty
DragHandlerProperty System.Windows.DependencyProperty
DragMouseAnchorPointProperty System.Windows.DependencyProperty
DragSourceIgnoreProperty System.Windows.DependencyProperty
DropHandlerProperty System.Windows.DependencyProperty
EffectAllAdornerTemplateProperty System.Windows.DependencyProperty
EffectCopyAdornerTemplateProperty System.Windows.DependencyProperty
EffectLinkAdornerTemplateProperty System.Windows.DependencyProperty
EffectMoveAdornerTemplateProperty System.Windows.DependencyProperty
EffectNoneAdornerTemplateProperty System.Windows.DependencyProperty
EffectScrollAdornerTemplateProperty System.Windows.DependencyProperty
IsDragSourceProperty System.Windows.DependencyProperty
IsDropTargetProperty System.Windows.DependencyProperty
ItemsPanelOrientationProperty System.Windows.DependencyProperty
UseDefaultDragAdornerProperty System.Windows.DependencyProperty
UseDefaultEffectDataTemplateProperty System.Windows.DependencyProperty
UseVisualSourceItemSizeForDragAdornerProperty System.Windows.DependencyProperty

Private Properties

Свойство Type Description
CaptureScreen BitmapSource
CreateDefaultEffectDataTemplate System.Windows.DataTemplate
CreateDragAdorner void
CreateEffectAdorner void
DragSource_PreviewMouseLeftButtonDown void
DragSource_PreviewMouseLeftButtonUp void
DragSource_PreviewMouseMove void
DragSource_QueryContinueDrag void
DropTarget_GiveFeedback void
DropTarget_PreviewDragEnter void
DropTarget_PreviewDragLeave void
DropTarget_PreviewDragOver void
DropTarget_PreviewDrop void
GetEffectAdornerTemplate System.Windows.DataTemplate
IsDragSourceChanged void
IsDropTargetChanged void
Scroll void
TryGetDragHandler IDragSource
TryGetDropHandler IDropTarget

Méthodes publiques

Méthode Description
GetDefaultDragAdornerOpacity ( UIElement target ) : double
GetDragAdornerTemplate ( UIElement target ) : System.Windows.DataTemplate
GetDragAdornerTemplateSelector ( DependencyObject element ) : System.Windows.Controls.DataTemplateSelector
GetDragDirectlySelectedOnly ( DependencyObject obj ) : bool
GetDragDropContext ( UIElement target ) : string
GetDragDropCopyKeyState ( UIElement target ) : DragDropKeyStates

Gets the drag drop copy key state indicating the effect of the drag drop operation.

GetDragHandler ( UIElement target ) : IDragSource
GetDragMouseAnchorPoint ( UIElement target ) : Point
GetDragSourceIgnore ( UIElement source ) : bool
GetDropHandler ( UIElement target ) : IDropTarget
GetEffectAllAdornerTemplate ( UIElement target ) : System.Windows.DataTemplate
GetEffectCopyAdornerTemplate ( UIElement target, string destinationText ) : System.Windows.DataTemplate
GetEffectLinkAdornerTemplate ( UIElement target, string destinationText ) : System.Windows.DataTemplate
GetEffectMoveAdornerTemplate ( UIElement target, string destinationText ) : System.Windows.DataTemplate
GetEffectNoneAdornerTemplate ( UIElement target ) : System.Windows.DataTemplate
GetEffectScrollAdornerTemplate ( UIElement target ) : System.Windows.DataTemplate
GetIsDragSource ( UIElement target ) : bool
GetIsDropTarget ( UIElement target ) : bool
GetItemsPanelOrientation ( UIElement source ) : Orientation?

Gets the Orientation which should be used for the drag drop action (default null). Normally it will be look up to find the correct orientaion of the inner ItemsPanel, but sometimes it's necessary to force the oreintation, if the look up is wrong.

GetUseDefaultDragAdorner ( UIElement target ) : bool
GetUseDefaultEffectDataTemplate ( UIElement target ) : bool
GetUseVisualSourceItemSizeForDragAdorner ( UIElement target ) : bool
SetDefaultDragAdornerOpacity ( UIElement target, double value ) : void
SetDragAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
SetDragAdornerTemplateSelector ( DependencyObject element, System.Windows.Controls.DataTemplateSelector value ) : void
SetDragDirectlySelectedOnly ( DependencyObject obj, bool value ) : void
SetDragDropContext ( UIElement target, string value ) : void
SetDragDropCopyKeyState ( UIElement target, DragDropKeyStates value ) : void

Sets the drag drop copy key state indicating the effect of the drag drop operation.

SetDragHandler ( UIElement target, IDragSource value ) : void
SetDragMouseAnchorPoint ( UIElement target, Point value ) : void
SetDragSourceIgnore ( UIElement source, bool value ) : void
SetDropHandler ( UIElement target, IDropTarget value ) : void
SetEffectAllAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
SetEffectCopyAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
SetEffectLinkAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
SetEffectMoveAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
SetEffectNoneAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
SetEffectScrollAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
SetIsDragSource ( UIElement target, bool value ) : void
SetIsDropTarget ( UIElement target, bool value ) : void
SetItemsPanelOrientation ( UIElement source, Orientation value ) : void

Sets the Orientation which should be used for the drag drop action (default null). Normally it will be look up to find the correct orientaion of the inner ItemsPanel, but sometimes it's necessary to force the oreintation, if the look up is wrong.

SetUseDefaultDragAdorner ( UIElement target, bool value ) : void
SetUseDefaultEffectDataTemplate ( UIElement target, bool value ) : void
SetUseVisualSourceItemSizeForDragAdorner ( UIElement target, bool value ) : void

Private Methods

Méthode Description
CaptureScreen ( Visual target, FlowDirection flowDirection ) : BitmapSource
CreateDefaultEffectDataTemplate ( UIElement target, BitmapImage effectIcon, string effectText, string destinationText ) : System.Windows.DataTemplate
CreateDragAdorner ( GongSolutions.Wpf.DragDrop.DropInfo dropInfo ) : void
CreateEffectAdorner ( GongSolutions.Wpf.DragDrop.DropInfo dropInfo ) : void
DragSource_PreviewMouseLeftButtonDown ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
DragSource_PreviewMouseLeftButtonUp ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
DragSource_PreviewMouseMove ( object sender, System.Windows.Input.MouseEventArgs e ) : void
DragSource_QueryContinueDrag ( object sender, System.Windows.QueryContinueDragEventArgs e ) : void
DropTarget_GiveFeedback ( object sender, System.Windows.GiveFeedbackEventArgs e ) : void
DropTarget_PreviewDragEnter ( object sender, System.Windows.DragEventArgs e ) : void
DropTarget_PreviewDragLeave ( object sender, System.Windows.DragEventArgs e ) : void
DropTarget_PreviewDragOver ( object sender, System.Windows.DragEventArgs e ) : void
DropTarget_PreviewDrop ( object sender, System.Windows.DragEventArgs e ) : void
GetEffectAdornerTemplate ( UIElement target, DragDropEffects effect, string destinationText ) : System.Windows.DataTemplate
IsDragSourceChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
IsDropTargetChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
Scroll ( ScrollViewer scrollViewer, System.Windows.DragEventArgs e ) : void
TryGetDragHandler ( GongSolutions.Wpf.DragDrop.DragInfo dragInfo, UIElement sender ) : IDragSource

Gets the drag handler from the drag info or from the sender, if the drag info is null

TryGetDropHandler ( GongSolutions.Wpf.DragDrop.DropInfo dropInfo, UIElement sender ) : IDropTarget

Gets the drop handler from the drop info or from the sender, if the drop info is null

Method Details

GetDefaultDragAdornerOpacity() public static méthode

public static GetDefaultDragAdornerOpacity ( UIElement target ) : double
target UIElement
Résultat double

GetDragAdornerTemplate() public static méthode

public static GetDragAdornerTemplate ( UIElement target ) : System.Windows.DataTemplate
target UIElement
Résultat System.Windows.DataTemplate

GetDragAdornerTemplateSelector() public static méthode

public static GetDragAdornerTemplateSelector ( DependencyObject element ) : System.Windows.Controls.DataTemplateSelector
element System.Windows.DependencyObject
Résultat System.Windows.Controls.DataTemplateSelector

GetDragDirectlySelectedOnly() public static méthode

public static GetDragDirectlySelectedOnly ( DependencyObject obj ) : bool
obj System.Windows.DependencyObject
Résultat bool

GetDragDropContext() public static méthode

public static GetDragDropContext ( UIElement target ) : string
target UIElement
Résultat string

GetDragDropCopyKeyState() public static méthode

Gets the drag drop copy key state indicating the effect of the drag drop operation.
public static GetDragDropCopyKeyState ( UIElement target ) : DragDropKeyStates
target UIElement
Résultat DragDropKeyStates

GetDragHandler() public static méthode

public static GetDragHandler ( UIElement target ) : IDragSource
target UIElement
Résultat IDragSource

GetDragMouseAnchorPoint() public static méthode

public static GetDragMouseAnchorPoint ( UIElement target ) : Point
target UIElement
Résultat Point

GetDragSourceIgnore() public static méthode

public static GetDragSourceIgnore ( UIElement source ) : bool
source UIElement
Résultat bool

GetDropHandler() public static méthode

public static GetDropHandler ( UIElement target ) : IDropTarget
target UIElement
Résultat IDropTarget

GetEffectAllAdornerTemplate() public static méthode

public static GetEffectAllAdornerTemplate ( UIElement target ) : System.Windows.DataTemplate
target UIElement
Résultat System.Windows.DataTemplate

GetEffectCopyAdornerTemplate() public static méthode

public static GetEffectCopyAdornerTemplate ( UIElement target, string destinationText ) : System.Windows.DataTemplate
target UIElement
destinationText string
Résultat System.Windows.DataTemplate

GetEffectLinkAdornerTemplate() public static méthode

public static GetEffectLinkAdornerTemplate ( UIElement target, string destinationText ) : System.Windows.DataTemplate
target UIElement
destinationText string
Résultat System.Windows.DataTemplate

GetEffectMoveAdornerTemplate() public static méthode

public static GetEffectMoveAdornerTemplate ( UIElement target, string destinationText ) : System.Windows.DataTemplate
target UIElement
destinationText string
Résultat System.Windows.DataTemplate

GetEffectNoneAdornerTemplate() public static méthode

public static GetEffectNoneAdornerTemplate ( UIElement target ) : System.Windows.DataTemplate
target UIElement
Résultat System.Windows.DataTemplate

GetEffectScrollAdornerTemplate() public static méthode

public static GetEffectScrollAdornerTemplate ( UIElement target ) : System.Windows.DataTemplate
target UIElement
Résultat System.Windows.DataTemplate

GetIsDragSource() public static méthode

public static GetIsDragSource ( UIElement target ) : bool
target UIElement
Résultat bool

GetIsDropTarget() public static méthode

public static GetIsDropTarget ( UIElement target ) : bool
target UIElement
Résultat bool

GetItemsPanelOrientation() public static méthode

Gets the Orientation which should be used for the drag drop action (default null). Normally it will be look up to find the correct orientaion of the inner ItemsPanel, but sometimes it's necessary to force the oreintation, if the look up is wrong.
public static GetItemsPanelOrientation ( UIElement source ) : Orientation?
source UIElement
Résultat Orientation?

GetUseDefaultDragAdorner() public static méthode

public static GetUseDefaultDragAdorner ( UIElement target ) : bool
target UIElement
Résultat bool

GetUseDefaultEffectDataTemplate() public static méthode

public static GetUseDefaultEffectDataTemplate ( UIElement target ) : bool
target UIElement
Résultat bool

GetUseVisualSourceItemSizeForDragAdorner() public static méthode

public static GetUseVisualSourceItemSizeForDragAdorner ( UIElement target ) : bool
target UIElement
Résultat bool

SetDefaultDragAdornerOpacity() public static méthode

public static SetDefaultDragAdornerOpacity ( UIElement target, double value ) : void
target UIElement
value double
Résultat void

SetDragAdornerTemplate() public static méthode

public static SetDragAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
target UIElement
value System.Windows.DataTemplate
Résultat void

SetDragAdornerTemplateSelector() public static méthode

public static SetDragAdornerTemplateSelector ( DependencyObject element, System.Windows.Controls.DataTemplateSelector value ) : void
element System.Windows.DependencyObject
value System.Windows.Controls.DataTemplateSelector
Résultat void

SetDragDirectlySelectedOnly() public static méthode

public static SetDragDirectlySelectedOnly ( DependencyObject obj, bool value ) : void
obj System.Windows.DependencyObject
value bool
Résultat void

SetDragDropContext() public static méthode

public static SetDragDropContext ( UIElement target, string value ) : void
target UIElement
value string
Résultat void

SetDragDropCopyKeyState() public static méthode

Sets the drag drop copy key state indicating the effect of the drag drop operation.
public static SetDragDropCopyKeyState ( UIElement target, DragDropKeyStates value ) : void
target UIElement
value DragDropKeyStates
Résultat void

SetDragHandler() public static méthode

public static SetDragHandler ( UIElement target, IDragSource value ) : void
target UIElement
value IDragSource
Résultat void

SetDragMouseAnchorPoint() public static méthode

public static SetDragMouseAnchorPoint ( UIElement target, Point value ) : void
target UIElement
value Point
Résultat void

SetDragSourceIgnore() public static méthode

public static SetDragSourceIgnore ( UIElement source, bool value ) : void
source UIElement
value bool
Résultat void

SetDropHandler() public static méthode

public static SetDropHandler ( UIElement target, IDropTarget value ) : void
target UIElement
value IDropTarget
Résultat void

SetEffectAllAdornerTemplate() public static méthode

public static SetEffectAllAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
target UIElement
value System.Windows.DataTemplate
Résultat void

SetEffectCopyAdornerTemplate() public static méthode

public static SetEffectCopyAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
target UIElement
value System.Windows.DataTemplate
Résultat void

SetEffectLinkAdornerTemplate() public static méthode

public static SetEffectLinkAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
target UIElement
value System.Windows.DataTemplate
Résultat void

SetEffectMoveAdornerTemplate() public static méthode

public static SetEffectMoveAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
target UIElement
value System.Windows.DataTemplate
Résultat void

SetEffectNoneAdornerTemplate() public static méthode

public static SetEffectNoneAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
target UIElement
value System.Windows.DataTemplate
Résultat void

SetEffectScrollAdornerTemplate() public static méthode

public static SetEffectScrollAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
target UIElement
value System.Windows.DataTemplate
Résultat void

SetIsDragSource() public static méthode

public static SetIsDragSource ( UIElement target, bool value ) : void
target UIElement
value bool
Résultat void

SetIsDropTarget() public static méthode

public static SetIsDropTarget ( UIElement target, bool value ) : void
target UIElement
value bool
Résultat void

SetItemsPanelOrientation() public static méthode

Sets the Orientation which should be used for the drag drop action (default null). Normally it will be look up to find the correct orientaion of the inner ItemsPanel, but sometimes it's necessary to force the oreintation, if the look up is wrong.
public static SetItemsPanelOrientation ( UIElement source, Orientation value ) : void
source UIElement
value Orientation
Résultat void

SetUseDefaultDragAdorner() public static méthode

public static SetUseDefaultDragAdorner ( UIElement target, bool value ) : void
target UIElement
value bool
Résultat void

SetUseDefaultEffectDataTemplate() public static méthode

public static SetUseDefaultEffectDataTemplate ( UIElement target, bool value ) : void
target UIElement
value bool
Résultat void

SetUseVisualSourceItemSizeForDragAdorner() public static méthode

public static SetUseVisualSourceItemSizeForDragAdorner ( UIElement target, bool value ) : void
target UIElement
value bool
Résultat void

Property Details

DataFormat public_oe static_oe property

public static DataFormat,System.Windows DataFormat
Résultat System.Windows.DataFormat

DefaultDragAdornerOpacityProperty public_oe static_oe property

public static DependencyProperty,System.Windows DefaultDragAdornerOpacityProperty
Résultat System.Windows.DependencyProperty

DragAdornerTemplateProperty public_oe static_oe property

public static DependencyProperty,System.Windows DragAdornerTemplateProperty
Résultat System.Windows.DependencyProperty

DragAdornerTemplateSelectorProperty public_oe static_oe property

public static DependencyProperty,System.Windows DragAdornerTemplateSelectorProperty
Résultat System.Windows.DependencyProperty

DragDirectlySelectedOnlyProperty public_oe static_oe property

public static DependencyProperty,System.Windows DragDirectlySelectedOnlyProperty
Résultat System.Windows.DependencyProperty

DragDropContextProperty public_oe static_oe property

public static DependencyProperty,System.Windows DragDropContextProperty
Résultat System.Windows.DependencyProperty

DragDropCopyKeyStateProperty public_oe static_oe property

The drag drop copy key state property (default None). So the drag drop action is - Move, within the same control or from one to another, if the drag drop key state is None - Copy, from one to another control with the given drag drop copy key state
public static DependencyProperty,System.Windows DragDropCopyKeyStateProperty
Résultat System.Windows.DependencyProperty

DragHandlerProperty public_oe static_oe property

public static DependencyProperty,System.Windows DragHandlerProperty
Résultat System.Windows.DependencyProperty

DragMouseAnchorPointProperty public_oe static_oe property

DragMouseAnchorPoint defines the horizontal and vertical proportion at which the pointer will anchor on the DragAdorner.
public static DependencyProperty,System.Windows DragMouseAnchorPointProperty
Résultat System.Windows.DependencyProperty

DragSourceIgnoreProperty public_oe static_oe property

public static DependencyProperty,System.Windows DragSourceIgnoreProperty
Résultat System.Windows.DependencyProperty

DropHandlerProperty public_oe static_oe property

public static DependencyProperty,System.Windows DropHandlerProperty
Résultat System.Windows.DependencyProperty

EffectAllAdornerTemplateProperty public_oe static_oe property

public static DependencyProperty,System.Windows EffectAllAdornerTemplateProperty
Résultat System.Windows.DependencyProperty

EffectCopyAdornerTemplateProperty public_oe static_oe property

public static DependencyProperty,System.Windows EffectCopyAdornerTemplateProperty
Résultat System.Windows.DependencyProperty

EffectLinkAdornerTemplateProperty public_oe static_oe property

public static DependencyProperty,System.Windows EffectLinkAdornerTemplateProperty
Résultat System.Windows.DependencyProperty

EffectMoveAdornerTemplateProperty public_oe static_oe property

public static DependencyProperty,System.Windows EffectMoveAdornerTemplateProperty
Résultat System.Windows.DependencyProperty

EffectNoneAdornerTemplateProperty public_oe static_oe property

public static DependencyProperty,System.Windows EffectNoneAdornerTemplateProperty
Résultat System.Windows.DependencyProperty

EffectScrollAdornerTemplateProperty public_oe static_oe property

public static DependencyProperty,System.Windows EffectScrollAdornerTemplateProperty
Résultat System.Windows.DependencyProperty

IsDragSourceProperty public_oe static_oe property

public static DependencyProperty,System.Windows IsDragSourceProperty
Résultat System.Windows.DependencyProperty

IsDropTargetProperty public_oe static_oe property

public static DependencyProperty,System.Windows IsDropTargetProperty
Résultat System.Windows.DependencyProperty

ItemsPanelOrientationProperty public_oe static_oe property

public static DependencyProperty,System.Windows ItemsPanelOrientationProperty
Résultat System.Windows.DependencyProperty

UseDefaultDragAdornerProperty public_oe static_oe property

public static DependencyProperty,System.Windows UseDefaultDragAdornerProperty
Résultat System.Windows.DependencyProperty

UseDefaultEffectDataTemplateProperty public_oe static_oe property

public static DependencyProperty,System.Windows UseDefaultEffectDataTemplateProperty
Résultat System.Windows.DependencyProperty

UseVisualSourceItemSizeForDragAdornerProperty public_oe static_oe property

public static DependencyProperty,System.Windows UseVisualSourceItemSizeForDragAdornerProperty
Résultat System.Windows.DependencyProperty