![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Animating databinding changes ? I was toying with WPF and doing some gratuitous effects, when I wondered if the following idea was possible. I display a card (e.g. think about an ID card) in a master/detail format. So when the user selects another person in the master list, the details on the ID card are automatically updated. So far so good, but what would be nice is to animate the change. I would like to flip the card, and when you see the back of the card it's the new data. Flipping the card in itself is easy, one can just use a transform. But what I can't figure out how to do, is to freeze the data. When you databind, any change apply immediately. In this scenario, I need to delay them: 1- keep the old data displayed and flip the card until the edge is in front of the user. 2 - now the user can't see the data anymore, so apply the new data. 3 - continue flipping the card, bringing the new data in view. I guess animating the transitions will become a common eye-candy with WPF. So I'm sure there should be a way, but I don't find it. Thanks, jods |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Animating databinding changes ? "jods" <jods@discussions.microsoft.com> wrote in message news 17E44F6-1F11-4DBB-9CF2-88FD7A552817@microsoft.com...>I was toying with WPF and doing some gratuitous effects, when I wondered if > the following idea was possible. > > I display a card (e.g. think about an ID card) in a master/detail format. > So > when the user selects another person in the master list, the details on > the > ID card are automatically updated. Have you tried the (IMHO) obvious ? I would split your animation in two. The first flips the card so that its back is shown. Then you change the databinding so that the UI is updated, but the user doesn't see it because they're looking at the back side. The second animation flips the card back so that the front side is shown again. This is coming from a Avalon-would-be-developer (i.e. haven't yet gotten around to actually getting my fingers dirty with it but I have watched all the sexy C9 interviews and demo's and I lurk in this newsgroup) so I may be just full of it. :-) |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Animating databinding changes ? Thanks for the suggestion. Of course this is something that I have considered. But it really feels like one step backwards. I love the simplicity and power of databinding in WPF. Somehow, launching an animation, intercepting one event mid-animation, then launching another animation feels a lot more awkward than it should. And there's one problem, which I don't know how to handle: What if there are several pieces of UI which I want to animate ? Let's imagine that I display 2 cards instead of one (e.g. ID and driver license). Now, one is maybe smaller than the other - or whatever - and maybe the moment where one should refresh the binding may not be the same. But if I change the current item in my CollectionView, all items will get refresh at the same time. I guess the best way would be to have some kind of "SuspendedBinding" property, which I could add in my Storyboard. Or maybe this was just a silly idea... it was pretty gratuitous anyway, just out of curiosity. Anyway, I would be interested if someone from the WPF team answers, this looks like the kind of useless candy that WPF was made to enable... ;-) |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Animating databinding changes ? Maybe you can use Binding.Converter which is called before data is put from/to source to/from target - there do the one half of the animation. Then in Binding.TargetUpdated event do the other one half of the animation... |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Animating databinding changes ? Hey, that sounds like an idea. Not too sure how it will work, but I will give it a try. Thanks! |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| windows photo gallery... gifs not animating. | Vista General | |||
| Aero icons stop animating | Vista performance & maintenance | |||