There are 2 issues currently:
1) I think showing an animation without placeholder is nice to have like all animations. I don't see any problems about it.
2) You're right it does not work at all. Because xaml binder can't cast integer value to TimeSpan. It needs to be converted first.
@bkaankose correct on number 1, we would want the animation regardless of placeholder being set.
In that case, what about while fixing the PlaceholderAnimationDuration issue, also rename it to something without Placeholder? Since for this property, if it works, it should also be able to set the duration when there's no placeholder, and if I don't want any animation (my case 1), I can just set it as 0.
@MullenStudio that doesn't sound unreasonable although would be a breaking change to remove it.
@ScottIsAFool Yes, I see it's a breaking change but on the other hand it looks like the property never works so far so maybe no so breaking as well.
It might not break any working functionality, but it would break compilations using that property
Is there someone working on a fix for 2. right now?
@deltakosh I got as far as creating a new branch for it locally, but no further right now.
I'll do it then :)
Ok this is interesting...It is not a conversion bug. But for some reasons, the PlaceholderAnimationDuration is not used at all by the VisualStateManager
@deltakosh are you sure? https://github.com/Microsoft/UWPCommunityToolkit/blob/dev/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageEx.xaml#L67-L82
DoubleAnimation.Duration is a Duration object, like the PlaceholderAnimationDuration
Seems that XAML does not allow me to template binding inside a VisualState
Yes, DoubleAnimation.Duration doesn't take template binding. I tried to fix it locally as well and find it's not a simple fix.
@MullenStudio If you don't want it to have any animation, then you can at least retemplate the control and remove the storyboards for the Loaded VisualState.