actually now its usable

This commit is contained in:
zznty
2023-11-13 23:17:39 +07:00
parent aecc7ee66f
commit ce07a1e86a
41 changed files with 1401 additions and 138 deletions

View File

@@ -0,0 +1,21 @@
using System.Collections;
using System.Windows;
namespace Kits.Views;
public partial class ProperCollectionEditor : Window
{
public ProperCollectionEditor()
{
InitializeComponent();
}
private void ButtonAdd_OnClick(object sender, RoutedEventArgs e)
{
((IList)DataContext).Add(Activator.CreateInstance(DataContext.GetType().GenericTypeArguments[0]));
}
private void ButtonDelete_OnClick(object sender, RoutedEventArgs e)
{
if (ElementsGrid.SelectedItem is { } item)
((IList)DataContext).Remove(item);
}
}