Exemple #1
0
        protected override void OnBindingContextChanged(VMBase oldViewModel, VMBase newViewModel)
        {
            base.OnBindingContextChanged(oldViewModel, newViewModel);

            VMBaseMap oldVm = oldViewModel as VMBaseMap;

            if (oldVm != null)
            {
                oldVm.MapId.OnValueChanged      -= MapIdChanged;
                oldVm.Tiles.OnValueChanged      -= TilesChanged;
                oldVm.Characters.OnValueChanged -= CharactersChanged;
            }
            if (ViewModel != null)
            {
                ViewModel.MapId.OnValueChanged      += MapIdChanged;
                ViewModel.Tiles.OnValueChanged      += TilesChanged;
                ViewModel.Characters.OnValueChanged += CharactersChanged;
            }
        }
Exemple #2
0
 public MBaseMap()
 {
     viewModel = new VMBaseMap();
 }