Exemplo n.º 1
0
        public InnerValidatableObjectAndCollectionViewModel()
        {
            //If you are using Reactive UI, you can add custom logic to ReactiveList
            //In your project this is better do in App.xaml.cs
            ValidationOptions.AddCollectionObserver(CanObserve, CreateReactiveCollectionItemChangedObserver);


            InnerObjectValue       = new InnerObject();
            InnerObjectsCollection = new ReactiveList <InnerObject>()
            {
                ChangeTrackingEnabled = true
            };

            AddItemCommand    = ReactiveCommand.Create(AddItem);
            DeleteItemCommand = ReactiveCommand.Create <InnerObject>(DeleteItem);

            this.Validator = GetValidator();
        }