Class DragAdornerBehavior
具有控件跟随效果的拖动样式
public class DragAdornerBehavior : Behavior<UIElement>, IAnimatable, IAttachedObject
- Inheritance
-
DragAdornerBehavior
- Implements
- Derived
- Inherited Members
- Extension Methods
Fields
AncestorTypeProperty
public static readonly DependencyProperty AncestorTypeProperty
Field Value
DragDropEffectsProperty
public static readonly DependencyProperty DragDropEffectsProperty
Field Value
DragGroupProperty
public static readonly DependencyProperty DragGroupProperty
Field Value
IsUseProperty
public static readonly DependencyProperty IsUseProperty
Field Value
OpacityProperty
public static readonly DependencyProperty OpacityProperty
Field Value
Properties
AncestorType
public Type AncestorType { get; set; }
Property Value
DragDropEffects
public DragDropEffects DragDropEffects { get; set; }
Property Value
DragGroup
判断可否放置的分组
public string DragGroup { get; set; }
Property Value
DropAdornerMode
public DrapAdornerMode DropAdornerMode { get; set; }
Property Value
Opacity
拖拽时样式透明度
public double Opacity { get; set; }
Property Value
RoutingStrategy
public RoutingStrategy RoutingStrategy { get; set; }
Property Value
Methods
BeforeDoDragDrop(UIElement)
protected virtual void BeforeDoDragDrop(UIElement element)
Parameters
element
UIElement
CreateDragAdorner(UIElement, Point)
protected virtual IDragAdorner CreateDragAdorner(UIElement element, Point point)
Parameters
Returns
DoDragDrop()
用于子类重写拖拽时放入的数据
protected virtual void DoDragDrop()
GetIsUse(DependencyObject)
public static bool GetIsUse(DependencyObject obj)
Parameters
obj
DependencyObject
Returns
GetMousePosition()
public static Point GetMousePosition()
Returns
OnAttached()
Called after the behavior is attached to an AssociatedObject.
protected override void OnAttached()
Remarks
Override this to hook up functionality to the AssociatedObject.
OnDetaching()
Called when the behavior is being detached from its AssociatedObject, but before it has actually occurred.
protected override void OnDetaching()
Remarks
Override this to unhook functionality from the AssociatedObject.
OnIsUseChanged(DependencyObject, DependencyPropertyChangedEventArgs)
public static void OnIsUseChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
Parameters
SetIsUse(DependencyObject, bool)
public static void SetIsUse(DependencyObject obj, bool value)
Parameters
obj
DependencyObjectvalue
bool