Files
aistudio-wpf-diagram/AIStudio.Wpf.DiagramDesigner/UserControls/GridControl.cs
2023-04-08 14:22:12 +08:00

29 lines
678 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows.Input;
namespace AIStudio.Wpf.DiagramDesigner
{
public class GridControl : Grid
{
public IDiagramViewModel DiagramViewModel
{
get
{
return (this.DataContext as SelectableDesignerItemViewModelBase)?.Root;
}
}
//protected override void OnPreviewKeyDown(KeyEventArgs e)
//{
// base.OnPreviewKeyDown(e);
// e.Handled = DiagramViewModel?.ExecuteShortcut(e) ?? false;
//}
}
}