alkampfer on August 31st, 2010

I work with WebBrowser control in WPF, and one of the most annoying problem I have with it, is that sometimes you browse sites that raise a lot of javascript errors and the control become unusable. Thanks to my friend Marco Campi, yesterday I solved the problem. Marco pointed me a link that does not [...]

Continue reading about Disable Javascript error in WPF WebBrowser control

alkampfer on July 23rd, 2010

The situation is the following: I have a class that has a Status property of type SingleAnalysisStatus enum, and I want to show a different png image, based on the status of the object.
The solution is to write a custom IValueConverter that convert from the enum to a valid resource file, but we need to [...]

Continue reading about Bind an Image to a property in WPF

alkampfer on April 29th, 2010

WPF is a completely new stuff respect to winform, and sometimes you can get surprised by its behaviour. Today I had a bug in a simple application, it seems that closing and opening a form, data is persisted between instances, and it seems that a dependency property is behaving like static variable. This is the [...]

Continue reading about WPF and Dependency property default objects

alkampfer on August 17th, 2009

In the first part I showed how to validate an entire object with the help of BindingGroup class, now I want to extend the discussion to handle a typical problem that arise with it. Suppose your business object has a property of type Int32, and you bind this property to a standard textbox, what happens [...]

Continue reading about Validate Business Entities with WPF – Take 2

alkampfer on August 14th, 2009

With Guardian we were investigating about a strategy to validate business entities in a project we work into. You can find a lot of examples around the web on how to use validators, but most of them deal with basic textbox, and property validation stuff. What we need is the ability to use a validation [...]

Continue reading about Validate Business Entities with WPF