Browse Source
Merge pull request #4377 from rumkit/fixes/4359-combobox-placeholder-foreground
Updated ComboBox placeholder default foreground and added template binding
pull/4416/head
Jumar Macato
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
1 deletions
-
src/Avalonia.Themes.Default/ComboBox.xaml
-
src/Avalonia.Themes.Fluent/ComboBox.xaml
|
|
|
@ -25,7 +25,7 @@ |
|
|
|
<Setter Property="VerticalContentAlignment" Value="Center" /> |
|
|
|
<Setter Property="Padding" Value="4" /> |
|
|
|
<Setter Property="MinHeight" Value="20" /> |
|
|
|
<Setter Property="PlaceholderForeground" Value="{DynamicResource ComboBoxPlaceHolderForeground}" /> |
|
|
|
<Setter Property="PlaceholderForeground" Value="{DynamicResource ThemeForegroundBrush}" /> |
|
|
|
<Setter Property="Template"> |
|
|
|
<ControlTemplate> |
|
|
|
<Border Name="border" |
|
|
|
@ -39,6 +39,7 @@ |
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|
|
|
Margin="{TemplateBinding Padding}" |
|
|
|
Text="{TemplateBinding PlaceholderText}" |
|
|
|
Foreground="{TemplateBinding PlaceholderForeground}" |
|
|
|
IsVisible="{TemplateBinding SelectionBoxItem, Converter={x:Static ObjectConverters.IsNull}}" /> |
|
|
|
<ContentControl Content="{TemplateBinding SelectionBoxItem}" |
|
|
|
ContentTemplate="{TemplateBinding ItemTemplate}" |
|
|
|
|
|
|
|
@ -79,6 +79,7 @@ |
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|
|
|
Margin="{TemplateBinding Padding}" |
|
|
|
Text="{TemplateBinding PlaceholderText}" |
|
|
|
Foreground="{TemplateBinding PlaceholderForeground}" |
|
|
|
IsVisible="{TemplateBinding SelectionBoxItem, Converter={x:Static ObjectConverters.IsNull}}" /> |
|
|
|
<ContentControl x:Name="ContentPresenter" |
|
|
|
Content="{TemplateBinding SelectionBoxItem}" |
|
|
|
|