Поделиться через


IXRVisualStateGroup::AddVisualStateChangingEventHandler (Compact 2013)

3/28/2014

This method attaches a delegate to the VisualStateChanging event for this visual-state group. When the VisualStateChanging event occurs, this delegate will be invoked.

Syntax

virtual HRESULT STDMETHODCALLTYPE AddVisualStateChangingEventHandler(
    __in IXRDelegate<XRValueChangedEventArgs<IXRVisualState *>>* pDelegate
)= 0;

Parameters

  • pDelegate
    [in] IXRDelegate<ArgType, [SenderType]> object that you want to attach to the VisualStateChanging event, which occurs when the control begins to transition states.

    The CreateDelegate function provides an easy way to create this IXRDelegate object.

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

If an IXRVisualTransition object is applied to the state change, this event occurs when the transition begins. If an IXRVisualTransition object is not applied, this event occurs after the control goes to the new state, before the VisualStateChanged event.

Multiple delegates can be attached to the same event.

To remove this delegate from the VisualStateChanging event, call IXRVisualStateGroup::RemoveVisualStateChangingEventHandler.

.NET Framework Equivalent

None.

Requirements

Header

XamlRuntime.h,
XRDelegate.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRVisualStateGroup
IXRVisualStateGroup::AddVisualStateChangedEventHandler
XRValueChangedEventArgs<_ValueType>