Inheritance: ReactiveUI.ReactiveObject
        public ShellViewModel()
        {
            var canExecute = this.WhenAnyValue(vm => vm.EnteredText)
                .Select(s => !string.IsNullOrWhiteSpace(s));

            Child = new ChildViewModel();

            OKCmd = ReactiveCommand.Create(canExecute);
            OKCmd.Subscribe(_ => Child.Name = "You entered " + EnteredText);
        }
Exemplo n.º 2
0
        public ShellViewModel()
        {
            var canExecute = this.WhenAnyValue(vm => vm.EnteredText)
                             .Select(s => !string.IsNullOrWhiteSpace(s));

            Child = new ChildViewModel();

            OKCmd = ReactiveCommand.Create(canExecute);
            OKCmd.Subscribe(_ => Child.Name = "You entered " + EnteredText);
        }