私は複合コレクションを持っています。コードビハインドからアイテムを変更した後、ビューを更新したいと思います。しかし、ビューに通知する方法がわかりません。を試してみましたINotifyCollectionChanged
が、うまくいきませんでした。
protected ObservableCollection<ScriptParameterComboItem> cItems
public virtual CompositeCollection CItems
{
get
{
return new CompositeCollection {new CollectionContainer {Collection = cItems}};
}
}
public void ConvertValue(params object[] parameters)
{
string newAverageOption = DisplayValueConverter.Convert(1, parameters);
var enumItem = cItems[1];
enumItem.Value = newAverageOption;
RaiseCollectionChanged("CItems");
}
protected void RaiseCollectionChanged(string property)
{
if(CollectionChanged != null)
CollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add));
}