This project has moved. For the latest updates, please go here.

CheckListBox. The right technique to set IsChecked property.

Aug 20, 2012 at 7:51 AM
Edited Aug 20, 2012 at 7:59 AM

I tried to set IsChecked through different approaches, but unfortunately without success. 

The only one approach became good for me is to use ItemContainerGenerator

if (item.Visibility == Visibility.Visible)
  {

     var cont=(SelectorItem)ChLst.ItemContainerGenerator.ContainerFromItem(item);
     var cb = Helper.FindVisualChild<CheckBox>(cont);
     if (cb != null) cb.IsChecked = true;
  }
My question is How to use SelectedMemberPath in a right way. It seems to be that SelectedValue,SelectedItem properties interfere with SelectedMemberPath property somehow.