public EventViewModelWithEventHandlerMapperToInner() { Inner = new InnerViewModel1(); Command = new RelayCommand(_ => Inner.Publish()); _propertyChangedChangedEventHandlerMapper = new PropertyChangedEventHandlerMapper( handler => Inner.PropertyChanged += handler, handler => Inner.PropertyChanged -= handler, this); PropertyChanged += CallPropertyChanged; }
public EventViewModel() { Inner = new InnerViewModel1(); Command = new RelayCommand((_) => Inner.Publish()); Inner.PropertyChanged += (sender, args) => OnPropertyChanged(args.PropertyName); }