However, although the application The program takes time to download, but the image control does not display any content. This kind of user experience is not good.
How to load placeholder images or load meters for each image control?
If you need to minimize your visual tree, and your scenario allows code solutions, then Mick’s suggestion is a good suggestion. This suggestion is not perfect, but it is more It is easy to handle the situation where your placeholder image is not scaled/centered but the loaded image is scaled/stretched.
I have an application that displays a list of images. Images The source is set to http URL, the image will be downloaded and displayed automatically.
However, although the application takes time to download, the image control does not display any content. This user experience is not good.
/p>
How to display a load placeholder image or load meter for each image control?
When the image is loaded, it will be drawn transparently. You can use this feature to display elements below the image when the image is loaded. For example, you can have The stock image bundled with XAP, for example, represents the default avatar. Or you can display the XAML loading animation. Then, when the image is finished loading, it will obscure the elements behind it.
If you You need to minimize your visualization tree, and your scene allows code solutions, then Mick’s suggestion is a good suggestion. This suggestion is not perfect, but it does make it easier to deal with your placeholder images that are not scaled/centered But the loaded image is scaled/stretched.