I kind of want to make a game.... so I want able to dynamically to add a data object to the Canvas and is dispaly it.
i.e) 1) a Car object, contains the car information, when it binds to the Canvas, I want to display it as a UserControl (contains some graphic).
2) When the car object display display/add/remove to the Canvas, it should do some animation.
So there is 3 questions:
- Is it possible to binds to Canvas directly to do things I describe above?
- Is it better I just do it in programmatic way in the code-behind?
- How do such thing in MVVM? If my Car collection objects is in my ViewModel, the only way I can do is binds that to the View? Then if I want to let the car do some animation when user press some key, how can I interact with the View using my ViewModel?
Some suggestion will be appreciated :)