Adjust Combobox Control

This commit is contained in:
DB P 2025-04-13 10:18:47 +09:00
parent 6b267c4309
commit 74d6eed20b
3 changed files with 12 additions and 6 deletions

View file

@ -1103,7 +1103,8 @@
IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
Placement="Bottom"
PlacementTarget="{Binding ElementName=Background}"
PopupAnimation="None">
PopupAnimation="None"
VerticalOffset="-1">
<Popup.PlacementRectangle>
<MultiBinding>
<MultiBinding.Converter>
@ -1127,7 +1128,7 @@
CornerRadius="{DynamicResource OverlayCornerRadius}">
<Border
Padding="{DynamicResource ComboBoxDropdownBorderPadding}"
BorderBrush="{DynamicResource ComboBoxDropDownBorderBrush}"
BorderBrush="{DynamicResource CustomComboBorder}"
BorderThickness="{DynamicResource ComboBoxDropdownBorderThickness}"
CornerRadius="{Binding ElementName=PopupBorder, Path=CornerRadius}">
<ScrollViewer
@ -1157,8 +1158,8 @@
<!-- Pressed -->
<Trigger SourceName="ToggleButton" Property="IsPressed" Value="True">
<Setter TargetName="Background" Property="Background" Value="{DynamicResource CustomComboPressedBG}" />
<Setter TargetName="Background" Property="BorderThickness" Value="0" />
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ComboBoxBorderBrushPressed}" />
<Setter TargetName="Background" Property="BorderThickness" Value="0 0 0 1" />
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource CustomComboPressedOutLine}" />
<Setter TargetName="OutLine" Property="BorderBrush" Value="{DynamicResource CustomComboPressedOutLine}" />
<Setter TargetName="OutLine" Property="BorderThickness" Value="{DynamicResource PressedCustomComboOutlineThickness}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource CustomComboPressedText}" />

View file

@ -159,6 +159,7 @@
<m:StaticResource x:Key="CustomComboOutline" ResourceKey="Color13B" />
<m:StaticResource x:Key="CustomComboInline" ResourceKey="Color21B" />
<m:StaticResource x:Key="PopUpBorderBG" ResourceKey="Color07B" />
<SolidColorBrush x:Key="CustomComboBorder" Color="#3f3f3f" />
<m:StaticResource x:Key="CustomComboHoverBG" ResourceKey="Color22B" />
<m:StaticResource x:Key="CustomComboPressedBG" ResourceKey="Color23B" />
<m:StaticResource x:Key="CustomComboPressedOutLine" ResourceKey="Color19B" />
@ -171,7 +172,7 @@
<Thickness x:Key="CustomComboOutlineThickness">1,1,1,1</Thickness>
<Thickness x:Key="CustomComboInlineThickness">0,0,0,0</Thickness>
<Thickness x:Key="PressedCustomComboOutlineThickness">1,1,1,1</Thickness>
<Thickness x:Key="PressedCustomComboOutlineThickness">1,1,1,0</Thickness>
<Thickness x:Key="DisabledCustomComboOutlineThickness">1,1,1,1</Thickness>

View file

@ -153,6 +153,10 @@
<m:StaticResource x:Key="CustomComboOutline" ResourceKey="Color13B" />
<m:StaticResource x:Key="CustomComboInline" ResourceKey="Color21B" />
<m:StaticResource x:Key="PopUpBorderBG" ResourceKey="Color07B" />
<SolidColorBrush
x:Key="CustomComboBorder"
Opacity="0.14"
Color="#000000" />
<m:StaticResource x:Key="CustomComboHoverBG" ResourceKey="Color07B" />
<m:StaticResource x:Key="CustomComboPressedBG" ResourceKey="Color07B" />
<m:StaticResource x:Key="CustomComboPressedOutLine" ResourceKey="Color13B" />
@ -165,7 +169,7 @@
<Thickness x:Key="CustomComboOutlineThickness">1,1,1,0</Thickness>
<Thickness x:Key="CustomComboInlineThickness">0,0,0,2</Thickness>
<Thickness x:Key="PressedCustomComboOutlineThickness">1,1,1,1</Thickness>
<Thickness x:Key="PressedCustomComboOutlineThickness">1,1,1,0</Thickness>
<Thickness x:Key="DisabledCustomComboOutlineThickness">1,1,1,1</Thickness>