Esempio n. 1
0
        public VehicleViewModel(VehicleModel model)
        {
            this.model = model;

            VehicleItems         = model.VehicleItems.ToReadOnlyReactiveCollection(m => m);
            VehicleSelectedItem  = model.ToReactivePropertyAsSynchronized(m => m.VehicleSelectedItem);
            VehicleName          = model.ObserveProperty(m => m.VehicleName).ToReactiveProperty();
            PageBackBtIsEnabled  = model.ObserveProperty(m => m.VehicleSelected).ToReactiveProperty();
            PropertyNameText     = model.ObserveProperty(m => m.PropertyNameText).ToReactiveProperty();
            DescriptionText      = model.ObserveProperty(m => m.DescriptionText).ToReactiveProperty();
            VehicleAttributeText = model.ToReactivePropertyAsSynchronized(m => m.VehicleAttributeText);

            BackBtClicked = new DelegateCommand(BackBt_Clicked);
            VehicleListMouseDoubleClicked = new DelegateCommand(VehicleList_MouseDoubleClicked);
            VehicleListSelectionChanged   = new DelegateCommand(VehicleList_SelectionChanged);
        }