I'm so happy to find out about Rich Strahl's post on how to get the items within a data template that is data-bound to, say, a list box.
It turns out the only way to get an item inside a data template is to programmatically go into the UI hierarchy of the template... not elegant at all!
Thursday, June 28, 2007
Subscribe to:
Post Comments (Atom)
Blog Archive
-
►
2007
(12)
-
►
June
(9)
- WPF: getting a data-bound data template and the it...
- The best tutorial about data binding in WPF
- Day of Silence
- LearnWPF.com
- The correct way to repaint a form or control in c#...
- Postable: convert codes to make them show up prope...
- Obtaining mouse x and y coordinates from a Windows...
- Windows Message Handling, in C#
- Dealing with my clutter
-
►
June
(9)
1 comments:
It's not the only way... For one thing if you have the collection the control is bound against you don't need to go into the control at all (which you should have). Also you can bind your objects to commands or events and get access to them as a result of that command or event firing. Also some controls will offer a "selected value" property to get the data object of currently selected items.
Post a Comment