Monday, July 04, 2011

WPF 4's DataGrid - bound template columns, anybody?

I recently had occasion to use the WPF DataGrid component introduced in .NET 4. And here's something really stupid: all the built-in primitive column types (text, checkbox etc.) derive from a DataGridBoundColumn base type. This allows you to specify a binding for the cell content - very logical and WPFy.

The DataGridTemplateColumn is the sole exception. I reflected the code and noticed that they're using a ContentControl internally to present the cell - so how hard would it be to simply apply the binding to the Content property? I'll tell you how hard - it's one line of code.

It's seems like they've done more work and added an extra base class simply to make the template column less useful.


Labels: , , , ,


Anonymous Anonymous said...

It's a two year degree program, usually divided into five semesters. Finding the right massage therapist can sometimes be a tough search. The school or university should have what is called the Commission on Accreditation in Physical Therapy Education (CAPTE).
Also visit my web blog ... Psychotherapy For dummies

12:02 AM  
Anonymous Anonymous said...

That said, the primary goal of search engine optimization is to get suggestions from
other online businessmen or pals who have experienced hiring an spamdexing company in India has its own advantages
and disadvantages.

Here is my blog ... search engine optimisation firm

11:13 PM  

Post a Comment

<< Home