Loading Pictures in OPEN / SHOWN in ContainerControls

A short question to WebContainerControls:

I using a WebContainerControl, that I repeat 200 times. In this CC is a picture, which I load via http://

When I add this ContainerControl to the OPEN Event of the window, everything works.
When I add this ContainerControl to the SHOWN Event of the window, many pictures are missing.

I copyed the code via copy & paste, so it is the same source code. Why didn’t the SHOWN event load every picture?

Where you are adding the picture, in the Shown event of the page or in the Shown event of the container?

Adding the picture in the Shown event of the page is problematic because you are not sure that the container is ready or, better, that the picture control (webimageview) is ready.
The webimageview is ready when the first PictureChangedEvent gets raised.

My suggestion is to add a computed property to the container where you can set the picture url.
Then in the container keep track of the PictureChangedEvent and load the picture only after that this event gets generated.

Doing this you can set the picture url at any time: the container will be responsible to show the picture when this can be done safely.

Best regards.

THANK YOU! That was the perfect solution! So happy! Thank you!