Dong Bin
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
16 additions and
5 deletions
-
src/Avalonia.Themes.Fluent/Controls/TextBox.xaml
-
src/Avalonia.Themes.Simple/Controls/TextBox.xaml
|
|
|
@ -148,9 +148,15 @@ |
|
|
|
Text="{TemplateBinding Watermark}" |
|
|
|
TextAlignment="{TemplateBinding TextAlignment}" |
|
|
|
TextWrapping="{TemplateBinding TextWrapping}" |
|
|
|
IsVisible="{TemplateBinding Text, Converter={x:Static StringConverters.IsNullOrEmpty}}" |
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> |
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> |
|
|
|
<TextBlock.IsVisible> |
|
|
|
<MultiBinding Converter="{x:Static BoolConverters.And}"> |
|
|
|
<Binding ElementName="PART_TextPresenter" Path="PreeditText" Converter="{x:Static StringConverters.IsNullOrEmpty}"/> |
|
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Text" Converter="{x:Static StringConverters.IsNullOrEmpty}"/> |
|
|
|
</MultiBinding> |
|
|
|
</TextBlock.IsVisible> |
|
|
|
</TextBlock> |
|
|
|
<TextPresenter Name="PART_TextPresenter" |
|
|
|
Text="{TemplateBinding Text, Mode=TwoWay}" |
|
|
|
CaretBlinkInterval="{TemplateBinding CaretBlinkInterval}" |
|
|
|
|
|
|
|
@ -136,12 +136,17 @@ |
|
|
|
<TextBlock Name="watermark" |
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|
|
|
IsVisible="{TemplateBinding Text, |
|
|
|
Converter={x:Static StringConverters.IsNullOrEmpty}}" |
|
|
|
Opacity="0.5" |
|
|
|
Text="{TemplateBinding Watermark}" |
|
|
|
TextAlignment="{TemplateBinding TextAlignment}" |
|
|
|
TextWrapping="{TemplateBinding TextWrapping}" /> |
|
|
|
TextWrapping="{TemplateBinding TextWrapping}"> |
|
|
|
<TextBlock.IsVisible> |
|
|
|
<MultiBinding Converter="{x:Static BoolConverters.And}"> |
|
|
|
<Binding ElementName="PART_TextPresenter" Path="PreeditText" Converter="{x:Static StringConverters.IsNullOrEmpty}"/> |
|
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Text" Converter="{x:Static StringConverters.IsNullOrEmpty}"/> |
|
|
|
</MultiBinding> |
|
|
|
</TextBlock.IsVisible> |
|
|
|
</TextBlock> |
|
|
|
<TextPresenter Name="PART_TextPresenter" |
|
|
|
CaretBlinkInterval="{TemplateBinding CaretBlinkInterval}" |
|
|
|
CaretBrush="{TemplateBinding CaretBrush}" |
|
|
|
|