WPF Binding Expression Alternatives

Philipp Sumi creates a custom binding/markup extension with an example where he’s added a “lookup” key to the text field.

A base class for custom WPF binding markup extensions

Nigel Spencer writes some code which allows him to attribute a data class with validation rules such as maximum length. I like the style of putting some basic data rules on the data object rather than spreading the rules around the user interface.

Applying MetaData to WPF Bindings

This style would require diligence on the part of the developer and UI designer to be certain that all of the various input methods (controls) are covered, and that the markup extension is used consistently.

I’d like to see a solution which didn’t rely on a custom markup extension if possible. Maybe an attached property or something … (my style is to try to use built-in stuff as much as possible for training, learn-ability, tool support, etc).

Dead Weight APIs?

What’s the Perfect API?

I came across this by complete chance this afternoon… from Jon Skeet, “Critical dead-weight.”

“We’re all familiar with the idea of a technology achieving critical mass: having enough users (subscribers, customers, whatever the appropriate metric might be) to keep it alive and useful. This morning I was considering the idea of critical dead-weight: having enough users etc to keep the technology alive long past its natural lifetime.”

Related to the top of APIs:

“Old APIs (in Windows, Java etc): I personally feel that many vocal critics of Windows don’t take the time to appreciate how hard it is to maintain backwards compatibility to the level that Microsoft manages. This is not to say they do a perfect job, but I understand it’s a pretty nightmarish task to design a new OS when you’re so constrained by history. (I’ve read rumours that Windows 7 will tackle backward compatibility in a very different way, meaning that to run fully natively vendors will have to recompile. I guess this is similar to how Apple managed OS X, but I don’t know any details or even whether the rumours are accurate.) Similarly Java has hundreds or thousands of deprecated methods now – and .NET has plenty, too. At least there is a road towards planned obsolescence on both platforms, but it takes a long time to reach fruition. (How many of the deprecated Java APIs have actually been removed?)”

He mentions SMTP as a technology that he might like to kill. I doubt it will go away any time soon – as there are too many systems depending on it today. The most likely thing to happen is that it’s replaced with something better, slowly. That technology/API/protocol becomes popular enough to displace SMTP.

What are your favorite .NET/C# coding sites?

If you’re hunting for source code to solve a problem, what sites do you trust the most? Please add comments with your suggestions!

I’ve created a Google Custom search specifically for .NET related topics to help me cut down the signal to noise ratio that continues to increase on the web, but I’d like to hear what sites you value the most.

The custom search is here: http://www.wiredprairie.us/search. I’ve intentionally kept the page small/lightweight to keep the page load time extremely fast.