Tags
I read something interesting on Scott Hanselman's blog the other day regarding WPF. It was in relation to activating and dis-activating some controls based on the value of other ones. And I "quote": ![]()
His proposed solution is taking advantage of WPF's extremely powerful binding capabilities. I "quote" again:
He's happy with that. I'm not! He's putting business logic inside the view. And it scares me to see things like this because it tends to non-testable and "obscure" problems.
WPF binding is very powerful and it should be possible to use static methods of static classes in order to separate the business logic from the view. I guess he just wanted a brief XAML example. But I agree, I am not a big fan of "XAML-apps" either.
There’s no need for static classes. As long as you set the DataContext appropriately that’s enough.