I have a View, linked to a ViewModel.
On the View, there is a Rectangle, which displays an image.
The ImageSource is Data-Bound to a property in the ViewModel.
When the property in the ViewModel changes the image, I would like to fade-out the existing image, and fade-in the new image.
Here’s some code:
<Rectangle RadiusX="1"
RadiusY="1"
Width="20"
Height="20"
Stroke="Black"
StrokeThickness="0.1"
Stretch="Uniform"
>
<Rectangle.Fill>
<ImageBrush ImageSource="{Binding ImageSource}"/>
</Rectangle.Fill>
</Rectangle>
Thank you, in advance for any suggestions.