|
@@ -1,124 +1,177 @@
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:PixiEditor"
|
|
xmlns:local="clr-namespace:PixiEditor"
|
|
- xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
|
|
|
|
|
|
+ xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
|
|
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Static.Background" Color="#333333"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Static.Border" Color="#2F2F37"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="#FF606060"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Static.Editable.Background" Color="#333333"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Static.Editable.Border" Color="#2F2F37"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background" 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.Border" 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.Border" Color="#007ACC"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Background" Color="#333333"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Border" Color="#FF7EB4EA"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Pressed.Background" Color="#333333"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Pressed.Border" Color="#007ACC"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Pressed.Glyph" Color="#007ACC"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Background" Color="#202020"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Border" Color="#007ACC"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Background" Color="#007ACC"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Border" Color="#FF569DE5"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Disabled.Background" Color="#FFF0F0F0"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Disabled.Border" Color="#FFD9D9D9"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Disabled.Glyph" Color="#FFBFBFBF"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Background" Color="#FFFFFFFF"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Border" Color="#FFBFBFBF"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Background" Color="Transparent"/>
|
|
|
|
- <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Border" Color="Transparent"/>
|
|
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Static.Background" Color="#333333" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Static.Border" Color="#2F2F37" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="#FF606060" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Static.Editable.Background" Color="#333333" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Static.Editable.Border" Color="#2F2F37" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background" 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.Border" 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.Border" Color="#007ACC" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Background" Color="#333333" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Border" Color="#FF7EB4EA" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Pressed.Background" Color="#333333" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Pressed.Border" Color="#007ACC" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Pressed.Glyph" Color="#007ACC" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Background" Color="#202020" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Border" Color="#007ACC" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Background" Color="#007ACC" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Border" Color="#FF569DE5" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Disabled.Background" Color="#FFF0F0F0" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Disabled.Border" Color="#FFD9D9D9" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Disabled.Glyph" Color="#FFBFBFBF" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Background" Color="#FFFFFFFF" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Border" Color="#FFBFBFBF" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Background" Color="Transparent" />
|
|
|
|
+ <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Border" Color="Transparent" />
|
|
<Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
|
|
<Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
|
|
- <Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
|
|
- <Setter Property="IsTabStop" Value="false"/>
|
|
|
|
- <Setter Property="Focusable" Value="false"/>
|
|
|
|
- <Setter Property="ClickMode" Value="Press"/>
|
|
|
|
|
|
+ <Setter Property="OverridesDefaultStyle" Value="true" />
|
|
|
|
+ <Setter Property="IsTabStop" Value="false" />
|
|
|
|
+ <Setter Property="Focusable" Value="false" />
|
|
|
|
+ <Setter Property="ClickMode" Value="Press" />
|
|
<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}" BorderThickness="{TemplateBinding BorderThickness}" 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 x:Name="templateRoot" Background="{StaticResource ComboBox.Static.Background}"
|
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
+ 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>
|
|
</Border>
|
|
</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}}" Value="false"/>
|
|
|
|
- <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="false"/>
|
|
|
|
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="true"/>
|
|
|
|
|
|
+ <Condition
|
|
|
|
+ Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
|
|
|
|
+ Value="true" />
|
|
|
|
+ <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
|
|
|
+ Value="false" />
|
|
|
|
+ <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
|
|
|
|
+ Value="false" />
|
|
|
|
+ <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}"
|
|
|
|
+ Value="true" />
|
|
</MultiDataTrigger.Conditions>
|
|
</MultiDataTrigger.Conditions>
|
|
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Static.Editable.Background}"/>
|
|
|
|
- <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}"/>
|
|
|
|
|
|
+ <Setter Property="Background" TargetName="templateRoot"
|
|
|
|
+ Value="{StaticResource ComboBox.Static.Editable.Background}" />
|
|
|
|
+ <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}" />
|
|
</MultiDataTrigger>
|
|
</MultiDataTrigger>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
- <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.MouseOver.Glyph}"/>
|
|
|
|
|
|
+ <Setter Property="Fill" TargetName="arrow"
|
|
|
|
+ Value="{StaticResource ComboBox.MouseOver.Glyph}" />
|
|
</Trigger>
|
|
</Trigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<MultiDataTrigger.Conditions>
|
|
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
|
|
|
|
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
|
|
|
|
|
|
+ <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
|
|
|
+ Value="true" />
|
|
|
|
+ <Condition
|
|
|
|
+ Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
|
|
|
|
+ Value="false" />
|
|
</MultiDataTrigger.Conditions>
|
|
</MultiDataTrigger.Conditions>
|
|
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Background}"/>
|
|
|
|
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Border}"/>
|
|
|
|
|
|
+ <Setter Property="Background" TargetName="templateRoot"
|
|
|
|
+ Value="{StaticResource ComboBox.MouseOver.Background}" />
|
|
|
|
+ <Setter Property="BorderBrush" TargetName="templateRoot"
|
|
|
|
+ Value="{StaticResource ComboBox.MouseOver.Border}" />
|
|
</MultiDataTrigger>
|
|
</MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<MultiDataTrigger.Conditions>
|
|
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
|
|
|
|
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
|
|
|
|
|
|
+ <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
|
|
|
+ Value="true" />
|
|
|
|
+ <Condition
|
|
|
|
+ Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
|
|
|
|
+ Value="true" />
|
|
</MultiDataTrigger.Conditions>
|
|
</MultiDataTrigger.Conditions>
|
|
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Background}"/>
|
|
|
|
- <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}"/>
|
|
|
|
|
|
+ <Setter Property="Background" TargetName="templateRoot"
|
|
|
|
+ Value="{StaticResource ComboBox.MouseOver.Editable.Background}" />
|
|
|
|
+ <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>
|
|
</MultiDataTrigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Trigger Property="IsPressed" Value="true">
|
|
- <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Pressed.Glyph}"/>
|
|
|
|
|
|
+ <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Pressed.Glyph}" />
|
|
</Trigger>
|
|
</Trigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<MultiDataTrigger.Conditions>
|
|
- <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
|
|
|
|
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
|
|
|
|
|
|
+ <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
|
|
|
|
+ Value="true" />
|
|
|
|
+ <Condition
|
|
|
|
+ Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
|
|
|
|
+ Value="false" />
|
|
</MultiDataTrigger.Conditions>
|
|
</MultiDataTrigger.Conditions>
|
|
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Background}"/>
|
|
|
|
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Border}"/>
|
|
|
|
|
|
+ <Setter Property="Background" TargetName="templateRoot"
|
|
|
|
+ Value="{StaticResource ComboBox.Pressed.Background}" />
|
|
|
|
+ <Setter Property="BorderBrush" TargetName="templateRoot"
|
|
|
|
+ Value="{StaticResource ComboBox.Pressed.Border}" />
|
|
</MultiDataTrigger>
|
|
</MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<MultiDataTrigger.Conditions>
|
|
- <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
|
|
|
|
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
|
|
|
|
|
|
+ <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
|
|
|
|
+ Value="true" />
|
|
|
|
+ <Condition
|
|
|
|
+ Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
|
|
|
|
+ Value="true" />
|
|
</MultiDataTrigger.Conditions>
|
|
</MultiDataTrigger.Conditions>
|
|
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Editable.Background}"/>
|
|
|
|
- <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}"/>
|
|
|
|
|
|
+ <Setter Property="Background" TargetName="templateRoot"
|
|
|
|
+ Value="{StaticResource ComboBox.Pressed.Editable.Background}" />
|
|
|
|
+ <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>
|
|
</MultiDataTrigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
- <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Disabled.Glyph}"/>
|
|
|
|
|
|
+ <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Disabled.Glyph}" />
|
|
</Trigger>
|
|
</Trigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<MultiDataTrigger.Conditions>
|
|
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
|
|
|
|
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
|
|
|
|
|
|
+ <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}"
|
|
|
|
+ Value="false" />
|
|
|
|
+ <Condition
|
|
|
|
+ Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
|
|
|
|
+ Value="false" />
|
|
</MultiDataTrigger.Conditions>
|
|
</MultiDataTrigger.Conditions>
|
|
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Background}"/>
|
|
|
|
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Border}"/>
|
|
|
|
|
|
+ <Setter Property="Background" TargetName="templateRoot"
|
|
|
|
+ Value="{StaticResource ComboBox.Disabled.Background}" />
|
|
|
|
+ <Setter Property="BorderBrush" TargetName="templateRoot"
|
|
|
|
+ Value="{StaticResource ComboBox.Disabled.Border}" />
|
|
</MultiDataTrigger>
|
|
</MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<MultiDataTrigger.Conditions>
|
|
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
|
|
|
|
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
|
|
|
|
|
|
+ <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}"
|
|
|
|
+ Value="false" />
|
|
|
|
+ <Condition
|
|
|
|
+ Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
|
|
|
|
+ Value="true" />
|
|
</MultiDataTrigger.Conditions>
|
|
</MultiDataTrigger.Conditions>
|
|
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Editable.Background}"/>
|
|
|
|
- <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}"/>
|
|
|
|
|
|
+ <Setter Property="Background" TargetName="templateRoot"
|
|
|
|
+ Value="{StaticResource ComboBox.Disabled.Editable.Background}" />
|
|
|
|
+ <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>
|
|
</MultiDataTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</ControlTemplate>
|
|
@@ -128,70 +181,97 @@
|
|
<ControlTemplate x:Key="DarkComboBox" TargetType="{x:Type ComboBox}">
|
|
<ControlTemplate x:Key="DarkComboBox" TargetType="{x:Type ComboBox}">
|
|
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
|
|
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
|
|
<Grid.ColumnDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
- <ColumnDefinition Width="*"/>
|
|
|
|
- <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
|
|
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
+ <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
|
|
|
|
+ Width="0" />
|
|
</Grid.ColumnDefinitions>
|
|
</Grid.ColumnDefinitions>
|
|
- <Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" Placement="Bottom">
|
|
|
|
- <theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
|
|
|
- <Border x:Name="dropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderThickness="1" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}">
|
|
|
|
|
|
+ <Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2"
|
|
|
|
+ IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
|
|
+ Margin="1" Placement="Bottom">
|
|
|
|
+ <theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent"
|
|
|
|
+ MinWidth="{Binding ActualWidth, ElementName=templateRoot}"
|
|
|
|
+ MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
|
|
|
+ <Border x:Name="dropDownBorder"
|
|
|
|
+ Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderThickness="1"
|
|
|
|
+ BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}">
|
|
<ScrollViewer x:Name="DropDownScrollViewer">
|
|
<ScrollViewer x:Name="DropDownScrollViewer">
|
|
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
|
|
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
|
|
- <Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
|
|
|
|
- <Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
|
|
|
|
|
|
+ <Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top"
|
|
|
|
+ Width="0">
|
|
|
|
+ <Rectangle x:Name="opaqueRect"
|
|
|
|
+ Fill="{Binding Background, ElementName=dropDownBorder}"
|
|
|
|
+ Height="{Binding ActualHeight, ElementName=dropDownBorder}"
|
|
|
|
+ Width="{Binding ActualWidth, ElementName=dropDownBorder}" />
|
|
</Canvas>
|
|
</Canvas>
|
|
- <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
|
|
|
|
|
+ <ItemsPresenter x:Name="ItemsPresenter"
|
|
|
|
+ KeyboardNavigation.DirectionalNavigation="Contained"
|
|
|
|
+ SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</Grid>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</ScrollViewer>
|
|
</Border>
|
|
</Border>
|
|
</theme:SystemDropShadowChrome>
|
|
</theme:SystemDropShadowChrome>
|
|
</Popup>
|
|
</Popup>
|
|
- <ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
|
|
|
|
- <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" Content="{TemplateBinding SelectionBoxItem}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
|
|
|
|
+ <ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}"
|
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
+ BorderBrush="{TemplateBinding BorderBrush}" Grid.ColumnSpan="2"
|
|
|
|
+ IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
|
|
+ Style="{StaticResource ComboBoxToggleButton}" />
|
|
|
|
+ <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
|
|
|
|
+ Content="{TemplateBinding SelectionBoxItem}"
|
|
|
|
+ ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
|
|
|
|
+ ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
|
|
|
|
+ HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
|
+ IsHitTestVisible="false" Margin="{TemplateBinding Padding}"
|
|
|
|
+ SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
|
|
+ VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
|
</Grid>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
|
|
<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
|
|
- <Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
|
|
|
|
- <Setter Property="Color" TargetName="shadow" Value="#71000000"/>
|
|
|
|
|
|
+ <Setter Property="Margin" TargetName="shadow" Value="0,0,5,5" />
|
|
|
|
+ <Setter Property="Color" TargetName="shadow" Value="#71000000" />
|
|
</Trigger>
|
|
</Trigger>
|
|
<Trigger Property="HasItems" Value="false">
|
|
<Trigger Property="HasItems" Value="false">
|
|
- <Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
|
|
|
|
|
|
+ <Setter Property="Height" TargetName="dropDownBorder" Value="95" />
|
|
</Trigger>
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<MultiTrigger.Conditions>
|
|
- <Condition Property="IsGrouping" Value="true"/>
|
|
|
|
- <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
|
|
|
|
|
|
+ <Condition Property="IsGrouping" Value="true" />
|
|
|
|
+ <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
|
|
</MultiTrigger.Conditions>
|
|
</MultiTrigger.Conditions>
|
|
- <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
|
|
|
|
|
|
+ <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
|
|
</MultiTrigger>
|
|
</MultiTrigger>
|
|
<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
|
|
<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
|
|
- <Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
|
|
|
|
- <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
|
|
|
|
|
|
+ <Setter Property="Canvas.Top" TargetName="opaqueRect"
|
|
|
|
+ Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
|
|
|
|
+ <Setter Property="Canvas.Left" TargetName="opaqueRect"
|
|
|
|
+ Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
|
|
</Trigger>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</ControlTemplate>
|
|
|
|
|
|
<Style TargetType="ComboBox">
|
|
<Style TargetType="ComboBox">
|
|
- <Setter Property="Foreground" Value="White"/>
|
|
|
|
- <Setter Property="Template" Value="{DynamicResource DarkComboBox}"/>
|
|
|
|
|
|
+ <Setter Property="Foreground" Value="White" />
|
|
|
|
+ <Setter Property="Template" Value="{DynamicResource DarkComboBox}" />
|
|
</Style>
|
|
</Style>
|
|
|
|
|
|
<Style TargetType="ComboBoxItem">
|
|
<Style TargetType="ComboBoxItem">
|
|
- <Setter Property="Background" Value="#111111"/>
|
|
|
|
- <Setter Property="Foreground" Value="White"/>
|
|
|
|
- <Setter Property="BorderThickness" Value="0"/>
|
|
|
|
- <Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
|
|
|
|
+ <Setter Property="Background" Value="#111111" />
|
|
|
|
+ <Setter Property="Foreground" Value="White" />
|
|
|
|
+ <Setter Property="BorderThickness" Value="0" />
|
|
|
|
+ <Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="Template">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<Setter.Value>
|
|
<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="Center" VerticalAlignment="Center"/>
|
|
|
|
|
|
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center"
|
|
|
|
+ VerticalAlignment="Center" />
|
|
</Border>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<ControlTemplate.Triggers>
|
|
- <Trigger Property="IsHighlighted" Value="True">
|
|
|
|
- <Setter Property="Background" TargetName="Bd" Value="Gray"/>
|
|
|
|
|
|
+ <Trigger Property="IsHighlighted" Value="True">
|
|
|
|
+ <Setter Property="Background" TargetName="Bd" Value="Gray" />
|
|
</Trigger>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
- <Setter Property="Foreground" Value="Gray"/>
|
|
|
|
|
|
+ <Setter Property="Foreground" Value="Gray" />
|
|
</Trigger>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</ControlTemplate>
|