Hi Folks, I’m trying to accomplish a CrossFade effect when changing Src of an Image.
I Figure out with the following solution, but I don’t know if is a good approach.
<PageControl ux:Name="pageControl">
<Each Items="{items}">
<Panel>
<PageText Title="{Title}" Content="{Content}" UserName="{UserName}" />
<Match Value="{Alter}">
<Case Number="0">
<ActivatingAnimation>
<Change bgImage.Url="{Url}" />
<Change bgImage.Opacity="1" Duration="4"/>
<Change overlay.Color="{Color}" Duration="4"/>
</ActivatingAnimation>
</Case>
<Case Number="1">
<ActivatingAnimation>
<Change bgImage2.Url="{Url}" />
<Change bgImage2.Opacity="1" Duration="4"/>
<Change overlay.Color="{Color}" Duration="4"/>
</ActivatingAnimation>
</Case>
</Match>
</Panel>
</Each>
</PageControl>
<Image StretchMode="UniformToFill" Opacity="0" ux:Name="bgImage">
<Desaturate Amount="0.5" />
</Image>
<Image StretchMode="UniformToFill" Opacity="0" ux:Name="bgImage2">
<Desaturate Amount="0.5" />
</Image>
I’m controlling if i’ll render the image in the Img1 or Img2 by a property in my json…
Is a cleaner way to do this?
Thanks,