Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

  • meykih

    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:

    <CheckBox Content="{Binding Path=username}" IsChecked="false" />
     That should be working.
    Regards,
    Maike Ohlig

    Please mark post as answer if it helped you