The Ins and Outs of IDataErrorInfo and WPF Binding

While implementing the business rules to check object validity, I used IDataErrorInfo and Binding.ValidatesOnDataErrors=true to get the validation information to the user. In some cases I noticed that the WPF Binding didn’t realize that the errors on an object changed. Quickly it became clear that WPF is only checking the IDataErrorInfo when setting or retrieving a value. Which doesn’t happen for a specific property, if a different property, that has influence on the validity of the former property, changes. In retrospect quite obvious. The solution was to implement INotifyPropertyChanged and trigger Changed events for all affected properties. I’ve coded a little demo application to show the problem and showcase the solution: Test application screenshot The screenshot shows the test app after trying to trigger validation errors on different implementations by changing the illegal value to the input value. Only the INotifyPropertyChanged with additional notifications (on the lower right) detects the invalid value. Download the solution archive.

dasZ.at

dasZ.at - the people behind ZBox.
dasZ.at Logo

Downloads

The lateset download will be available here - soon

Lastet blog

In our blog we talk about the latest developments around our tool ZBox.
>> Blog

Latest blog entries
>> Reference project: Implementing WordPress-based Website

Based on the reference design provided by Sabine herself, we implemented the zartbitter Website. The site is powered by the PHP-based WordPress blog and CMS engine, some additional plugins and a bit of yarn to hold it all together.


>> Setting a permanent search_path, the Right Way

Others recommend setting the search_path in the postgresql.conf. Current versions of PostgreSQL can set the search_path permanently on a per-database basis without having to touch system configuration files


>> Porting Puppet to Windows

In the course of the PuppetCamp Europe, I met with many people I only knew from IRC and email and it was a great time with interesting and inspiring discussions.

Today I want to write about the work I’m currently commisioned for by puppetlabs, porting puppet to Microsoft Windows.


>> Puppetcamp Europe 2010

I’m going to Puppetcamp Europe 2010!


>> Using gendarme with Code Contracts from .NET 4.0

When using gendarme on post-processed assemblies with code contracts and /throwonfailure set, a few things have to be ignored. Put the following lines into your ignore file (for example gendarmeignore.txt) and use it with –ignore on the command line.


>> Microsoft cannot decode Base64: News at 11!

Arthur has found a really nasty bug in Microsoft’s streaming Base64 decoder as used in the WCF: Connect Bug#541494


>> Kolab Connector binaries uploaded

Arthur moved on with programming and testing. Now we uploaded the first packages, which now contain the basic calendar and contacts synchronisation. The plugins already are able to synchronize our personal data.


>> Kolab Sync for Android and Outlook: Developer Preview

We are proud to announce the first developer preview for Kolab sync clients for both Android and Outlook. Both are licensed under the GPLv3.


>> Visual Studio 2008 Debugger

I didn’t know that: the VS2008 debugger has many bugs. Specifically, if you have a solution with multiple websites, debugging doesn’t work!

Symptom: Upon reaching a breakpoint, StepOver/Into do not work, but resume execution. This makes the debugger pretty pointless.


>> Building a simple MSBuild Task

On the “Using Studio’s “Custom Tool” in MSBuild” question, I was prompted to share the code. Here is a stripped down skeleton where I removed the actual calls to the custom tool. Since it is open source I didn’t really need to access the Visual Studio’s registry keys.