There seem to be quite a few annoying cases where different objects have the same method (ie UIElement and Animatable both define "BeginAnimation").
Buttons now fade when mouse stops and instantly appear if it moves again. Buttons fade quickly if score starts playing. Buttons don't appear if playing (though I might need to review this). Time to hook up buttons (and get a sammich).
I worked on making a CommandBinding class that takes a source Command (as usual) but points to a target Command (such as a RelayCommand in the VM) rather than methods on the view. Since CommandBinding does not inherit from DependencyObject I had to use a child DependencyObject class to hold a bindable ICommand property. When the source command fires CanExecute, the new CommandBinding class handles it. On the first fire, it uses the event Source as a dataContext (the control that has the CommandBinding in its CommandBindings) and binds the new child DO object's Command property to the target Command. It then passes CanExecute/Execute calls straight through to that command.
Past bed time :/
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment