连接线,文本编辑

This commit is contained in:
艾竹
2023-04-08 14:37:07 +08:00
parent a0485601c1
commit 5e7dd6c5e5
5 changed files with 6 additions and 5 deletions

View File

@@ -62,9 +62,9 @@ namespace AIStudio.Wpf.DiagramDesigner
{ {
if (e.PropertyName == "IsSelected") if (e.PropertyName == "IsSelected")
{ {
if (selectable.StartEditing) if (selectable.InitIsEditing)
{ {
selectable.StartEditing = false; selectable.InitIsEditing = false;
PART_ShowText.Visibility = Visibility.Visible; PART_ShowText.Visibility = Visibility.Visible;
PART_TextBlock.Visibility = Visibility.Collapsed; PART_TextBlock.Visibility = Visibility.Collapsed;
PART_ShowText.Focus(); PART_ShowText.Focus();

View File

@@ -46,6 +46,7 @@ namespace AIStudio.Wpf.DiagramDesigner
protected override void InitNew() protected override void InitNew()
{ {
InitIsEditing = true;
ConnectorWidth = 30; ConnectorWidth = 30;
ConnectorHeight = 30; ConnectorHeight = 30;
} }

View File

@@ -178,7 +178,7 @@ namespace AIStudio.Wpf.DiagramDesigner
} }
} }
public bool StartEditing public bool InitIsEditing
{ {
get; set; get; set;
} }

View File

@@ -45,7 +45,7 @@ namespace AIStudio.Wpf.DiagramDesigner
protected override void InitNew() protected override void InitNew()
{ {
this.ItemWidth = 150; this.ItemWidth = 150;
this.StartEditing = true; this.InitIsEditing = true;
} }
private string _watermark = "请输入文本"; private string _watermark = "请输入文本";

View File

@@ -24,7 +24,7 @@ namespace AIStudio.Wpf.DiagramDesigner
} }
//新建完处于编辑状态 //新建完处于编辑状态
bool StartEditing bool InitIsEditing
{ {
get; set; get; set;
} }