Almost all articles on WPF and validation focus first on ValidationRules, and then continue telling you why IDataErrorInfo is better. A few go on and show you how to combine IDataErrorInfo with DataAnnotations. While these last two are definitely good options, they’re a little heavy for a very simple application. In my case: call a server, show the data (about 20 textboxes), send back to the server. Nothing fancy, I’m even databinding to my datacontract (gasp!), although I’m sending back
Tag: WPF
Well, I’ve switched databases again. After briefly trying NHibernate, then switching to RavenDB, then looking at Karvonite, I think I’ve found what I was looking for in Sterling. I was looking for an easy way to persist objects. NHibernate is nice, but compared to object-oriented databases, it’s a lot of work (database schema’s, mapping files, etc.). RavenDB introducted me to the NoSql alternatives, but has a high licensing fee and is a little to heavy for my needs. Karvonite was
WPF creates a whole new range of possibilities, but you can often run into trouble when trying to combine it with NHibernate. NHibernate can’t handle ObservableCollections*, which is a quite handy feature of WPF. Furthermore, what to do with the good databinding capabilities of WPF?Shawn Duggan provides a nice solution using the **Model-View-ViewModel **pattern here. Check out this recent article by Josh Smith for a good introduction of the MVVM design pattern (with an easy-to-follow example). it is possible to
I’m a fan of the MVP design pattern, so databinding isn’t something I would use very often, but I have found a use for it in WPF. It is very easy to databind one Control to the other. This gives us some interesting possibilities. For a standard example, check out this screencast. What I want to show here is how you can extend this with ValueConverters. In a project of mine, I needed to show a control depending on the