private void AddCategory(object sender, RoutedEventArgs e)
 {
     StatusRow.Title                   = "AddCategory";
     categoryaddeditwindow             = new CategoryAddEditWindow(this);
     categoryaddeditwindow.DataContext = null;
     CategoriesListView.SelectedItem   = null;
     categoryaddeditwindow.ShowDialog();
 }
        private void EditCategory(object sender, MouseButtonEventArgs e)
        {
            Category rc = CategoriesListView.SelectedItem as Category;


            if (rc != null)
            {
                StatusRow.Title       = "EditCategory";
                categoryaddeditwindow = new CategoryAddEditWindow(this);
                categoryaddeditwindow.ShowDialog();
            }
        }