mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-19 16:06:35 +08:00
补充提交
This commit is contained in:
@@ -18,7 +18,6 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
/// </summary>
|
||||
public partial class TextControl : UserControl
|
||||
{
|
||||
|
||||
public TextControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -63,7 +62,18 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
if (e.PropertyName == "IsSelected")
|
||||
{
|
||||
if (selectable.IsSelected == false)
|
||||
if (selectable.StartEditing)
|
||||
{
|
||||
selectable.StartEditing = false;
|
||||
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;
|
||||
}
|
||||
}
|
||||
else if (selectable.IsSelected == false)
|
||||
{
|
||||
PART_ShowText.Visibility = Visibility.Collapsed;
|
||||
PART_TextBlock.Visibility = Visibility.Visible;
|
||||
|
||||
Reference in New Issue
Block a user