private void AddTag_Click(object sender, RoutedEventArgs e)
        {
            var tag    = new Tag("", "");
            var result = new EditTagWindow(tag).ShowDialog();

            if (result == true)
            {
                Tags.Add(tag);
                db.Tags.Add(tag);
            }
        }
 private void TagsListView_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     if ((sender as ListView).SelectedItem is Tag tag)
     {
         var result = new EditTagWindow(tag).ShowDialog();
         if (result == true)
         {
             db.Entry(tag).State = System.Data.Entity.EntityState.Modified;
         }
     }
 }