예제 #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();
 }