-api-id | -api-type |
---|---|
E:Windows.UI.Xaml.Media.ImageBrush.ImageOpened |
winrt event |
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.
<ImageBrush ImageOpened="eventhandler"/>
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.