c# - WPF drag distance threshold -


i have program 2 wpf treeviews allow dragging , dropping between two. problem is, can annoying open / close items on treeviews because moving mouse 1 pixel while holding left mouse button triggers drag / drop functionality. there way specify how far mouse should move before it's considered drag / drop?

there's system parameter this. if have

point down = {where mouse down event happened} point current = {position in mousemove eventargs} 

then mouse has moved minimum drag distance if

math.abs(current.x - down.x) >= systemparameters.minimumhorizontaldragdistance || math.abs(current.y - down.y) >= systemparameters.minimumverticaldragdistance) 

Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -