Пример #1
0
        public AddressesViewModel(IAddressDataAccess addressDataAccess)
        {
            ProvincesViewModel = new ProvincesViewModel(addressDataAccess);
            DistrictsViewModel = new DistrictsViewModel(addressDataAccess);
            WardsViewModel     = new WardsViewModel(addressDataAccess);

            BindProperties();
        }
Пример #2
0
 private void BindProperties()
 {
     ProvincesViewModel.BindProperty(nameof(ProvincesViewModel.SelectedItem), DistrictsViewModel,
                                     nameof(DistrictsViewModel.SelectedProvince), BindMode.OneWay);
     DistrictsViewModel.BindProperty(nameof(DistrictsViewModel.SelectedItem), WardsViewModel,
                                     nameof(WardsViewModel.SelectedDistrict), BindMode.OneWay);
     this.BindProperty(nameof(SelectedProvince), ProvincesViewModel, nameof(ProvincesViewModel.SelectedItem));
     this.BindProperty(nameof(SelectedDistrict), DistrictsViewModel, nameof(DistrictsViewModel.SelectedItem));
     this.BindProperty(nameof(SelectedWard), WardsViewModel, nameof(WardsViewModel.SelectedItem));
 }
Пример #3
0
 public void Load()
 {
     ProvincesViewModel.Load();
     DistrictsViewModel.Load();
     WardsViewModel.Load();
 }