Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top