mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-15 05:56:36 +08:00
Mind Editoe
This commit is contained in:
@@ -40,13 +40,14 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
this.Loaded -= TextControl_Loaded;
|
||||
|
||||
PART_ShowText.Visibility = Visibility.Visible;
|
||||
PART_TextBlock.Visibility = Visibility.Collapsed;
|
||||
PART_ShowText.Focus();
|
||||
if (!string.IsNullOrEmpty(PART_ShowText.Text))
|
||||
{
|
||||
PART_ShowText.SelectionStart = PART_ShowText.Text.Length;
|
||||
}
|
||||
//新建后处于编辑状态,暂时关闭
|
||||
//PART_ShowText.Visibility = Visibility.Visible;
|
||||
//PART_TextBlock.Visibility = Visibility.Collapsed;
|
||||
//PART_ShowText.Focus();
|
||||
//if (!string.IsNullOrEmpty(PART_ShowText.Text))
|
||||
//{
|
||||
// PART_ShowText.SelectionStart = PART_ShowText.Text.Length;
|
||||
//}
|
||||
|
||||
if (this.DataContext is ISelectable selectable)
|
||||
{
|
||||
@@ -74,6 +75,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
PART_ShowText.Visibility = Visibility.Collapsed;
|
||||
PART_TextBlock.Visibility = Visibility.Visible;
|
||||
selectable.IsEditing = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user