DataTemplate with button in wp7 silverlight
I writing wp7 silverlight app. I have a listbox with items. I want each item to have different DataTemplate. I'm using OnContentChanged event and read the template to the ContentTemplate. My problem is with buttons on the tem开发者_JS百科plate. On runtime the buttons event handler is not found, and I get exception. What can I do?
The easiest way to do this (to have different DataTemplate for each item) is to implement some kind of DataTemplateSelector.
精彩评论