private void UpdateAccountsSeriesOfNumbersComponentSource(AccountsSeriesOfNumbersComponent newItem, AccountsSeriesOfNumbersComponent oldItem) { if (oldItem != null) { oldItem.Change -= AccountsSeriesOfNumbersComponent_Change; BindingOperations.ClearBinding(oldItem, AccountsSeriesOfNumbersComponent.AccountProperty); BindingOperations.ClearBinding(oldItem, AbstractComponent.IsActiveProperty); DependencyPropertyDescriptor.FromProperty(AbstractComponent.ReadOnlyIsLoadedProperty, newItem.GetType()) .RemoveValueChanged(oldItem, AccountsSeriesOfNumbersComponent_IsLoadedChanged); } localCollection.Clear(); if (newItem != null) { localCollection.AddRange(newItem.AccountSeriesOfNumbersRecords); newItem.Change += AccountsSeriesOfNumbersComponent_Change; var accountBinding = new Binding() { Source = this, Path = new PropertyPath(AccountProperty.Name), Mode = BindingMode.OneWay, UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged }; var isActiveBinding = new Binding() { Source = this, Path = new PropertyPath(IsActiveProperty.Name), Mode = BindingMode.OneWay, UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged }; BindingOperations.SetBinding(newItem, AccountsSeriesOfNumbersComponent.AccountProperty, accountBinding); BindingOperations.SetBinding(newItem, AbstractComponent.IsActiveProperty, isActiveBinding); DependencyPropertyDescriptor.FromProperty(AbstractComponent.ReadOnlyIsLoadedProperty, newItem.GetType()) .AddValueChanged(newItem, AccountsSeriesOfNumbersComponent_IsLoadedChanged); this.IsBusy = !AccountsSeriesOfNumbersComponent.IsLoaded; } }
private void UpdateAccountsSeriesOfNumbersComponentSource(AccountsSeriesOfNumbersComponent newComponent) { }