IXRImageBrush::AddImageFailedEventHandler (Windows Embedded CE 6.0)
1/6/2010
This method attaches a delegate to the ImageFailed event for this image brush. When the ImageFailed event is raised by this image brush, this delegate will be invoked.
Syntax
virtual HRESULT STDMETHODCALLTYPE AddImageFailedEventHandler(
IXRDelegate<XREventArgs>* pDelegate
)= 0;
Parameters
pDelegate
[in] IXRDelegate<ArgType> object that you want to attach to the ImageFailed event, which occurs when there is an error associated with image retrieval or image format.The CreateDelegate helper 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
Conditions that can trigger the ImageFailed event include the following:
- File not found.
- Invalid (unrecognized or unsupported) file format.
- Unknown file format decoding error after upload.
The ImageFailed event can occur if the initial source attribute value in the source XAML or the value set by IXRImageBrush::SetImageSource is invalid.
Multiple delegates can be attached to the same event.
To remove this delegate from the ImageFailed event, call IXRImageBrush::RemoveImageFailedEventHandler.
.NET Framework Equivalent
None.
Requirements
Header | XamlRuntime.h |
sysgen | SYSGEN_XAML_RUNTIME |
Windows Embedded CE | Windows Embedded CE 6.0 R3 |