Esempio n. 1
0
        public AddressesViewModel(IAddressDataAccess addressDataAccess)
        {
            ProvincesViewModel = new ProvincesViewModel(addressDataAccess);
            DistrictsViewModel = new DistrictsViewModel(addressDataAccess);
            WardsViewModel     = new WardsViewModel(addressDataAccess);

            BindProperties();
        }
Esempio n. 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));
 }
Esempio n. 3
0
 public void Load()
 {
     ProvincesViewModel.Load();
     DistrictsViewModel.Load();
     WardsViewModel.Load();
 }