Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ImageBrush.ImageFailed event

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 (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

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:
© 2015 Microsoft