Partager via


IXRVisualStateGroup::AddVisualStateChangingEventHandler (Windows Embedded CE 6.0)

1/6/2010

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(
    IXRDelegate<XRValueChangedEventArgs<IXRVisualState *>>* pDelegate
)= 0;

Parameters

  • pDelegate
    [in] IXRDelegate<ArgType> 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 Silverlight 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
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

IXRVisualStateGroup
IXRVisualStateGroup::AddVisualStateChangedEventHandler
XRValueChangedEventArgs<_ValueType>

Concepts

Handle Events in Silverlight for Windows Embedded