mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-05 08:46:34 +08:00
分组,取消分组 ReDo UnDo 整理
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
</UserControl.Resources>
|
||||
<Grid IsHitTestVisible="{Binding IsHitTestVisible}">
|
||||
<TextBox x:Name="PART_TextBlock"
|
||||
Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
|
||||
Foreground="{Binding FontViewModel.FontColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
FontSize="{Binding FontViewModel.FontSize}"
|
||||
FontFamily="{Binding FontViewModel.FontFamily}"
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
</TextBox>
|
||||
<TextBox x:Name="PART_ShowText"
|
||||
Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
|
||||
Foreground="{Binding FontViewModel.FontColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
IsReadOnly="{Binding IsReadOnlyText}"
|
||||
FontSize="{Binding FontViewModel.FontSize}"
|
||||
|
||||
@@ -75,8 +75,12 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
else if (selectable.IsSelected == false)
|
||||
{
|
||||
BindingExpression binding = PART_ShowText.GetBindingExpression(TextBox.TextProperty);
|
||||
binding.UpdateSource();
|
||||
|
||||
PART_ShowText.Visibility = Visibility.Collapsed;
|
||||
PART_TextBlock.Visibility = Visibility.Visible;
|
||||
|
||||
selectable.IsEditing = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user