UIElement.ReleaseMouseCapture Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Removes mouse capture from a UIElement. After this call, typically no object holds mouse capture.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Sub ReleaseMouseCapture
public void ReleaseMouseCapture()

Remarks

The ReleaseMouseCapture method disables mouse capture for an object that has captured the mouse by using the CaptureMouse method. When an object has captured the mouse, it receives mouse input whether or not the mouse pointer is within its bounds.

Calling ReleaseMouseCapture on an object that did not have mouse capture has no effect.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.