|
@@ -12,7 +12,7 @@
|
|
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background" Color="Transparent" />
|
|
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background" Color="Transparent" />
|
|
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Border" Color="Transparent" />
|
|
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Border" Color="Transparent" />
|
|
<SolidColorBrush x:Key="ComboBox.MouseOver.Background" Color="#333333" />
|
|
<SolidColorBrush x:Key="ComboBox.MouseOver.Background" Color="#333333" />
|
|
- <SolidColorBrush x:Key="ComboBox.MouseOver.Border" Color="#007ACC" />
|
|
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.MouseOver.Border" Color="#FF0000" />
|
|
<SolidColorBrush x:Key="ComboBox.MouseOver.Glyph" Color="#007ACC" />
|
|
<SolidColorBrush x:Key="ComboBox.MouseOver.Glyph" Color="#007ACC" />
|
|
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Background" Color="#333333" />
|
|
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Background" Color="#333333" />
|
|
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Border" Color="#007ACC" />
|
|
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Border" Color="#007ACC" />
|
|
@@ -40,24 +40,18 @@
|
|
<Setter Property="Template">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
- <Border x:Name="templateRoot" Background="{StaticResource ComboBox.Static.Background}"
|
|
|
|
|
|
+ <Border x:Name="templateRoot" Background="{StaticResource AccentColor}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
+ CornerRadius="5"
|
|
BorderBrush="{StaticResource ComboBox.Static.Border}" SnapsToDevicePixels="true">
|
|
BorderBrush="{StaticResource ComboBox.Static.Border}" SnapsToDevicePixels="true">
|
|
- <Border x:Name="splitBorder" BorderThickness="1" BorderBrush="Transparent"
|
|
|
|
- HorizontalAlignment="Right" Margin="0" SnapsToDevicePixels="true"
|
|
|
|
- Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
|
|
|
|
- <Path x:Name="arrow"
|
|
|
|
- Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z"
|
|
|
|
- Fill="{StaticResource ComboBox.Static.Glyph}" HorizontalAlignment="Center" Margin="0"
|
|
|
|
- VerticalAlignment="Center" />
|
|
|
|
- </Border>
|
|
|
|
|
|
+ <Path x:Name="arrow"
|
|
|
|
+ Data="M 0 3 L 3 6 L 6 3 L 6 0 L 3 3 L 0 0 L 0 3 Z"
|
|
|
|
+ Fill="{StaticResource BrighterAccentColor}" HorizontalAlignment="Right" Margin="5"
|
|
|
|
+ VerticalAlignment="Center" />
|
|
</Border>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<ControlTemplate.Triggers>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<MultiDataTrigger.Conditions>
|
|
- <Condition
|
|
|
|
- Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
|
|
|
|
- Value="true" />
|
|
|
|
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
|
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
|
Value="false" />
|
|
Value="false" />
|
|
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
|
|
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
|
|
@@ -66,114 +60,34 @@
|
|
Value="true" />
|
|
Value="true" />
|
|
</MultiDataTrigger.Conditions>
|
|
</MultiDataTrigger.Conditions>
|
|
<Setter Property="Background" TargetName="templateRoot"
|
|
<Setter Property="Background" TargetName="templateRoot"
|
|
- Value="{StaticResource ComboBox.Static.Editable.Background}" />
|
|
|
|
|
|
+ Value="{StaticResource AccentColor}" />
|
|
<Setter Property="BorderBrush" TargetName="templateRoot"
|
|
<Setter Property="BorderBrush" TargetName="templateRoot"
|
|
- Value="{StaticResource ComboBox.Static.Editable.Border}" />
|
|
|
|
- <Setter Property="Background" TargetName="splitBorder"
|
|
|
|
- Value="{StaticResource ComboBox.Static.Editable.Button.Background}" />
|
|
|
|
- <Setter Property="BorderBrush" TargetName="splitBorder"
|
|
|
|
- Value="{StaticResource ComboBox.Static.Editable.Button.Border}" />
|
|
|
|
|
|
+ Value="{StaticResource BrighterAccentColor}" />
|
|
|
|
+ <Setter Property="Fill" TargetName="arrow"
|
|
|
|
+ Value="{StaticResource BrighterAccentColor}" />
|
|
</MultiDataTrigger>
|
|
</MultiDataTrigger>
|
|
- <Trigger Property="IsMouseOver" Value="true">
|
|
|
|
- <Setter Property="Fill" TargetName="arrow"
|
|
|
|
- Value="{StaticResource ComboBox.MouseOver.Glyph}" />
|
|
|
|
- </Trigger>
|
|
|
|
- <MultiDataTrigger>
|
|
|
|
- <MultiDataTrigger.Conditions>
|
|
|
|
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
|
|
|
- Value="true" />
|
|
|
|
- <Condition
|
|
|
|
- Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
|
|
|
|
- Value="false" />
|
|
|
|
- </MultiDataTrigger.Conditions>
|
|
|
|
- <Setter Property="Background" TargetName="templateRoot"
|
|
|
|
- Value="{StaticResource ComboBox.MouseOver.Background}" />
|
|
|
|
- <Setter Property="BorderBrush" TargetName="templateRoot"
|
|
|
|
- Value="{StaticResource ComboBox.MouseOver.Border}" />
|
|
|
|
- </MultiDataTrigger>
|
|
|
|
- <MultiDataTrigger>
|
|
|
|
- <MultiDataTrigger.Conditions>
|
|
|
|
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
|
|
|
- Value="true" />
|
|
|
|
- <Condition
|
|
|
|
- Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
|
|
|
|
- Value="true" />
|
|
|
|
- </MultiDataTrigger.Conditions>
|
|
|
|
|
|
+ <Trigger Property="IsEnabled" Value="false">
|
|
|
|
+ <Setter Property="Fill" TargetName="arrow" Value="{StaticResource AccentColor}" />
|
|
<Setter Property="Background" TargetName="templateRoot"
|
|
<Setter Property="Background" TargetName="templateRoot"
|
|
- Value="{StaticResource ComboBox.MouseOver.Editable.Background}" />
|
|
|
|
|
|
+ Value="{StaticResource DarkerAccentColor}" />
|
|
<Setter Property="BorderBrush" TargetName="templateRoot"
|
|
<Setter Property="BorderBrush" TargetName="templateRoot"
|
|
- Value="{StaticResource ComboBox.MouseOver.Editable.Border}" />
|
|
|
|
- <Setter Property="Background" TargetName="splitBorder"
|
|
|
|
- Value="{StaticResource ComboBox.MouseOver.Editable.Button.Background}" />
|
|
|
|
- <Setter Property="BorderBrush" TargetName="splitBorder"
|
|
|
|
- Value="{StaticResource ComboBox.MouseOver.Editable.Button.Border}" />
|
|
|
|
- </MultiDataTrigger>
|
|
|
|
- <Trigger Property="IsPressed" Value="true">
|
|
|
|
- <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Pressed.Glyph}" />
|
|
|
|
|
|
+ Value="{StaticResource AccentColor}" />
|
|
</Trigger>
|
|
</Trigger>
|
|
- <MultiDataTrigger>
|
|
|
|
- <MultiDataTrigger.Conditions>
|
|
|
|
- <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
|
|
|
|
- Value="true" />
|
|
|
|
- <Condition
|
|
|
|
- Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
|
|
|
|
- Value="false" />
|
|
|
|
- </MultiDataTrigger.Conditions>
|
|
|
|
- <Setter Property="Background" TargetName="templateRoot"
|
|
|
|
- Value="{StaticResource ComboBox.Pressed.Background}" />
|
|
|
|
- <Setter Property="BorderBrush" TargetName="templateRoot"
|
|
|
|
- Value="{StaticResource ComboBox.Pressed.Border}" />
|
|
|
|
- </MultiDataTrigger>
|
|
|
|
- <MultiDataTrigger>
|
|
|
|
- <MultiDataTrigger.Conditions>
|
|
|
|
- <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
|
|
|
|
- Value="true" />
|
|
|
|
- <Condition
|
|
|
|
- Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
|
|
|
|
- Value="true" />
|
|
|
|
- </MultiDataTrigger.Conditions>
|
|
|
|
|
|
+ <Trigger Property="IsMouseOver" Value="true">
|
|
|
|
+ <Setter Property="Fill" TargetName="arrow"
|
|
|
|
+ Value="{StaticResource AlmostLightModeAccentColor}" />
|
|
<Setter Property="Background" TargetName="templateRoot"
|
|
<Setter Property="Background" TargetName="templateRoot"
|
|
- Value="{StaticResource ComboBox.Pressed.Editable.Background}" />
|
|
|
|
|
|
+ Value="{StaticResource DarkerAccentColor}" />
|
|
<Setter Property="BorderBrush" TargetName="templateRoot"
|
|
<Setter Property="BorderBrush" TargetName="templateRoot"
|
|
- Value="{StaticResource ComboBox.Pressed.Editable.Border}" />
|
|
|
|
- <Setter Property="Background" TargetName="splitBorder"
|
|
|
|
- Value="{StaticResource ComboBox.Pressed.Editable.Button.Background}" />
|
|
|
|
- <Setter Property="BorderBrush" TargetName="splitBorder"
|
|
|
|
- Value="{StaticResource ComboBox.Pressed.Editable.Button.Border}" />
|
|
|
|
- </MultiDataTrigger>
|
|
|
|
- <Trigger Property="IsEnabled" Value="false">
|
|
|
|
- <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Disabled.Glyph}" />
|
|
|
|
|
|
+ Value="{StaticResource AlmostLightModeAccentColor}" />
|
|
</Trigger>
|
|
</Trigger>
|
|
- <MultiDataTrigger>
|
|
|
|
- <MultiDataTrigger.Conditions>
|
|
|
|
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}"
|
|
|
|
- Value="false" />
|
|
|
|
- <Condition
|
|
|
|
- Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
|
|
|
|
- Value="false" />
|
|
|
|
- </MultiDataTrigger.Conditions>
|
|
|
|
- <Setter Property="Background" TargetName="templateRoot"
|
|
|
|
- Value="{StaticResource ComboBox.Disabled.Background}" />
|
|
|
|
- <Setter Property="BorderBrush" TargetName="templateRoot"
|
|
|
|
- Value="{StaticResource ComboBox.Disabled.Border}" />
|
|
|
|
- </MultiDataTrigger>
|
|
|
|
- <MultiDataTrigger>
|
|
|
|
- <MultiDataTrigger.Conditions>
|
|
|
|
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}"
|
|
|
|
- Value="false" />
|
|
|
|
- <Condition
|
|
|
|
- Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
|
|
|
|
- Value="true" />
|
|
|
|
- </MultiDataTrigger.Conditions>
|
|
|
|
|
|
+ <Trigger Property="IsPressed" Value="true">
|
|
|
|
+ <Setter Property="Fill" TargetName="arrow" Value="{StaticResource AlmostLightModeAccentColor}" />
|
|
<Setter Property="Background" TargetName="templateRoot"
|
|
<Setter Property="Background" TargetName="templateRoot"
|
|
- Value="{StaticResource ComboBox.Disabled.Editable.Background}" />
|
|
|
|
|
|
+ Value="{StaticResource DarkerAccentColor}" />
|
|
<Setter Property="BorderBrush" TargetName="templateRoot"
|
|
<Setter Property="BorderBrush" TargetName="templateRoot"
|
|
- Value="{StaticResource ComboBox.Disabled.Editable.Border}" />
|
|
|
|
- <Setter Property="Background" TargetName="splitBorder"
|
|
|
|
- Value="{StaticResource ComboBox.Disabled.Editable.Button.Background}" />
|
|
|
|
- <Setter Property="BorderBrush" TargetName="splitBorder"
|
|
|
|
- Value="{StaticResource ComboBox.Disabled.Editable.Button.Border}" />
|
|
|
|
- </MultiDataTrigger>
|
|
|
|
|
|
+ Value="{StaticResource AlmostLightModeAccentColor}" />
|
|
|
|
+ </Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter.Value>
|
|
@@ -183,7 +97,7 @@
|
|
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
|
|
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
|
|
<Grid.ColumnDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
- <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
|
|
|
|
|
|
+ <ColumnDefinition MinWidth="13"
|
|
Width="0" />
|
|
Width="0" />
|
|
</Grid.ColumnDefinitions>
|
|
</Grid.ColumnDefinitions>
|
|
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2"
|
|
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2"
|
|
@@ -192,10 +106,10 @@
|
|
<theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" CornerRadius="5"
|
|
<theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" CornerRadius="5"
|
|
MinWidth="{Binding ActualWidth, ElementName=templateRoot}"
|
|
MinWidth="{Binding ActualWidth, ElementName=templateRoot}"
|
|
MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
|
MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
|
- <Border x:Name="dropDownBorder"
|
|
|
|
- Background="{StaticResource DarkerAccentColor}" BorderThickness="0"
|
|
|
|
- BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}">
|
|
|
|
- <ScrollViewer x:Name="DropDownScrollViewer">
|
|
|
|
|
|
+ <Border x:Name="dropDownBorder" CornerRadius="5"
|
|
|
|
+ Background="{StaticResource DarkerAccentColor}" BorderThickness="1"
|
|
|
|
+ BorderBrush="{StaticResource BrighterAccentColor}">
|
|
|
|
+ <ScrollViewer x:Name="DropDownScrollViewer" Margin="1">
|
|
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
|
|
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
|
|
<Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top"
|
|
<Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top"
|
|
Width="0">
|
|
Width="0">
|
|
@@ -259,7 +173,7 @@
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="Template" Value="{DynamicResource DarkComboBox}" />
|
|
<Setter Property="Template" Value="{DynamicResource DarkComboBox}" />
|
|
</Style>
|
|
</Style>
|
|
-
|
|
|
|
|
|
+
|
|
<Style TargetType="ComboBoxItem">
|
|
<Style TargetType="ComboBoxItem">
|
|
<Setter Property="Background" Value="{StaticResource DarkerAccentColor}" />
|
|
<Setter Property="Background" Value="{StaticResource DarkerAccentColor}" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
@@ -270,7 +184,7 @@
|
|
<ControlTemplate TargetType="ComboBoxItem">
|
|
<ControlTemplate TargetType="ComboBoxItem">
|
|
<Border Name="Bd" Background="{TemplateBinding Background}" BorderThickness="0">
|
|
<Border Name="Bd" Background="{TemplateBinding Background}" BorderThickness="0">
|
|
<ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Stretch"
|
|
<ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Stretch"
|
|
- VerticalAlignment="Center" Margin="3,2"/>
|
|
|
|
|
|
+ VerticalAlignment="Center" Margin="4,2"/>
|
|
</Border>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsHighlighted" Value="True">
|
|
<Trigger Property="IsHighlighted" Value="True">
|
|
@@ -288,8 +202,6 @@
|
|
<Style TargetType="Separator">
|
|
<Style TargetType="Separator">
|
|
<Setter Property="Height"
|
|
<Setter Property="Height"
|
|
Value="1" />
|
|
Value="1" />
|
|
- <Setter Property="Margin"
|
|
|
|
- Value="0,4,0,4" />
|
|
|
|
<Setter Property="Template">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Separator">
|
|
<ControlTemplate TargetType="Separator">
|