public PhieuNhapThuocList() { InitializeComponent(); PageAnimation.SetObject(front, back); viewModel = new PhieuNhapThuocViewModel(); this.Loaded += (s, e) => { this.DataContext = this.viewModel; }; }
public ActionButton(PhieuNhapThuocViewModel viewModel) { this.viewModel = viewModel; this.viewModel.PropertyChanged += (s, e) => { if (this.CanExecuteChanged != null) { this.CanExecuteChanged(this, new EventArgs()); } }; }