0
I have a button to which is associated an image loaded from a Resourcedictionary. In XAML I carry them like this:
<Button x:Name="selecao" Grid.Row="1" Grid.Column="2" Margin="10" Click="selecao_Click">
<Image x:Name="img" Source = "{StaticResource inverno}"/>
</Button>
In code-Behind I change it like this:
private void mudarImagem(int i)
{
switch (currentImage)
{
case 0: img.Source = (BitmapImage)Application.Current.Resources["inverno"]; break;
case 1: img.Source = (BitmapImage)Application.Current.Resources["primavera"]; break;
case 2: img.Source = (BitmapImage)Application.Current.Resources["verao"]; break;
case 3: img.Source = (BitmapImage)Application.Current.Resources["outono"]; break;
}
}
It is possible to apply a "slide" transition effect when moving from one image to the other?
I don’t know if I explained myself!
– gtpt
I know how to change the image ... but I want it to come with transitional effects.
– gtpt