Fumiaki had a go at refactoring the XAML analog clock and tried to use a MVC design approach. He didn’t like that I was using 3 timelines, and came up with a pretty ingenious solution, something I didn’t think of. He switched the hands of the clock from paths to a line, and then binds them to a clock class (the Model) that he created. Pretty nifty solution, but it totally removes the benefits of using declarative animation. It is a very hard concept to get your head around, so if you haven’t fully grokked it yet, you may want to check out Fumiaki’s solution, and compare the 2. It would be a great way to learn about both styles. The other problem is that because he couldn’t bind to the transformation elements, he had to switch from a path to a line (see my article on why I used a path), and redraw the line every time there is an update.
Overall, I wouldn’t suggest using this approach in this situation, and I think the MVC mentality is the problem here since it collides with the declarative model. I agree that the 3 timelines running in parallel is not the most technically correct, and could be done using 3 nested timelines, which is a bit more correct. The one thing that I would like to do to upgrade the clock is have the second hand move every second, instead of a continuous sweeping motion, and add the sound of a tick (to make it even more like a pendulum clock).
DonXML Demsak