Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 wpf 中使用拖放时,有没有办法确定用户是向左拖动还是向右拖动?我在 wpf 中使用标准的拖动事件,例如 OnDragStarted、OnPreviewDragEnter 等...
您可以通过计算DragEventArgs.GetPosition()每半秒的差异来轻松计算出这一点。
DragEventArgs.GetPosition()
返回相对于指定的放置点
它返回一个Point对象,该对象具有可用于确定方向的 X 和 Y 坐标。
Point