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> </StackPanel>
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="{x:Type AutoCompleteBox}" TargetType="AutoCompleteBox"> <ControlTheme x:Key="{x:Type AutoCompleteBox}" TargetType="AutoCompleteBox">
<Setter Property="AutoCompleteBox.VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="AutoCompleteBox.MinHeight" Value="{DynamicResource AutoCompleteBoxDefaultHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource AutoCompleteBoxDefaultHeight}" />
<Setter Property="AutoCompleteBox.MaxDropDownHeight" Value="{DynamicResource AutoCompleteMaxDropdownHeight}" /> <Setter Property="MaxDropDownHeight" Value="{DynamicResource AutoCompleteMaxDropdownHeight}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="AutoCompleteBox"> <ControlTemplate TargetType="AutoCompleteBox">
<DataValidationErrors> <DataValidationErrors>

View File

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

View File

@ -24,25 +24,25 @@
</MenuFlyout> </MenuFlyout>
<ControlTheme x:Key="{x:Type TextBox}" TargetType="TextBox"> <ControlTheme x:Key="{x:Type TextBox}" TargetType="TextBox">
<Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxForeground}" /> <Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDefaultBackground}" /> <Setter Property="Background" Value="{DynamicResource TextBoxDefaultBackground}" />
<Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
<Setter Property="TextBox.SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" /> <Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="TextBox.SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" /> <Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="TextBox.BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
<Setter Property="TextBox.BackgroundSizing" Value="OuterBorderEdge" /> <Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
<Setter Property="TextBox.CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
<Setter Property="TextBox.FontSize" Value="14" /> <Setter Property="FontSize" Value="14" />
<Setter Property="TextBox.Cursor" Value="Ibeam" /> <Setter Property="Cursor" Value="Ibeam" />
<Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" /> <Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" /> <Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" />
<Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="TextBox.VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="TextBox.VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="TextBox.FocusAdorner" Value="{x:Null}" /> <Setter Property="FocusAdorner" Value="{x:Null}" />
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" /> <Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
<Setter Property="TextBox.ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" /> <Setter Property="ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" />
<Setter Property="TextBox.Template"> <Setter Property="Template">
<ControlTemplate TargetType="TextBox"> <ControlTemplate TargetType="TextBox">
<DataValidationErrors> <DataValidationErrors>
<Border <Border
@ -197,8 +197,8 @@
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderedPointeroverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderedPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^:disabled /template/ Border#PART_ContentPresenterBorder"> <Style Selector="^:disabled /template/ Border#PART_ContentPresenterBorder">
<Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDisabledBackground}" /> <Setter Property="Background" Value="{DynamicResource TextBoxDisabledBackground}" />
<Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" />
</Style> </Style>
<Style Selector="^:error"> <Style Selector="^:error">
@ -230,25 +230,25 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="NonErrorTextBox" TargetType="TextBox"> <ControlTheme x:Key="NonErrorTextBox" TargetType="TextBox">
<Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxForeground}" /> <Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDefaultBackground}" /> <Setter Property="Background" Value="{DynamicResource TextBoxDefaultBackground}" />
<Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
<Setter Property="TextBox.SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" /> <Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="TextBox.SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" /> <Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="TextBox.BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
<Setter Property="TextBox.BackgroundSizing" Value="OuterBorderEdge" /> <Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
<Setter Property="TextBox.CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
<Setter Property="TextBox.FontSize" Value="14" /> <Setter Property="FontSize" Value="14" />
<Setter Property="TextBox.Cursor" Value="Ibeam" /> <Setter Property="Cursor" Value="Ibeam" />
<Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" /> <Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" /> <Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" />
<Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="TextBox.VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="TextBox.VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="TextBox.FocusAdorner" Value="{x:Null}" /> <Setter Property="FocusAdorner" Value="{x:Null}" />
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" /> <Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
<Setter Property="TextBox.ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" /> <Setter Property="ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" />
<Setter Property="TextBox.Template"> <Setter Property="Template">
<ControlTemplate TargetType="TextBox"> <ControlTemplate TargetType="TextBox">
<DataValidationErrors Theme="{DynamicResource SilentDataValidationErrors}"> <DataValidationErrors Theme="{DynamicResource SilentDataValidationErrors}">
<Border <Border
@ -403,8 +403,8 @@
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderedPointeroverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderedPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^:disabled /template/ Border#PART_ContentPresenterBorder"> <Style Selector="^:disabled /template/ Border#PART_ContentPresenterBorder">
<Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDisabledBackground}" /> <Setter Property="Background" Value="{DynamicResource TextBoxDisabledBackground}" />
<Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" />
</Style> </Style>
<Style Selector="^:error"> <Style Selector="^:error">
@ -436,19 +436,19 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="LooklessTextBox" TargetType="TextBox"> <ControlTheme x:Key="LooklessTextBox" TargetType="TextBox">
<Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxForeground}" /> <Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="TextBox.SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" /> <Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="TextBox.SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" /> <Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="TextBox.FontSize" Value="14" /> <Setter Property="FontSize" Value="14" />
<Setter Property="TextBox.Cursor" Value="Ibeam" /> <Setter Property="Cursor" Value="Ibeam" />
<Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" /> <Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" /> <Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" />
<Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="TextBox.VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="TextBox.VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="TextBox.FocusAdorner" Value="{x:Null}" /> <Setter Property="FocusAdorner" Value="{x:Null}" />
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" /> <Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
<Setter Property="TextBox.Template"> <Setter Property="Template">
<ControlTemplate TargetType="TextBox"> <ControlTemplate TargetType="TextBox">
<Border Name="PART_ContentPresenterBorder" MinHeight="{TemplateBinding MinHeight}"> <Border Name="PART_ContentPresenterBorder" MinHeight="{TemplateBinding MinHeight}">
<Grid Margin="{TemplateBinding Padding}" ColumnDefinitions="Auto, *, Auto"> <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="ListBoxItemDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="ListBoxItemDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="ListBoxItemDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="ListBoxItemPointeroverForeground" Color="White" />
<SolidColorBrush x:Key="ListBoxItemPointeroverBackground" Opacity="0.12" 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="ListBoxItemPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ListBoxItemSelectedForeground" Color="White" />
<SolidColorBrush x:Key="ListBoxItemSelectedBackground" Opacity="0.2" Color="#54A9FF" /> <SolidColorBrush x:Key="ListBoxItemSelectedBackground" Opacity="0.2" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Opacity="0.3" Color="#54A9FF" /> <SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Opacity="0.3" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemDisabledBackground" Color="Transparent" /> <SolidColorBrush x:Key="ListBoxItemDisabledBackground" Color="Transparent" />

View File

@ -253,8 +253,11 @@
<SolidColorBrush x:Key="ListBoxItemDisabledForeground" Color="{StaticResource GrayTextColor}" /> <SolidColorBrush x:Key="ListBoxItemDisabledForeground" Color="{StaticResource GrayTextColor}" />
<SolidColorBrush x:Key="ListBoxItemDefaultBackground" Color="{StaticResource WindowColor}" /> <SolidColorBrush x:Key="ListBoxItemDefaultBackground" Color="{StaticResource WindowColor}" />
<SolidColorBrush x:Key="ListBoxItemPointeroverForeground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="ListBoxItemPointeroverBackground" Color="{StaticResource HighlightColor}" /> <SolidColorBrush x:Key="ListBoxItemPointeroverBackground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="ListBoxItemPressedForeground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="ListBoxItemPressedBackground" Color="{StaticResource HighlightColor}" /> <SolidColorBrush x:Key="ListBoxItemPressedBackground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="ListBoxItemSelectedForeground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="ListBoxItemSelectedBackground" Color="{StaticResource HighlightColor}" /> <SolidColorBrush x:Key="ListBoxItemSelectedBackground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Color="{StaticResource HighlightColor}" /> <SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="ListBoxItemDisabledBackground" Color="{StaticResource WindowColor}" /> <SolidColorBrush x:Key="ListBoxItemDisabledBackground" Color="{StaticResource WindowColor}" />
@ -523,13 +526,8 @@
<SolidColorBrush x:Key="TextBoxDisabledForeground" Color="{StaticResource GrayTextColor}" /> <SolidColorBrush x:Key="TextBoxDisabledForeground" Color="{StaticResource GrayTextColor}" />
<SolidColorBrush x:Key="TextBoxDisabledBorderBrush" 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="TextBoxSelectionBackground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="TextBoxSelectionForeground" Color="{StaticResource WindowTextColor}" /> <SolidColorBrush x:Key="TextBoxSelectionForeground" Color="{StaticResource HighlightTextColor}" />
<!-- ToggleButton --> <!-- ToggleButton -->
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Color="{StaticResource WindowColor}" /> <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="ListBoxItemDisabledForeground" Opacity="0.35" Color="#1C1F23" />
<SolidColorBrush x:Key="ListBoxItemDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="ListBoxItemDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="ListBoxItemPointeroverForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="ListBoxItemPointeroverBackground" Opacity="0.05" Color="#2E3238" /> <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="ListBoxItemPressedBackground" Opacity="0.09" Color="#2E3238" />
<SolidColorBrush x:Key="ListBoxItemSelectedForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="ListBoxItemSelectedBackground" Color="#EAF5FF" /> <SolidColorBrush x:Key="ListBoxItemSelectedBackground" Color="#EAF5FF" />
<SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Color="#CBE7FE" /> <SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Color="#CBE7FE" />
<SolidColorBrush x:Key="ListBoxItemDisabledBackground" Color="Transparent" /> <SolidColorBrush x:Key="ListBoxItemDisabledBackground" Color="Transparent" />