views:

156

answers:

1

With Adobe Flex I would create a custom ItemRenderer to change the display of items in a grid. This executes some code that overrides how the grid control renders items. How do I do this with WPF? What are the performance implications with the techniques available?

My initial aim is to display an icon, a title, and a description. Ideally the description would be under the title. A similar UI is used by the Vista TaskDialog buttons.

+2  A: 

Use Data Template. You can set it for ItemTemplate (ListBox), CellTemplate (GridViewColumn), HeaderTemplate, etc.

Performance depends on how complex the template is, but for what you described, you should not notice a difference.

Sergey Aldoukhov