Share via


IXRUIElement::AddLostMouseCaptureEventHandler (Compact 2013)

3/28/2014

This method attaches a delegate to the LostMouseCapture event for a UI element. When the UI element raises the LostMouseCapture event, this delegate is invoked.

Syntax

virtual HRESULT STDMETHODCALLTYPE AddLostMouseCaptureEventHandler(
    __in IXRDelegate<XRMouseEventArgs>* pDelegate
) = 0;

Parameters

Return Value

Returns an HRESULT that indicates whether or not the method succeeded.

Remarks

A UI element raises the LostMouseCapture event when it loses mouse capture. The CreateDelegate function provides an easy way to create the IXRDelegate object that you attach to this event.

You can attach multiple delegates to the same event.

To remove a delegate from a LostMouseCapture event, call IXRUIElement::RemoveLostMouseCaptureEventHandler.

.NET Framework Equivalent

None.

Requirements

Header

XamlRuntime.h,
XRDelegate.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRUIElement