C# Класс GongSolutions.Wpf.DragDrop.DragDrop

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

GetDefaultDragAdornerOpacity() публичный статический Метод

public static GetDefaultDragAdornerOpacity ( UIElement target ) : double
target UIElement
Результат double

GetDragAdornerTemplate() публичный статический Метод

public static GetDragAdornerTemplate ( UIElement target ) : System.Windows.DataTemplate
target UIElement
Результат System.Windows.DataTemplate

GetDragAdornerTemplateSelector() публичный статический Метод

public static GetDragAdornerTemplateSelector ( DependencyObject element ) : System.Windows.Controls.DataTemplateSelector
element System.Windows.DependencyObject
Результат System.Windows.Controls.DataTemplateSelector

GetDragDirectlySelectedOnly() публичный статический Метод

public static GetDragDirectlySelectedOnly ( DependencyObject obj ) : bool
obj System.Windows.DependencyObject
Результат bool

GetDragDropContext() публичный статический Метод

public static GetDragDropContext ( UIElement target ) : string
target UIElement
Результат string

GetDragDropCopyKeyState() публичный статический Метод

Gets the drag drop copy key state indicating the effect of the drag drop operation.
public static GetDragDropCopyKeyState ( UIElement target ) : DragDropKeyStates
target UIElement
Результат DragDropKeyStates

GetDragHandler() публичный статический Метод

public static GetDragHandler ( UIElement target ) : IDragSource
target UIElement
Результат IDragSource

GetDragMouseAnchorPoint() публичный статический Метод

public static GetDragMouseAnchorPoint ( UIElement target ) : Point
target UIElement
Результат Point

GetDragSourceIgnore() публичный статический Метод

public static GetDragSourceIgnore ( UIElement source ) : bool
source UIElement
Результат bool

GetDropHandler() публичный статический Метод

public static GetDropHandler ( UIElement target ) : IDropTarget
target UIElement
Результат IDropTarget

GetEffectAllAdornerTemplate() публичный статический Метод

public static GetEffectAllAdornerTemplate ( UIElement target ) : System.Windows.DataTemplate
target UIElement
Результат System.Windows.DataTemplate

GetEffectCopyAdornerTemplate() публичный статический Метод

public static GetEffectCopyAdornerTemplate ( UIElement target, string destinationText ) : System.Windows.DataTemplate
target UIElement
destinationText string
Результат System.Windows.DataTemplate

GetEffectLinkAdornerTemplate() публичный статический Метод

public static GetEffectLinkAdornerTemplate ( UIElement target, string destinationText ) : System.Windows.DataTemplate
target UIElement
destinationText string
Результат System.Windows.DataTemplate

GetEffectMoveAdornerTemplate() публичный статический Метод

public static GetEffectMoveAdornerTemplate ( UIElement target, string destinationText ) : System.Windows.DataTemplate
target UIElement
destinationText string
Результат System.Windows.DataTemplate

GetEffectNoneAdornerTemplate() публичный статический Метод

public static GetEffectNoneAdornerTemplate ( UIElement target ) : System.Windows.DataTemplate
target UIElement
Результат System.Windows.DataTemplate

GetEffectScrollAdornerTemplate() публичный статический Метод

public static GetEffectScrollAdornerTemplate ( UIElement target ) : System.Windows.DataTemplate
target UIElement
Результат System.Windows.DataTemplate

GetIsDragSource() публичный статический Метод

public static GetIsDragSource ( UIElement target ) : bool
target UIElement
Результат bool

GetIsDropTarget() публичный статический Метод

public static GetIsDropTarget ( UIElement target ) : bool
target UIElement
Результат bool

GetItemsPanelOrientation() публичный статический Метод

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
Результат Orientation?

GetUseDefaultDragAdorner() публичный статический Метод

public static GetUseDefaultDragAdorner ( UIElement target ) : bool
target UIElement
Результат bool

GetUseDefaultEffectDataTemplate() публичный статический Метод

public static GetUseDefaultEffectDataTemplate ( UIElement target ) : bool
target UIElement
Результат bool

GetUseVisualSourceItemSizeForDragAdorner() публичный статический Метод

public static GetUseVisualSourceItemSizeForDragAdorner ( UIElement target ) : bool
target UIElement
Результат bool

SetDefaultDragAdornerOpacity() публичный статический Метод

public static SetDefaultDragAdornerOpacity ( UIElement target, double value ) : void
target UIElement
value double
Результат void

SetDragAdornerTemplate() публичный статический Метод

public static SetDragAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
target UIElement
value System.Windows.DataTemplate
Результат void

SetDragAdornerTemplateSelector() публичный статический Метод

public static SetDragAdornerTemplateSelector ( DependencyObject element, System.Windows.Controls.DataTemplateSelector value ) : void
element System.Windows.DependencyObject
value System.Windows.Controls.DataTemplateSelector
Результат void

SetDragDirectlySelectedOnly() публичный статический Метод

public static SetDragDirectlySelectedOnly ( DependencyObject obj, bool value ) : void
obj System.Windows.DependencyObject
value bool
Результат void

SetDragDropContext() публичный статический Метод

public static SetDragDropContext ( UIElement target, string value ) : void
target UIElement
value string
Результат void

SetDragDropCopyKeyState() публичный статический Метод

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
Результат void

SetDragHandler() публичный статический Метод

public static SetDragHandler ( UIElement target, IDragSource value ) : void
target UIElement
value IDragSource
Результат void

SetDragMouseAnchorPoint() публичный статический Метод

public static SetDragMouseAnchorPoint ( UIElement target, Point value ) : void
target UIElement
value Point
Результат void

SetDragSourceIgnore() публичный статический Метод

public static SetDragSourceIgnore ( UIElement source, bool value ) : void
source UIElement
value bool
Результат void

SetDropHandler() публичный статический Метод

public static SetDropHandler ( UIElement target, IDropTarget value ) : void
target UIElement
value IDropTarget
Результат void

SetEffectAllAdornerTemplate() публичный статический Метод

public static SetEffectAllAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
target UIElement
value System.Windows.DataTemplate
Результат void

SetEffectCopyAdornerTemplate() публичный статический Метод

public static SetEffectCopyAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
target UIElement
value System.Windows.DataTemplate
Результат void

SetEffectLinkAdornerTemplate() публичный статический Метод

public static SetEffectLinkAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
target UIElement
value System.Windows.DataTemplate
Результат void

SetEffectMoveAdornerTemplate() публичный статический Метод

public static SetEffectMoveAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
target UIElement
value System.Windows.DataTemplate
Результат void

SetEffectNoneAdornerTemplate() публичный статический Метод

public static SetEffectNoneAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
target UIElement
value System.Windows.DataTemplate
Результат void

SetEffectScrollAdornerTemplate() публичный статический Метод

public static SetEffectScrollAdornerTemplate ( UIElement target, System.Windows.DataTemplate value ) : void
target UIElement
value System.Windows.DataTemplate
Результат void

SetIsDragSource() публичный статический Метод

public static SetIsDragSource ( UIElement target, bool value ) : void
target UIElement
value bool
Результат void

SetIsDropTarget() публичный статический Метод

public static SetIsDropTarget ( UIElement target, bool value ) : void
target UIElement
value bool
Результат void

SetItemsPanelOrientation() публичный статический Метод

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
Результат void

SetUseDefaultDragAdorner() публичный статический Метод

public static SetUseDefaultDragAdorner ( UIElement target, bool value ) : void
target UIElement
value bool
Результат void

SetUseDefaultEffectDataTemplate() публичный статический Метод

public static SetUseDefaultEffectDataTemplate ( UIElement target, bool value ) : void
target UIElement
value bool
Результат void

SetUseVisualSourceItemSizeForDragAdorner() публичный статический Метод

public static SetUseVisualSourceItemSizeForDragAdorner ( UIElement target, bool value ) : void
target UIElement
value bool
Результат void

Описание свойств

DataFormat публичное статическое свойство

public static DataFormat,System.Windows DataFormat
Результат System.Windows.DataFormat

DefaultDragAdornerOpacityProperty публичное статическое свойство

public static DependencyProperty,System.Windows DefaultDragAdornerOpacityProperty
Результат System.Windows.DependencyProperty

DragAdornerTemplateProperty публичное статическое свойство

public static DependencyProperty,System.Windows DragAdornerTemplateProperty
Результат System.Windows.DependencyProperty

DragAdornerTemplateSelectorProperty публичное статическое свойство

public static DependencyProperty,System.Windows DragAdornerTemplateSelectorProperty
Результат System.Windows.DependencyProperty

DragDirectlySelectedOnlyProperty публичное статическое свойство

public static DependencyProperty,System.Windows DragDirectlySelectedOnlyProperty
Результат System.Windows.DependencyProperty

DragDropContextProperty публичное статическое свойство

public static DependencyProperty,System.Windows DragDropContextProperty
Результат System.Windows.DependencyProperty

DragDropCopyKeyStateProperty публичное статическое свойство

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
Результат System.Windows.DependencyProperty

DragHandlerProperty публичное статическое свойство

public static DependencyProperty,System.Windows DragHandlerProperty
Результат System.Windows.DependencyProperty

DragMouseAnchorPointProperty публичное статическое свойство

DragMouseAnchorPoint defines the horizontal and vertical proportion at which the pointer will anchor on the DragAdorner.
public static DependencyProperty,System.Windows DragMouseAnchorPointProperty
Результат System.Windows.DependencyProperty

DragSourceIgnoreProperty публичное статическое свойство

public static DependencyProperty,System.Windows DragSourceIgnoreProperty
Результат System.Windows.DependencyProperty

DropHandlerProperty публичное статическое свойство

public static DependencyProperty,System.Windows DropHandlerProperty
Результат System.Windows.DependencyProperty

EffectAllAdornerTemplateProperty публичное статическое свойство

public static DependencyProperty,System.Windows EffectAllAdornerTemplateProperty
Результат System.Windows.DependencyProperty

EffectCopyAdornerTemplateProperty публичное статическое свойство

public static DependencyProperty,System.Windows EffectCopyAdornerTemplateProperty
Результат System.Windows.DependencyProperty

EffectLinkAdornerTemplateProperty публичное статическое свойство

public static DependencyProperty,System.Windows EffectLinkAdornerTemplateProperty
Результат System.Windows.DependencyProperty

EffectMoveAdornerTemplateProperty публичное статическое свойство

public static DependencyProperty,System.Windows EffectMoveAdornerTemplateProperty
Результат System.Windows.DependencyProperty

EffectNoneAdornerTemplateProperty публичное статическое свойство

public static DependencyProperty,System.Windows EffectNoneAdornerTemplateProperty
Результат System.Windows.DependencyProperty

EffectScrollAdornerTemplateProperty публичное статическое свойство

public static DependencyProperty,System.Windows EffectScrollAdornerTemplateProperty
Результат System.Windows.DependencyProperty

IsDragSourceProperty публичное статическое свойство

public static DependencyProperty,System.Windows IsDragSourceProperty
Результат System.Windows.DependencyProperty

IsDropTargetProperty публичное статическое свойство

public static DependencyProperty,System.Windows IsDropTargetProperty
Результат System.Windows.DependencyProperty

ItemsPanelOrientationProperty публичное статическое свойство

public static DependencyProperty,System.Windows ItemsPanelOrientationProperty
Результат System.Windows.DependencyProperty

UseDefaultDragAdornerProperty публичное статическое свойство

public static DependencyProperty,System.Windows UseDefaultDragAdornerProperty
Результат System.Windows.DependencyProperty

UseDefaultEffectDataTemplateProperty публичное статическое свойство

public static DependencyProperty,System.Windows UseDefaultEffectDataTemplateProperty
Результат System.Windows.DependencyProperty

UseVisualSourceItemSizeForDragAdornerProperty публичное статическое свойство

public static DependencyProperty,System.Windows UseVisualSourceItemSizeForDragAdornerProperty
Результат System.Windows.DependencyProperty