Feed on
Posts
Comments

I teach a lot of WPF classes. During each class there comes a moment, usually on the third or fourth day, when the questions change and a sense of excitement rises in the room.  Suddenly all the pieces come together in the students mind; the dependency system, data binding and data templates, styles, control templates and everything else they’ve seen during the week.

taiko6

The drums start pounding…

“I feel the power of WPF.”

A chant soars though out the room…

“I feel the power of WPF.”

I can see it in their eyes….

“I feel the power of WPF.”

I can hear it in their voices…

 “I feel the power of WPF.”

Clap, clap, clap

Clap, clap, clap, clap…

“I feel the power of WPF.”

Clap, clap, clap…

“I feel the power of WPF.”

 

 

 

 

 

 

Reality fights back

OK. that was a bit of a stretch but the point is valid. 

At some point when learning WPF you realize how flexible and powerful  the framework is, and it opens your mind to the new possibilities.  Here’s a simple example. One of the surprising areas in WPF is the limitless ways to restyle the lowly ListBox.

Listboxes in WPF are different

Items Controls are the basis of all list controls in WPF.  Dr. WPF has a great series about ItemsControls which is very helpful in learning about this powerful set of controls.

ListBox Control Template example

Here’s a interesting example of the drastic extent you can change the appearance of the ListBox. This map of the U.S.A is really a ListBox.

http://richapps.wordpress.com/2009/02/12/advanced-styling-wpf/#

image

One Response to “Feel the Power of WPF ListBox Templates”