|
|
|
@ -1,9 +1,12 @@ |
|
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
|
|
xmlns:local="clr-namespace:Microsoft.Windows.Controls" |
|
|
|
xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters" |
|
|
|
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes" |
|
|
|
xmlns:primitives="clr-namespace:Microsoft.Windows.Controls.Primitives" > |
|
|
|
|
|
|
|
|
|
|
|
<coreConverters:InverseBoolConverter x:Key="InverseBoolConverter" /> |
|
|
|
|
|
|
|
<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/> |
|
|
|
|
|
|
|
<Geometry x:Key="DownArrowGeometry">M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z</Geometry> |
|
|
|
@ -12,7 +15,6 @@ |
|
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/> |
|
|
|
<Setter Property="IsTabStop" Value="false"/> |
|
|
|
<Setter Property="Focusable" Value="false"/> |
|
|
|
<Setter Property="ClickMode" Value="Press"/> |
|
|
|
<Setter Property="Template"> |
|
|
|
<Setter.Value> |
|
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}"> |
|
|
|
@ -61,7 +63,7 @@ |
|
|
|
<ColumnDefinition Width="*"/> |
|
|
|
<ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom"> |
|
|
|
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" StaysOpen="False" Margin="1" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom"> |
|
|
|
<Grid MinWidth="{Binding ActualWidth, ElementName=MainGrid}"> |
|
|
|
<Border x:Name="DropDownBorder" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"> |
|
|
|
<ScrollViewer x:Name="DropDownScrollViewer"> |
|
|
|
@ -78,7 +80,8 @@ |
|
|
|
|
|
|
|
<Border Grid.ColumnSpan="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/> |
|
|
|
<TextBox Text="{TemplateBinding Text}" IsReadOnly="True" BorderThickness="0" Background="Transparent" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/> |
|
|
|
<ToggleButton x:Name="PART_DropDownButton" Grid.Column="1" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}" /> |
|
|
|
<ToggleButton x:Name="PART_DropDownButton" Grid.Column="1" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}" |
|
|
|
IsHitTestVisible="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"/> |
|
|
|
</Grid> |
|
|
|
</ControlTemplate> |
|
|
|
</Setter.Value> |
|
|
|
|