public EventViewModelWithEventHandlerMapperToInner()
        {
            Inner   = new InnerViewModel1();
            Command = new RelayCommand(_ => Inner.Publish());

            _propertyChangedChangedEventHandlerMapper = new PropertyChangedEventHandlerMapper(
                handler => Inner.PropertyChanged     += handler,
                handler => Inner.PropertyChanged     -= handler,
                this);

            PropertyChanged += CallPropertyChanged;
        }
예제 #2
0
 public EventViewModel()
 {
     Inner   = new InnerViewModel1();
     Command = new RelayCommand((_) => Inner.Publish());
     Inner.PropertyChanged += (sender, args) => OnPropertyChanged(args.PropertyName);
 }