feat: alter AutoCompleteBox.

This commit is contained in:
Zhang Dian 2024-09-24 18:09:35 +08:00
parent 8db28efd8e
commit 5da85a27f6
6 changed files with 120 additions and 114 deletions

View File

@ -9,9 +9,9 @@
</StackPanel>
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type AutoCompleteBox}" TargetType="AutoCompleteBox">
<Setter Property="AutoCompleteBox.VerticalAlignment" Value="Center" />
<Setter Property="AutoCompleteBox.MinHeight" Value="{DynamicResource AutoCompleteBoxDefaultHeight}" />
<Setter Property="AutoCompleteBox.MaxDropDownHeight" Value="{DynamicResource AutoCompleteMaxDropdownHeight}" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="MinHeight" Value="{DynamicResource AutoCompleteBoxDefaultHeight}" />
<Setter Property="MaxDropDownHeight" Value="{DynamicResource AutoCompleteMaxDropdownHeight}" />
<Setter Property="Template">
<ControlTemplate TargetType="AutoCompleteBox">
<DataValidationErrors>

View File

@ -16,7 +16,7 @@
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
<Setter Property="ListBox.Template">
<Setter Property="Template">
<ControlTemplate TargetType="ListBox">
<Border
Name="border"
@ -43,10 +43,10 @@
</Setter>
</ControlTheme>
<ControlTheme x:Key="{x:Type ListBoxItem}" TargetType="ListBoxItem">
<Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemDefaultBackground}" />
<Setter Property="ListBoxItem.Padding" Value="{DynamicResource ListBoxItemDefaultPadding}" />
<Setter Property="ListBoxItem.CornerRadius" Value="{DynamicResource ListBoxItemCornerRadius}" />
<Setter Property="ListBoxItem.Template">
<Setter Property="Background" Value="{DynamicResource ListBoxItemDefaultBackground}" />
<Setter Property="Padding" Value="{DynamicResource ListBoxItemDefaultPadding}" />
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemCornerRadius}" />
<Setter Property="Template">
<ControlTemplate TargetType="ListBoxItem">
<ContentPresenter
Name="PART_ContentPresenter"
@ -75,16 +75,19 @@
<!-- Pointerover State -->
<Style Selector="^:pointerover">
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemPointeroverForeground}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemPointeroverBackground}" />
</Style>
<!-- Pressed State -->
<Style Selector="^:pressed">
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemPressedForeground}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemPressedBackground}" />
</Style>
<!-- Selected State -->
<Style Selector="^:selected">
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemSelectedForeground}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemSelectedBackground}" />
<Style Selector="^:pointerover">
<Setter Property="Background"
@ -95,13 +98,13 @@
<!-- RadioGroup -->
<ControlTheme x:Key="RadioGroupListBox" TargetType="ListBox">
<Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource RadioGroupListBoxItem}" />
<Setter Property="ListBox.ItemsPanel">
<Setter Property="ItemContainerTheme" Value="{DynamicResource RadioGroupListBoxItem}" />
<Setter Property="ItemsPanel">
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</Setter>
<Setter Property="ListBox.Template">
<Setter Property="Template">
<ControlTemplate TargetType="ListBox">
<Border
Background="{TemplateBinding Background}"
@ -117,17 +120,17 @@
</Setter>
</ControlTheme>
<ControlTheme x:Key="RadioGroupListBoxItem" TargetType="ListBoxItem">
<Setter Property="ListBoxItem.HorizontalAlignment" Value="Left" />
<Setter Property="ListBoxItem.VerticalAlignment" Value="Top" />
<Setter Property="ListBoxItem.Cursor" Value="Hand" />
<Setter Property="ListBoxItem.HorizontalContentAlignment" Value="Left" />
<Setter Property="ListBoxItem.VerticalContentAlignment" Value="Center" />
<Setter Property="ListBoxItem.FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" />
<Setter Property="ListBoxItem.CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupBoxCornerRadius}" />
<Setter Property="ListBoxItem.Foreground" Value="{DynamicResource ListBoxItemRadioGroupForeground}" />
<Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemRadioGroupDefaultBackground}" />
<Setter Property="ListBoxItem.BorderBrush" Value="{DynamicResource ListBoxItemRadioGroupDefaultBorderBrush}" />
<Setter Property="ListBoxItem.Template">
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" />
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupBoxCornerRadius}" />
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemRadioGroupForeground}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemRadioGroupDefaultBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ListBoxItemRadioGroupDefaultBorderBrush}" />
<Setter Property="Template">
<ControlTemplate TargetType="ListBoxItem">
<Border
Name="RootBorder"
@ -280,19 +283,18 @@
<ControlTheme x:Key="ButtonRadioGroupListBox"
BasedOn="{StaticResource RadioGroupListBox}"
TargetType="ListBox">
<Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource ButtonRadioGroupListBoxItem}" />
<Setter Property="ItemContainerTheme" Value="{DynamicResource ButtonRadioGroupListBoxItem}" />
</ControlTheme>
<ControlTheme x:Key="ButtonRadioGroupListBoxItem" TargetType="ListBoxItem">
<Setter Property="ListBoxItem.CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupButtonCornerRadius}" />
<Setter Property="ListBoxItem.VerticalContentAlignment" Value="Center" />
<Setter Property="ListBoxItem.Margin" Value="2" />
<Setter Property="ListBoxItem.Cursor" Value="Hand" />
<Setter Property="ListBoxItem.FontWeight" Value="{DynamicResource ListBoxItemRadioGroupButtonFontWeight}" />
<Setter Property="ListBoxItem.FontSize" Value="{DynamicResource ListBoxItemRadioGroupButtonDefaultFontSize}" />
<Setter Property="ListBoxItem.Padding" Value="{DynamicResource ListBoxItemRadioGroupButtonDefaultPadding}" />
<Setter Property="ListBoxItem.Foreground"
Value="{DynamicResource ListBoxItemRadioGroupButtonUncheckedForeground}" />
<Setter Property="ListBoxItem.Template">
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupButtonCornerRadius}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Margin" Value="2" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="FontWeight" Value="{DynamicResource ListBoxItemRadioGroupButtonFontWeight}" />
<Setter Property="FontSize" Value="{DynamicResource ListBoxItemRadioGroupButtonDefaultFontSize}" />
<Setter Property="Padding" Value="{DynamicResource ListBoxItemRadioGroupButtonDefaultPadding}" />
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemRadioGroupButtonUncheckedForeground}" />
<Setter Property="Template">
<ControlTemplate TargetType="ListBoxItem">
<ContentPresenter
x:Name="PART_ContentPresenter"
@ -345,19 +347,19 @@
<ControlTheme x:Key="CardRadioGroupListBox"
BasedOn="{StaticResource RadioGroupListBox}"
TargetType="ListBox">
<Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource CardRadioGroupListBoxItem}" />
<Setter Property="ItemContainerTheme" Value="{DynamicResource CardRadioGroupListBoxItem}" />
</ControlTheme>
<ControlTheme x:Key="CardRadioGroupListBoxItem" TargetType="ListBoxItem">
<Setter Property="ListBoxItem.Padding" Value="{DynamicResource ListBoxItemRadioGroupCardPadding}" />
<Setter Property="ListBoxItem.BorderThickness" Value="1" />
<Setter Property="ListBoxItem.CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupCardCornerRadius}" />
<Setter Property="ListBoxItem.Cursor" Value="Hand" />
<Setter Property="ListBoxItem.HorizontalAlignment" Value="Left" />
<Setter Property="ListBoxItem.VerticalAlignment" Value="Center" />
<Setter Property="ListBoxItem.HorizontalContentAlignment" Value="Left" />
<Setter Property="ListBoxItem.VerticalContentAlignment" Value="Center" />
<Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemRadioGroupCardDefaultBackground}" />
<Setter Property="ListBoxItem.FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" />
<Setter Property="Padding" Value="{DynamicResource ListBoxItemRadioGroupCardPadding}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupCardCornerRadius}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemRadioGroupCardDefaultBackground}" />
<Setter Property="FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" />
<Setter Property="Template">
<ControlTemplate TargetType="ListBoxItem">
<Border
@ -531,17 +533,17 @@
<ControlTheme x:Key="PureCardRadioGroupListBox"
BasedOn="{StaticResource RadioGroupListBox}"
TargetType="ListBox">
<Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource PureCardRadioGroupListBoxItem}" />
<Setter Property="ItemContainerTheme" Value="{DynamicResource PureCardRadioGroupListBoxItem}" />
</ControlTheme>
<ControlTheme x:Key="PureCardRadioGroupListBoxItem" TargetType="ListBoxItem">
<Setter Property="ListBoxItem.CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupCardCornerRadius}" />
<Setter Property="ListBoxItem.Cursor" Value="Hand" />
<Setter Property="ListBoxItem.VerticalContentAlignment" Value="Center" />
<Setter Property="ListBoxItem.BorderThickness" Value="1" />
<Setter Property="ListBoxItem.FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" />
<Setter Property="ListBoxItem.Padding" Value="{DynamicResource ListBoxItemRadioGroupCardPadding}" />
<Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemRadioGroupCardDefaultBackground}" />
<Setter Property="ListBoxItem.Template">
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupCardCornerRadius}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" />
<Setter Property="Padding" Value="{DynamicResource ListBoxItemRadioGroupCardPadding}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemRadioGroupCardDefaultBackground}" />
<Setter Property="Template">
<ControlTemplate TargetType="ListBoxItem">
<ContentPresenter
x:Name="PART_ContentPresenter"
@ -603,7 +605,7 @@
<ControlTheme x:Key="CheckGroupListBox"
BasedOn="{StaticResource RadioGroupListBox}"
TargetType="ListBox">
<Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource CheckGroupListBoxItem}" />
<Setter Property="ItemContainerTheme" Value="{DynamicResource CheckGroupListBoxItem}" />
</ControlTheme>
<ControlTheme x:Key="CheckGroupListBoxItem" TargetType="ListBoxItem">
<Setter Property="Padding" Value="8,0,0,0" />
@ -784,7 +786,7 @@
<ControlTheme x:Key="CardCheckGroupListBox"
BasedOn="{StaticResource RadioGroupListBox}"
TargetType="ListBox">
<Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource CardCheckGroupListBoxItem}" />
<Setter Property="ItemContainerTheme" Value="{DynamicResource CardCheckGroupListBoxItem}" />
</ControlTheme>
<ControlTheme x:Key="CardCheckGroupListBoxItem" TargetType="ListBoxItem">
<Setter Property="Cursor" Value="Hand" />
@ -793,7 +795,7 @@
<Setter Property="BorderThickness" Value="{DynamicResource ListBoxItemCheckCardBorderThickness}" />
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemCheckCardCornerRadius}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="ListBoxItem.Template">
<Setter Property="Template">
<ControlTemplate TargetType="ListBoxItem">
<Border
Name="RootBorder"

View File

@ -24,25 +24,25 @@
</MenuFlyout>
<ControlTheme x:Key="{x:Type TextBox}" TargetType="TextBox">
<Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDefaultBackground}" />
<Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
<Setter Property="TextBox.SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="TextBox.SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="TextBox.BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
<Setter Property="TextBox.BackgroundSizing" Value="OuterBorderEdge" />
<Setter Property="TextBox.CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
<Setter Property="TextBox.FontSize" Value="14" />
<Setter Property="TextBox.Cursor" Value="Ibeam" />
<Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" />
<Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="TextBox.VerticalAlignment" Value="Center" />
<Setter Property="TextBox.VerticalContentAlignment" Value="Center" />
<Setter Property="TextBox.FocusAdorner" Value="{x:Null}" />
<Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="Background" Value="{DynamicResource TextBoxDefaultBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
<Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
<Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Cursor" Value="Ibeam" />
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" />
<Setter Property="MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FocusAdorner" Value="{x:Null}" />
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
<Setter Property="TextBox.ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" />
<Setter Property="TextBox.Template">
<Setter Property="ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" />
<Setter Property="Template">
<ControlTemplate TargetType="TextBox">
<DataValidationErrors>
<Border
@ -197,8 +197,8 @@
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderedPointeroverBorderBrush}" />
</Style>
<Style Selector="^:disabled /template/ Border#PART_ContentPresenterBorder">
<Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDisabledBackground}" />
<Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource TextBoxDisabledBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" />
</Style>
<Style Selector="^:error">
@ -230,25 +230,25 @@
</ControlTheme>
<ControlTheme x:Key="NonErrorTextBox" TargetType="TextBox">
<Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDefaultBackground}" />
<Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
<Setter Property="TextBox.SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="TextBox.SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="TextBox.BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
<Setter Property="TextBox.BackgroundSizing" Value="OuterBorderEdge" />
<Setter Property="TextBox.CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
<Setter Property="TextBox.FontSize" Value="14" />
<Setter Property="TextBox.Cursor" Value="Ibeam" />
<Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" />
<Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="TextBox.VerticalAlignment" Value="Center" />
<Setter Property="TextBox.VerticalContentAlignment" Value="Center" />
<Setter Property="TextBox.FocusAdorner" Value="{x:Null}" />
<Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="Background" Value="{DynamicResource TextBoxDefaultBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
<Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
<Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Cursor" Value="Ibeam" />
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" />
<Setter Property="MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FocusAdorner" Value="{x:Null}" />
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
<Setter Property="TextBox.ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" />
<Setter Property="TextBox.Template">
<Setter Property="ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" />
<Setter Property="Template">
<ControlTemplate TargetType="TextBox">
<DataValidationErrors Theme="{DynamicResource SilentDataValidationErrors}">
<Border
@ -403,8 +403,8 @@
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderedPointeroverBorderBrush}" />
</Style>
<Style Selector="^:disabled /template/ Border#PART_ContentPresenterBorder">
<Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDisabledBackground}" />
<Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource TextBoxDisabledBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" />
</Style>
<Style Selector="^:error">
@ -436,19 +436,19 @@
</ControlTheme>
<ControlTheme x:Key="LooklessTextBox" TargetType="TextBox">
<Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="TextBox.SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="TextBox.SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="TextBox.FontSize" Value="14" />
<Setter Property="TextBox.Cursor" Value="Ibeam" />
<Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" />
<Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="TextBox.VerticalAlignment" Value="Center" />
<Setter Property="TextBox.VerticalContentAlignment" Value="Center" />
<Setter Property="TextBox.FocusAdorner" Value="{x:Null}" />
<Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Cursor" Value="Ibeam" />
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" />
<Setter Property="MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FocusAdorner" Value="{x:Null}" />
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
<Setter Property="TextBox.Template">
<Setter Property="Template">
<ControlTemplate TargetType="TextBox">
<Border Name="PART_ContentPresenterBorder" MinHeight="{TemplateBinding MinHeight}">
<Grid Margin="{TemplateBinding Padding}" ColumnDefinitions="Auto, *, Auto">

View File

@ -3,8 +3,11 @@
<SolidColorBrush x:Key="ListBoxItemDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="ListBoxItemDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="ListBoxItemPointeroverForeground" Color="White" />
<SolidColorBrush x:Key="ListBoxItemPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ListBoxItemPressedForeground" Color="White" />
<SolidColorBrush x:Key="ListBoxItemPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ListBoxItemSelectedForeground" Color="White" />
<SolidColorBrush x:Key="ListBoxItemSelectedBackground" Opacity="0.2" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Opacity="0.3" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemDisabledBackground" Color="Transparent" />

View File

@ -253,8 +253,11 @@
<SolidColorBrush x:Key="ListBoxItemDisabledForeground" Color="{StaticResource GrayTextColor}" />
<SolidColorBrush x:Key="ListBoxItemDefaultBackground" Color="{StaticResource WindowColor}" />
<SolidColorBrush x:Key="ListBoxItemPointeroverForeground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="ListBoxItemPointeroverBackground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="ListBoxItemPressedForeground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="ListBoxItemPressedBackground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="ListBoxItemSelectedForeground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="ListBoxItemSelectedBackground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="ListBoxItemDisabledBackground" Color="{StaticResource WindowColor}" />
@ -523,13 +526,8 @@
<SolidColorBrush x:Key="TextBoxDisabledForeground" Color="{StaticResource GrayTextColor}" />
<SolidColorBrush x:Key="TextBoxDisabledBorderBrush" Color="{StaticResource GrayTextColor}" />
<SolidColorBrush x:Key="TextBoxBorderedDefaultBackground" Color="{StaticResource WindowColor}" />
<SolidColorBrush x:Key="TextBoxBorderedDefaultBorderBrush" Color="{StaticResource WindowTextColor}" />
<SolidColorBrush x:Key="TextBoxBorderedPointeroverBackground" Color="{StaticResource WindowColor}" />
<SolidColorBrush x:Key="TextBoxBorderedPointeroverBorderBrush" Color="{StaticResource WindowColor}" />
<SolidColorBrush x:Key="TextBoxSelectionBackground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="TextBoxSelectionForeground" Color="{StaticResource WindowTextColor}" />
<SolidColorBrush x:Key="TextBoxSelectionForeground" Color="{StaticResource HighlightTextColor}" />
<!-- ToggleButton -->
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Color="{StaticResource WindowColor}" />

View File

@ -3,8 +3,11 @@
<SolidColorBrush x:Key="ListBoxItemDisabledForeground" Opacity="0.35" Color="#1C1F23" />
<SolidColorBrush x:Key="ListBoxItemDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="ListBoxItemPointeroverForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="ListBoxItemPointeroverBackground" Opacity="0.05" Color="#2E3238" />
<SolidColorBrush x:Key="ListBoxItemPressedForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="ListBoxItemPressedBackground" Opacity="0.09" Color="#2E3238" />
<SolidColorBrush x:Key="ListBoxItemSelectedForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="ListBoxItemSelectedBackground" Color="#EAF5FF" />
<SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Color="#CBE7FE" />
<SolidColorBrush x:Key="ListBoxItemDisabledBackground" Color="Transparent" />