UIElement.CaptureMouse() and Mouse.Capture()

Capture mouse能够使 即使在控件之外也能够获取鼠标事件,拖,拉鼠标时最有用。

When an element captures the mouse, it receives mouse input whether or not the cursor is within its borders.

释放:UIElement.ReleaseMouseCapture() 或者Mouse.Capture(null)

注意只能获取MouseUp 与MouseDown事件,其他的如MouseLeftUp与MouseLeftDown不能获取。

posted on 2008-12-16 16:59  oyl  阅读(546)  评论(0编辑  收藏  举报

导航