fix: 1. simplify code for nullable control event assignment.

2. make textbox readonly and dragpanel visible controlled in code behind.
3. Use compile binding in demo.
This commit is contained in:
rabbitism
2024-03-21 17:25:55 +08:00
parent 7170691b52
commit 090be3ce3b
3 changed files with 71 additions and 63 deletions

View File

@@ -52,7 +52,6 @@
FontSize="{TemplateBinding FontSize}"
Foreground="{TemplateBinding Foreground}"
InnerLeftContent="{TemplateBinding InnerLeftContent}"
IsReadOnly="{TemplateBinding IsReadOnly}"
TextWrapping="NoWrap"
Theme="{DynamicResource NonErrorTextBox}"
Watermark="{TemplateBinding Watermark}" />
@@ -61,8 +60,7 @@
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Transparent"
Cursor="SizeAll"
IsVisible="{TemplateBinding AllowDrag}" />
Cursor="SizeAll"/>
<Button
Name="PART_ClearButton"
Margin="0,0,8,0"