I think I finally found one type of answer here:

 

http://social.msdn.microsoft.com/Forums/en/wpf/thread/373f3f8c-0487-44c6-abe
3-ea4c30259414

 

This listens for Click events from the template child controls and then
casts it back to the original DataContext from where you can get the bound
item (a DataRow in my case). There are probably more elegant ways that use
Command binding and a parameter of RelativeSource and FindAncestor, but it's
to ornate for me right now.

 

I saw a developer's comment on a web site a few days ago where he said
something like "Sure, WPF gives you complete control, but then you have to
control everything". That's exactly how I feel about WPF, Silverlight, XAML
and binding. If you want to do simple things, then you can usually do them
very simply and quickly, but as soon as your needs grow, you can spend half
your working life web searching for tutorials and workarounds.

 

Greg

Reply via email to