I don't know if I really got exactly what you are trying but if I'm right you have the following:
1. structure called "User" with some properties (let's say in this case "username" and "password")
2. List<User> which is set to ItemsSource of ListBox.
And now you want to bind the "username" property to the checkbox content, right? Then you only have to set your binding to this property in your DataTemplate:
meykih
Participant
1049 Points
260 Posts
Re: Custom control : databound ListBox with checkboxes
Jan 07, 2009 07:34 AM | LINK
Hi RomainP,
I don't know if I really got exactly what you are trying but if I'm right you have the following:
1. structure called "User" with some properties (let's say in this case "username" and "password")
2. List<User> which is set to ItemsSource of ListBox.
And now you want to bind the "username" property to the checkbox content, right? Then you only have to set your binding to this property in your DataTemplate:
Maike Ohlig
Please mark post as answer if it helped you