mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
画板基础基本完成
This commit is contained in:
@@ -107,7 +107,27 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPreviewKeyDown(KeyEventArgs e)
|
||||
{
|
||||
if (AcceptsReturn == false && e.Key == Key.Enter)
|
||||
{
|
||||
if (this.DataContext is DesignerItemViewModelBase designitem)
|
||||
{
|
||||
designitem.ExitEditCommand.Execute(null);
|
||||
}
|
||||
}
|
||||
base.OnPreviewKeyDown(e);
|
||||
}
|
||||
|
||||
protected override void OnLostFocus(RoutedEventArgs e)
|
||||
{
|
||||
if (this.DataContext is ISelectable selectable)
|
||||
{
|
||||
selectable.IsSelected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ControlAttachProperty
|
||||
|
||||
Reference in New Issue
Block a user