右键拖动画布

This commit is contained in:
艾竹
2023-03-12 15:26:58 +08:00
parent fb7858fe74
commit e2753b0bff
16 changed files with 711 additions and 142 deletions

View File

@@ -8,7 +8,6 @@
</ResourceDictionary.MergedDictionaries>
<Style x:Key="AIStudio.Styles.FlowchartEditor" TargetType="{x:Type controls:FlowchartEditor}">
<Setter Property="Focusable" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:FlowchartEditor}">

View File

@@ -62,7 +62,7 @@ namespace AIStudio.Wpf.Flowchart.Controls
{
if (e.PropertyName == "IsSelected")
{
SelectedObject = _diagramViewModel.SelectedItems?.FirstOrDefault();
SelectedObject = _diagramViewModel.SelectedItem;
}
}
@@ -248,13 +248,5 @@ namespace AIStudio.Wpf.Flowchart.Controls
}
}
#endregion
protected override void OnPreviewKeyDown(KeyEventArgs e)
{
base.OnPreviewKeyDown(e);
e.Handled = _diagramViewModel.ExecuteShortcut(e);
}
}
}