次の方法で共有


IXRSelector::AddSelectionChangedEventHandler (Compact 2013)

3/28/2014

This method attaches a delegate to the SelectionChanged event for this selector object.

Syntax

virtual HRESULT STDMETHODCALLTYPE AddSelectionChangedEventHandler(
    _in IXRDelegate<XRSelectionChangedEventArgs>* pDelegate
) = 0;

Parameters

  • pDelegate
    [in] Pointer to the IXRDelegate<ArgType, [SenderType]> object that you want to attach to the SelectionChanged event, which is raised when the selected item changes.

Return Value

Returns an HRESULT that indicates success or failure.

Returns XR_E_INVALID_OBJECT if pDelegate is not a XAML for Windows Embedded object.

Remarks

When the selector object raises the SelectionChanged event, the event subsystem invokes the attached delegate.

Multiple delegates can be attached to the same event.

The ArgTypeXRSelectionChangedEventArgs structure stores data for a SelectionChanged event that has been raised.

To remove this delegate from the SelectionChanged event, call IXRSelector::RemoveSelectionChangedEventHandler.

.NET Framework Equivalent

None.

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRSelector
XRSelectionChangedEventArgs