Пример #1
0
        public void BindToPropertyChange_Propagated()
        {
            bool wasCalled = false;
            var  not       = new DummyNotifier();
            var  cmd       = new DelegateCommand((p) => { }, (p) => p != null);

            cmd.BindCanExecuteToProperty(not, "Number");
            cmd.CanExecuteChanged += (s, e) => wasCalled = true;

            not.Number = 123;
            Assert.IsTrue(wasCalled);
        }