Tag: Behavior

Throttling Immediate TextBox Binding Behavior for Windows Phone

The learning curve of a Windows Phone developer While developing Offline Web Browser for Windows Phone i had to build a small MVVM framework in order to keep the logic out of the views. One of the first thing i found missing was a way to force immediate propagation of text entered in TextBox control to the databound property of my ViewModel. By default, TextBox binding is triggered only when control loses focus, and this is kind of lame. Code reuse is not a myth! This is really old problem. It existed in desktop Silverlight from the beginning. And it Read More

Binding UI Events from View to commands in ViewModel in Silverlight 4

In previous two posts we covered wiring up the Views and ViewModels and Blendability and showing ModalDialogs in MVVM way. Today we will touch another problem that people starting with MVVM very often fail to address properly: Handling the UI Events of the View in the ViewModel while avoiding placing any logic in code behind of the View. So our design goals for this post are: We want to be able to wire-up UI Events to the commands in ViewModel via DataBinding in Xaml without any code behind in the View View should not be aware of the ViewModel’s type Read More