Table of Contents

Class ElementDragStateBehavior

Namespace
HeBianGu.Base.WpfBase
Assembly
HeBianGu.Base.WpfBase.dll

设置当前控件是否处于拖拽状态

public class ElementDragStateBehavior : Behavior<FrameworkElement>, IAnimatable, IAttachedObject
Inheritance
ElementDragStateBehavior
Implements
Inherited Members
Extension Methods

Fields

IsDraggingProperty

是否正在拖拽

public static readonly DependencyProperty IsDraggingProperty

Field Value

DependencyProperty

Properties

IsUseMouseLeave

是否检测鼠标离开后设置未拖动状态

public bool IsUseMouseLeave { get; set; }

Property Value

bool

Methods

GetIsDragging(DependencyObject)

public static bool GetIsDragging(DependencyObject d)

Parameters

d DependencyObject

Returns

bool

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.

SetIsDragging(DependencyObject, bool)

public static void SetIsDragging(DependencyObject obj, bool value)

Parameters

obj DependencyObject
value bool