Windowscommunitytoolkit: ImageEx animation issues

Created on 20 Aug 2016  路  15Comments  路  Source: windows-toolkit/WindowsCommunityToolkit

There are 2 issues currently:

  1. It shows animation even without placeholder. I would expect it directly show the image when there's no placeholder defined.
  2. The PlaceholderAnimationDuration property doesn't work. It looks like DoubleAnimation.Duration can't be bind with; and also line 54 in ImageEx.Placeholder.cs, should be default(Duration) instead of TimeSpace.Zero.
bug controls

All 15 comments

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

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hermitdave picture hermitdave  路  58Comments

markti picture markti  路  65Comments

HesamKashefi picture HesamKashefi  路  54Comments

hermitdave picture hermitdave  路  78Comments

deltakosh picture deltakosh  路  34Comments