Fix AutoCompleteBox default Border. Fix TextBox ClearButton layout.

This commit is contained in:
rabbitism 2023-02-09 22:28:58 +08:00
parent c9cc49a67c
commit b591c96968
4 changed files with 10 additions and 9 deletions

View File

@ -8,6 +8,7 @@
<ControlTheme x:Key="{x:Type AutoCompleteBox}" TargetType="AutoCompleteBox">
<Setter Property="Background" Value="{DynamicResource AutoCompleteBoxDefaultBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource AutoCompleteBoxDefaultBorderBrush}" />
<Setter Property="CornerRadius" Value="{DynamicResource AutoCompleteBoxCornerRadius}" />
<Setter Property="AutoCompleteBox.MaxDropDownHeight" Value="600" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">

View File

@ -48,15 +48,13 @@
<Setter Property="Button.Template">
<ControlTemplate TargetType="Button">
<!-- Background must be transparent or hit test will fail -->
<Label Background="Transparent">
<Label.Content>
<PathIcon
Width="16"
Height="16"
Data="{DynamicResource TextBoxClearButtonData}"
Foreground="{TemplateBinding Foreground}" />
</Label.Content>
</Label>
<ContentControl Background="Transparent">
<PathIcon
Width="16"
Height="16"
Data="{DynamicResource TextBoxClearButtonData}"
Foreground="{TemplateBinding Foreground}" />
</ContentControl>
</ControlTemplate>
</Setter>
<Style Selector="^:pointerover">

View File

@ -9,4 +9,5 @@
<CornerRadius x:Key="AutoCompleteBoxPopupCornerRadius">6</CornerRadius>
<SolidColorBrush x:Key="AutoCompleteBoxBorderlessBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="AutoCompleteBoxBorderlessBackground" Opacity="0.05" Color="#E6E8EA" />
<CornerRadius x:Key="AutoCompleteBoxCornerRadius">3</CornerRadius>
</ResourceDictionary>

View File

@ -9,4 +9,5 @@
<CornerRadius x:Key="AutoCompleteBoxPopupCornerRadius">6</CornerRadius>
<SolidColorBrush x:Key="AutoCompleteBoxBorderlessBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="AutoCompleteBoxBorderlessBackground" Opacity="0.05" Color="#2E3238" />
<CornerRadius x:Key="AutoCompleteBoxCornerRadius">3</CornerRadius>
</ResourceDictionary>