Compartilhar via


IXRCustomEvent::Attach (Compact 2013)

3/28/2014

This method adds an event handler to a custom event.

Syntax

virtual HRESULT STDMETHODCALLTYPE Attach(
    IXRDelegate<ArgType, SenderType>* pDelegate
) = 0;

Parameters

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The data source raises the custom event when a property value changes.

The CreateDelegate function provides an easy way to create this IXRDelegate<ArgType, [SenderType]> object.

You can attach multiple delegates to the same custom event.

To remove a delegate from a custom event, call IXRCustomEvent::Detach.

.NET Framework Equivalent

None.

Requirements

Header

XamlRuntime.h,
XRDelegate.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRCustomEvent