Talk:How to control an animation in XAML and in the code in your Windows Phone app
Hamishwillee - Not sure this says enough
Firstly, one minor technical point - you haven't defined what you mean by static or dynamic. As all animations are necessarily dynamic in terms of "they show movement" this is something you need to define in the section. Perhaps "Animation defined purely in XAML" instead of "static" and "Animation with parameters set in code" rather than dynamic for the heading names?
Also, one thing that no one seems to cover is how you link to XAML from the code. It appears to be that any property named in XAML using x:Name="doubleAnimation" can just be called in C# - is that correct? How does the CSharp file know which XAML file you're talking about, or must the names all be unique across all XAML in a project?
In terms of improvement, it would be good if you minimally provided a written explanation of the relationship between StoryBoard, Timeline and the target object - ie "how the bits of the definition fit together". I worked this out, but it is not immediately obvious.
Lastly, this seems a bit of a wasted opportunity. There are plenty of articles around that cover basic animation like this one, and I'm not sure that this "adds value" over them. For example, I learned "something" from http://www.windowsphonegeek.com/articles/WP7-Animations-in-depthndash-Overview-and-Getting-Started , http://www.jeffblankenburg.com/2010/10/29/31-days-of-windows-phone-day-29-animations/ and http://www.codeproject.com/Articles/153455/Windows-Phone-7-Animations-Alternatives-Performanc . These cover a bit more of the theory, although they are by means perfect.
What appears to be missing from the literature (and why I call this a lost opportunity) is a really good guide showing the theory of animations. This would start (as I suggested for this one) by covering the relationship between StoryBoard, Timeline, and how this links to the target object. However it would go on to cover creating animation in code, the importance of and using behaviours - e.g. animation, conditional, data, motion, triggers. Lastly, someting on working with expression blend and animations. Perhaps I'm just greedy.
09:48, 17 September 2012 (EEST)
ArchieCoder - New article name
You're totally right about the article name, I changed it to a more appropriate name. I agree this is a wasted opportunity here, but the animation topic is big enough to write a book :)
Concerning the "doubleAnimation", it was written: "There is one addition of the x:Name=”doubleAnimation” which will help to control the animation in the code behind." so to make it more easy to understand, I added: "The "doubleAnimation" object will be available within the code behind of the page:"
12:05, 17 September 2012 (EEST)
Hamishwillee - Subedited
You're welcome. Thanks for your updates. I've subedited and extended them a bit to meet my "recommended minimum"
- now I think its a bit clearer the relationship between storyboard, animation, target object, and its properties.
- Added a SeeAlso with links to the best guide material on the topic on MSDN
Please check that this is still correct.
regards HPS In the devices section of the ArticleMetaData, in future please list specific devices you actually tested against - e.g. Lumia 800, rather than "All devices". In theory they should be the same thing, but this helps people if they run into issues that do appear to be device specific.
05:31, 18 September 2012 (EEST)
ArchieCoder - "See also" section
Thank you for the update, I didn't know that we can add links in the "See also" section. I'll take note about the "All devices".ArchieCoder
15:22, 18 September 2012 (EEST)