Partager via


IXRVisualStateGroup::AddVisualStateChangedEventHandler (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

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

Parameters

  • pDelegate
    [in] IXRDelegate<ArgType> object that you want to attach to the VisualStateChanged event, which occurs when a control transitions into a different state.

    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

This event occurs after the control goes to a new state and after the VisualStateChanging event occurs.

Multiple delegates can be attached to the same event.

To remove this delegate from the VisualStateChanged event, call IXRVisualStateGroup::RemoveVisualStateChangedEventHandler.

.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::AddVisualStateChangingEventHandler
XRValueChangedEventArgs<_ValueType>

Concepts

Handle Events in Silverlight for Windows Embedded