public SettingValue(PropertyStoreAdapter propertyStore, string name, object defaultValue, DependencyObject target) { this.propertyStore = propertyStore; this.name = name; this.defaultValue = defaultValue; this.context = PersistentProperty.GetIdPath(target); PersistentProperty.AddIDPathChangedEventHandler(target, this.ContextChanged); this.value = this.GetProperty(); this.value.PropertyChanged += this.ValueChanged; }
private void SetValue(PropertyAdapter value) { this.value.PropertyChanged -= this.ValueChanged; this.value = value; this.value.PropertyChanged += this.ValueChanged; }