mirror of
https://github.com/VitalickS/BrightSharp.Toolkit.git
synced 2026-03-21 02:21:15 +00:00
Initial
This commit is contained in:
27
JetFrames.AppleJobs.Editor/Views/ModelCategories.xaml.cs
Normal file
27
JetFrames.AppleJobs.Editor/Views/ModelCategories.xaml.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace JetFrames.AppleJobs.Editor.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ModelCategories.xaml
|
||||
/// </summary>
|
||||
public partial class ModelCategories : UserControl
|
||||
{
|
||||
public ModelCategories()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void DataGrid_PreviewCanExecute(object sender, CanExecuteRoutedEventArgs e)
|
||||
{
|
||||
if (e.Command == DataGrid.DeleteCommand)
|
||||
e.Handled = App.Locator.Editor.DeleteEntity(((DataGrid)sender).SelectedItems, true);
|
||||
}
|
||||
|
||||
private void DataGrid_InitializingNewItem(object sender, InitializingNewItemEventArgs e)
|
||||
{
|
||||
App.Locator.Editor.AddEntity(e.NewItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user