Ich habe folgende in meinen Benutzereinstellungen innerhalb eines WPF MVVM App:Warum wird Properties.Settings.Default.PropertyChanged nicht ausgelöst?
namespace MyApp.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::System.Collections.ObjectModel.ObservableCollection<MyApp.Models.MyItem> MyItems {
get {
return ((global::System.Collections.ObjectModel.ObservableCollection<MyApp.Models.MyItem>)(this["MyItems"]));
}
set {
this["MyItems"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string TestSetting {
get {
return ((string)(this["TestSetting"]));
}
set {
this["TestSetting"] = value;
}
}
}
}
Wenn der Wert in TestSetting
ändert, wird das Ereignis Properties.Settings.Default.PropertyChanged
gefeuert, aber wenn ein MyItem
innerhalb MyItems
ändert, wird dieses Ereignis nicht ausgelöst .
Wie kann ich dieses Ereignis auslösen?