wpf - Use KeyTime value as resource -
i have storyboard:
<storyboard x:key="st1"> <doubleanimationusingkeyframes storyboard.targetproperty="(uielement.opacity)" storyboard.targetname="imageblue"> <easingdoublekeyframe keytime="0:0:0.5" value="0"/> </doubleanimationusingkeyframes> </storyboard> i extract keytime value , place somewhere. in other words been trying make work:
<usercontrol.resources> <sys:timespan x:key="fadeinbegintime">0:0:2</sys:timespan> <duration x:key="fadeinduration">0:0:1</duration> <storyboard x:key="st1"> <doubleanimationusingkeyframes storyboard.targetproperty="(uielement.opacity)" storyboard.targetname="imageblue"> <easingdoublekeyframe keytime={staticresource fadeinduration}" value="0"/> </doubleanimationusingkeyframes> </storyboard> </usercontrol.resources> note using namespace:
xmlns:sys="clr-namespace:system;assembly=mscorlib" for reason not work
you should specify fadeinduration keytime not timespan
i.e:
<keytime x:key="fadeinbegintime">0:0:2.0</keytime>
Comments
Post a Comment