148 lines
7.0 KiB
XML
148 lines
7.0 KiB
XML
<ResourceDictionary
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
|
|
<ResourceDictionary.MergedDictionaries>
|
|
|
|
<ResourceDictionary Source="..\Colors\Colors.xaml" />
|
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
<Style x:Key="ComboBoxFocusVisual">
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Rectangle
|
|
Margin="4,4,21,4"
|
|
SnapsToDevicePixels="true"
|
|
Stroke="Black"
|
|
StrokeDashArray="1 2"
|
|
StrokeThickness="1" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- Control Templates -->
|
|
<ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
|
|
<Grid SnapsToDevicePixels="true">
|
|
<Border
|
|
x:Name="Bd"
|
|
Padding="1"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}">
|
|
<Grid Grid.IsSharedSizeScope="true">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="ComboBoxButton" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBox
|
|
x:Name="PART_EditableTextBox"
|
|
Grid.Column="1"
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
IsReadOnly="{Binding Path=IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Style="{DynamicResource ComboBoxEditableTextBox}" />
|
|
<ToggleButton
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="3"
|
|
Background="{x:Null}"
|
|
IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Style="{DynamicResource ComboBoxTransparentButtonStyle}" />
|
|
</Grid>
|
|
</Border>
|
|
<Popup
|
|
x:Name="PART_Popup"
|
|
AllowsTransparency="true"
|
|
Focusable="false"
|
|
IsOpen="{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Placement="Bottom"
|
|
PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
|
|
<Microsoft_Windows_Themes:SystemDropShadowChrome
|
|
x:Name="Shdw"
|
|
MinWidth="{TemplateBinding ActualWidth}"
|
|
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
|
Color="Transparent">
|
|
<Border
|
|
x:Name="DropDownBorder"
|
|
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
|
|
BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
|
|
BorderThickness="1">
|
|
<ScrollViewer>
|
|
<ItemsPresenter KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</ScrollViewer>
|
|
</Border>
|
|
</Microsoft_Windows_Themes:SystemDropShadowChrome>
|
|
</Popup>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="HasItems" Value="false">
|
|
<Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
|
|
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
|
|
</Trigger>
|
|
<Trigger Property="IsGrouping" Value="true">
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="false" />
|
|
</Trigger>
|
|
<Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
|
|
<Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
|
|
<Setter TargetName="Shdw" Property="Color" Value="#71000000" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
|
|
<ControlTemplate x:Key="NavigationGroupTemplate2" TargetType="{x:Type GroupBox}">
|
|
<Grid SnapsToDevicePixels="True">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Border
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Background="{DynamicResource NavigationHeaderBrush}"
|
|
CornerRadius="1,1,1,1">
|
|
<Border
|
|
x:Name="Header"
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Margin="8"
|
|
Padding="0"
|
|
Background="{x:Null}">
|
|
<ContentPresenter
|
|
Margin="0,0,0,0"
|
|
Content="{TemplateBinding Header}"
|
|
ContentSource="Header"
|
|
ContentStringFormat="{TemplateBinding HeaderStringFormat}"
|
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
|
RecognizesAccessKey="True"
|
|
RenderTransformOrigin="0,0.5"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</Border>
|
|
</Border>
|
|
|
|
|
|
<Border
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Margin="0,2,0,0"
|
|
Padding="0,0,0,0"
|
|
Background="{DynamicResource NavigationContentBrush}"
|
|
CornerRadius="1,1,1,1">
|
|
<ContentPresenter
|
|
Content="{TemplateBinding Content}"
|
|
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</Border>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</ResourceDictionary> |