ImageBrush.ImageOpened event

Applies to Windows and Windows Phone

Occurs when the image source is downloaded and decoded with no failure. You can use this event to determine the size of an image before rendering it.

Syntax


public event RoutedEventHandler ImageOpened


<ImageBrush ImageOpened="eventhandler"/>

Event information

Delegate RoutedEventHandler

Remarks

For the scenario of checking the size of an image before rendering, that info isn't part of the ImageOpened event data. Instead, the fact that the event fired is the notification that the PixelHeight and PixelWidth values of the image source (ImageSource value) are available.

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