/// <summary> /// Opens a new window to create a new category or modify the selected /// </summary> /// <param name="viewModel">View model for the window</param> public void OpenCategoryWindow(CategoryViewModel viewModel) { CategoryView view = new CategoryView() { DataContext = viewModel }; view.ShowDialog(); }
private void BtnVewCategory_Click(object sender, EventArgs e) { CategoryView view = new CategoryView(context); view.ShowDialog(); }