Пример #1
0
 public DodajKategorie(ZarzadzanieKategoriamiViewModel parentVM, string nazwaKategorii)
 {
     InitializeComponent();
     DodajKategorieViewModel vm = new DodajKategorieViewModel(parentVM, nazwaKategorii);
     DataContext = vm;
     if (vm.CloseAction == null) vm.CloseAction = new Action(() => this.Close());
 }
        public ZarzadzanieKategoriami(object parentVM)
        {
            InitializeComponent();
            ParentVM = parentVM;
            ZarzadzanieKategoriamiViewModel vm = new ZarzadzanieKategoriamiViewModel(parentVM);

            DataContext = vm;
            if (vm.CloseAction == null)
            {
                vm.CloseAction = new Action(() => this.Close());
            }
        }