绑定复选框状态不会触发 OnPropertyChanged

Bound checkbox state doesn't fire OnPropertyChanged

我有一个像这样绑定的复选框列表。

<ListBox ItemsSource="{Binding AllThings}">
  <ListBox.ItemTemplate>
    <DataTemplate>
      <CheckBox Content="{Binding Name}"
                IsChecked="{Binding Active,Mode=TwoWay}"
                Checked="ToggleButton_OnChecked"
                Unchecked="ToggleButton_OnUnchecked"/>
    </DataTemplate>
  </ListBox.ItemTemplate>
</ListBox>

绑定是单向的,因为我可以看到这些框 checked/unchecked 根据我一开始的设置。我期待选中一个框来更新底层视图模型,但它没有发生。 OnPropertyChanged 上设置的断点未命中。我怀疑这与我正在改变 属性 内部 观察到的 属性 这一事实有关,但由于无知,我不确定。

class Presenter : INotifyPropertyChanged
{
  private IEnumerable<Something> _allThings;
  public IEnumerable<Something> AllThings
  {
    get { return _allThings; }
    set
    {
      _allThings = value;
      OnPropertyChanged("AllThings");
    }
  }

  public Presenter()
  {
    _allThings = DataAccessor.GetThings();
  }

  public event PropertyChangedEventHandler PropertyChanged;

  [NotifyPropertyChangedInvocator]
  protected virtual void OnPropertyChanged(
    [CallerMemberName] String propertyName = null)
  {
    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  }
}

我能在这里遗漏什么?

据我所知,我正在做 精确地 as this guy suggests。显然我错过了一些东西,但它超出了我的范围......

编辑

应@Clemens 的要求,我还在 Soomething class.

中实现了接口
public class Something :INotifyPropertyChanged
{
  public int Id { get; set; }
  public String Name { get; set; }
  public bool Active { get; set; }

  public override String ToString()
  {
    return Name;
  }

  public event PropertyChangedEventHandler PropertyChanged;

  [NotifyPropertyChangedInvocator]
  protected virtual void OnPropertyChanged(
    [CallerMemberName] string propertyName = null)
  {
    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  }
}

class Something 必须实现 INotifyPropertyChanged 接口。这意味着除了写

public class Something : INotifyPropertyChanged
{
    public event PropertyChangedEventHandler PropertyChanged;
}

它还必须在 属性 值更改时实际引发 PropertyChanged 事件,例如:

private string name;
public string Name
{
    get { return name; }
    set
    {
        name = value;
        OnPropertyChanged();
    }
}