ImageBrush.ImageFailed event

Applies to Windows and Windows Phone

Occurs when there is an error associated with image retrieval or format.

Syntax


public event ExceptionRoutedEventHandler ImageFailed


<ImageBrush ImageFailed="eventhandler"/>

Event information

Delegate ExceptionRoutedEventHandler

Remarks

If this event fires, that means that the ImageSource value has been asynchronously determined to not be available, or is not suitable for use. Conditions in which this event can occur include:

  • File not found
  • Invalid (unrecognized or unsupported) file format
  • Unknown file format decoding error after upload

An ImageBrush in this situation won't display anything. There is no default "missing image" placeholder image for app images as there might be when a browser can't resolve an image URI. If you want behavior like that you'll have to implement it.

ImageFailed and ImageOpened are mutually exclusive. One event or the other will always file whenever an ImageBrush has the ImageSource value set or reset.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Media
Windows::UI::Xaml::Media [C++]

Metadata

Windows.winmd

See also

ImageBrush

 

 

Show:
© 2014 Microsoft