c# - Cannot resolve TargetProperty when using StoryBoard in WinRT -


i trying set storyboard in code behind, exception thrown every time saying

"cannot resolve targetproperty (uielement.rendertransform).(compositetransform.scalex) on specified object."

here code:

image img = new image() { source = image.source, name="image"+i.tostring()}; var pointedstoryboard = new storyboard(); var doubleannimationx = new doubleanimation(); doubleannimationx.duration = timespan.frommilliseconds(500); doubleannimationx.to = 2; pointedstoryboard.children.add(doubleannimationx); storyboard.settarget(doubleannimationx, img); storyboard.settargetproperty(doubleannimationx, "(uielement.rendertransform).(compositetransform.scalex)"); 

i tried

storyboard.settargetname(doubleannimationx, "image" + i.tostring()); 

instead of

storyboard.settarget(doubleannimationx, img); 

but did work , don't know , thankful if me ! in advance .

you need add composite transform image first.

img.rendertransform = new compositetransform(); 

then should able reference it.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -