mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-05 08:46:34 +08:00
右键拖动画布
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="AIStudio.Styles.MindEditor" TargetType="{x:Type controls:MindEditor}">
|
||||
<Setter Property="Focusable" Value="True"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type controls:MindEditor}">
|
||||
@@ -20,10 +19,9 @@
|
||||
<!-- ToolBox Control -->
|
||||
<ContentControl x:Name="PART_ContentControl" Template="{Binding ToolBox,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||
|
||||
<ScrollViewer Grid.Row="1">
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl x:Name="PART_DiagramControl" MinWidth="1000" MinHeight="1000" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
</ScrollViewer>
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl Grid.Row="1" x:Name="PART_DiagramControl" MinWidth="1000" MinHeight="1000" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace AIStudio.Wpf.Mind.Controls
|
||||
{
|
||||
if (e.PropertyName == "IsSelected")
|
||||
{
|
||||
SelectedObject = _diagramViewModel.SelectedItems?.FirstOrDefault();
|
||||
SelectedObject = _diagramViewModel.SelectedItem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,13 +202,5 @@ namespace AIStudio.Wpf.Mind.Controls
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected override void OnPreviewKeyDown(KeyEventArgs e)
|
||||
{
|
||||
base.OnPreviewKeyDown(e);
|
||||
|
||||
e.Handled = _diagramViewModel.ExecuteShortcut(e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user