296 lines
20 KiB
XML
296 lines
20 KiB
XML
<ResourceDictionary
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib">
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
<sys:Double x:Key="MaxDropDownWidth">500</sys:Double>
|
|
<!-- SimpleStyles: ComboBox -->
|
|
<ControlTemplate x:Key="ComboBoxToggleButton" TargetType="ToggleButton">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="20" />
|
|
</Grid.ColumnDefinitions>
|
|
<Border
|
|
x:Name="Border"
|
|
Grid.ColumnSpan="1"
|
|
Grid.Column="1"
|
|
Background="{StaticResource Brush_FlatControlWindowBackground}"
|
|
BorderBrush="{StaticResource NormalBorderBrush}"
|
|
BorderThickness="0" />
|
|
<Border
|
|
x:Name="Content_Text"
|
|
Grid.Column="0"
|
|
Margin="0,0,1,0"
|
|
VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch"
|
|
Background="{DynamicResource Brush_FlatControlWindowBackground}"
|
|
BorderBrush="{StaticResource DefaultedBorderBrush}"
|
|
BorderThickness="0" />
|
|
<Path
|
|
x:Name="Arrow"
|
|
Grid.Column="1"
|
|
Fill="{StaticResource GlyphBrush}"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="M 0 0 L 4 4 L 8 0 Z"/>
|
|
<Path
|
|
x:Name="Lock"
|
|
Grid.Column="0"
|
|
Data="M5.5,3.5730734 C5.152669,3.5730734 4.8814287,3.5981388 4.6862793,3.6482687 C4.4911294,3.6983995 4.3452148,3.780756 4.2485352,3.895339 C4.1518555,4.0099225 4.0918779,4.1612082 4.0686035,4.3491964 C4.0453286,4.5371847 4.0336914,4.7672467 4.0336914,5.039382 L4.0336914,5.8826437 L6.9663086,5.8826437 L6.9663086,5.039382 C6.9663086,4.7672467 6.9555664,4.5371847 6.934082,4.3491964 C6.9125977,4.1612082 6.8544106,4.0099225 6.7595215,3.895339 C6.6646318,3.780756 6.5187173,3.6983995 6.3217773,3.6482687 C6.1248369,3.5981388 5.8509111,3.5730734 5.5,3.5730734 z M5.5,2.461257 C6.0514321,2.461257 6.4945474,2.5266056 6.8293457,2.6573019 C7.1641436,2.7879992 7.4219561,2.9688253 7.6027832,3.1997824 C7.7836099,3.4307399 7.9035645,3.7037706 7.9626465,4.0188742 C8.0217285,4.3339787 8.0512695,4.6741476 8.0512695,5.039382 L8.0512695,5.9094992 C8.1515293,5.9094992 8.248209,5.9291935 8.3413086,5.9685812 C8.4344072,6.0079694 8.5158691,6.0607853 8.5856934,6.1270285 C8.6555176,6.1932721 8.7110186,6.2702579 8.7521973,6.3579855 C8.793375,6.4457135 8.8139648,6.5379171 8.8139648,6.6345968 L8.8139648,10.67903 C8.8139648,10.782871 8.795166,10.879551 8.7575684,10.969069 C8.7199707,11.058588 8.6671543,11.138259 8.5991211,11.208083 C8.5310869,11.277907 8.4523106,11.332514 8.362793,11.371902 C8.2732744,11.411289 8.1783848,11.430984 8.078125,11.430984 L2.9379883,11.430984 C2.834147,11.430984 2.7365723,11.411289 2.6452637,11.371902 C2.5539551,11.332514 2.4742837,11.277907 2.40625,11.208083 C2.3382161,11.138259 2.2845051,11.058588 2.2451172,10.969069 C2.205729,10.879551 2.1860352,10.782871 2.1860352,10.67903 L2.1860352,6.6345968 C2.1860352,6.5379171 2.2066243,6.4457135 2.2478027,6.3579855 C2.288981,6.2702579 2.3444824,6.1932721 2.4143066,6.1270285 C2.4841309,6.0607853 2.563802,6.0079694 2.6533203,5.9685812 C2.7428384,5.9291935 2.8377278,5.9094992 2.9379883,5.9094992 L2.9379883,5.039382 C2.9379883,4.6741476 2.9684243,4.3339787 3.0292969,4.0188742 C3.0901692,3.7037706 3.2128091,3.4307399 3.3972168,3.1997824 C3.581624,2.9688253 3.8412271,2.7879992 4.1760254,2.6573019 C4.5108232,2.5266056 4.9521484,2.461257 5.5,2.461257 z"
|
|
HorizontalAlignment="Right"
|
|
Height="8.97" Margin="5" Stretch="Fill"
|
|
VerticalAlignment="Center"
|
|
Width="6.628"/>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="ToggleButton.IsMouseOver" Value="true">
|
|
<Setter TargetName="Border" Property="Background" Value="{StaticResource Brush_FlatControlMouseOverBackground}" />
|
|
<Setter TargetName="Content_Text" Property="Background" Value="{StaticResource Brush_FlatControlMouseOverBackground}" />
|
|
</Trigger>
|
|
<Trigger Property="ToggleButton.IsChecked" Value="true">
|
|
<Setter TargetName="Border" Property="Background" Value="{StaticResource Brush_FlatControlMouseOverBackground}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="Lock" Property="Fill" Value="{StaticResource Brush_FlatControlDisabledForeground}"/>
|
|
<Setter TargetName="Border" Property="Background" Value="{StaticResource Brush_FlatControlDisabledBackground}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource Brush_FlatControlBorder}" />
|
|
<Setter Property="Foreground" Value="{StaticResource Brush_FlatControlDisabledForeground}"/>
|
|
<Setter TargetName="Content_Text" Property="Background" Value="{StaticResource Brush_FlatControlDisabledBackground}"/>
|
|
<Setter TargetName="Arrow" Property="Fill" Value="{StaticResource Brush_FlatControlDisabledForeground}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
|
|
<ControlTemplate x:Key="ComboBoxTextBox" TargetType="TextBox" >
|
|
<Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}" />
|
|
</ControlTemplate>
|
|
|
|
<Style x:Key="FlatComboBoxStyle" TargetType="ComboBox">
|
|
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
|
|
<Setter Property="FontSize" Value="16" />
|
|
<!--7873 Font size is smaller in Name field than in combo-box fields-->
|
|
<Setter Property="FontFamily" Value="Segoe UI" />
|
|
<Setter Property="MinWidth" Value="40"/>
|
|
<Setter Property="Height" Value="22" />
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
<Setter Property="Margin" Value="5,2,5,2"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ComboBox">
|
|
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
|
<Grid>
|
|
<ToggleButton Name="ToggleButton"
|
|
Template="{StaticResource ComboBoxToggleButton}"
|
|
Grid.Column="2"
|
|
Focusable="false"
|
|
IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
|
|
ClickMode="Press">
|
|
</ToggleButton>
|
|
<ContentPresenter Name="ContentSite"
|
|
IsHitTestVisible="False"
|
|
Content="{TemplateBinding SelectionBoxItem}"
|
|
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
|
|
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
|
|
Margin="3,0,23,0"
|
|
VerticalAlignment="Center"
|
|
TextBlock.Foreground="{TemplateBinding Foreground}"
|
|
TextBlock.FontSize="{TemplateBinding FontSize}"
|
|
HorizontalAlignment="Left" />
|
|
<TextBox x:Name="PART_EditableTextBox"
|
|
Style="{x:Null}"
|
|
Template="{StaticResource ComboBoxTextBox}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Margin="3,0,23,0"
|
|
Focusable="True"
|
|
Background="Transparent"
|
|
Visibility="Hidden"
|
|
IsReadOnly="{TemplateBinding IsReadOnly}"/>
|
|
<Popup Name="Popup"
|
|
Placement="Bottom"
|
|
IsOpen="{TemplateBinding IsDropDownOpen}"
|
|
AllowsTransparency="True"
|
|
Focusable="False"
|
|
PopupAnimation="Slide">
|
|
<Grid Name="DropDown"
|
|
SnapsToDevicePixels="True"
|
|
TextBlock.FontSize="{TemplateBinding FontSize}"
|
|
MaxWidth="{TemplateBinding ActualWidth}"
|
|
MinWidth="{TemplateBinding ActualWidth}"
|
|
MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
|
<Border x:Name="DropDownBorder"
|
|
Background="{StaticResource Brush_FlatControlWindowBackground}"
|
|
BorderThickness="1"
|
|
BorderBrush="{StaticResource SolidBorderBrush}"/>
|
|
<ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True" Visibility="Visible">
|
|
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Popup>
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="HasItems" Value="false">
|
|
<Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground" Value="{StaticResource Brush_FlatControlDisabledForeground}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsGrouping" Value="true">
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
|
|
</Trigger>
|
|
<Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="true">
|
|
<Setter TargetName="DropDownBorder" Property="Margin" Value="0,0,0,0"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEditable" Value="true">
|
|
<Setter Property="IsTabStop" Value="false"/>
|
|
<Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible"/>
|
|
<Setter TargetName="ContentSite" Property="Visibility" Value="Hidden"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="FlatComboBoxStyleWideDrop" TargetType="ComboBox">
|
|
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
|
|
<Setter Property="FontSize" Value="16" />
|
|
<!--7873 Font size is smaller in Name field than in combo-box fields-->
|
|
<Setter Property="FontFamily" Value="Segoe UI" />
|
|
<Setter Property="MinWidth" Value="40"/>
|
|
<Setter Property="Height" Value="22" />
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
<Setter Property="Margin" Value="5,2,5,2"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ComboBox">
|
|
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
|
<Grid>
|
|
<ToggleButton Name="ToggleButton"
|
|
Template="{StaticResource ComboBoxToggleButton}"
|
|
Grid.Column="2"
|
|
Focusable="false"
|
|
IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
|
|
ClickMode="Press">
|
|
</ToggleButton>
|
|
<ContentPresenter Name="ContentSite"
|
|
IsHitTestVisible="False"
|
|
Content="{TemplateBinding SelectionBoxItem}"
|
|
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
|
|
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
|
|
Margin="3,0,23,0"
|
|
VerticalAlignment="Center"
|
|
TextBlock.Foreground="{TemplateBinding Foreground}"
|
|
TextBlock.FontSize="{TemplateBinding FontSize}"
|
|
HorizontalAlignment="Left" />
|
|
<TextBox x:Name="PART_EditableTextBox"
|
|
Style="{x:Null}"
|
|
Template="{StaticResource ComboBoxTextBox}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Margin="3,0,23,0"
|
|
Focusable="True"
|
|
Background="Transparent"
|
|
Visibility="Hidden"
|
|
IsReadOnly="{TemplateBinding IsReadOnly}"/>
|
|
<Popup Name="Popup"
|
|
Placement="Bottom"
|
|
IsOpen="{TemplateBinding IsDropDownOpen}"
|
|
AllowsTransparency="True"
|
|
Focusable="False"
|
|
PopupAnimation="Slide">
|
|
<Grid Name="DropDown"
|
|
SnapsToDevicePixels="True"
|
|
TextBlock.FontSize="{TemplateBinding FontSize}"
|
|
MaxWidth="{StaticResource MaxDropDownWidth}"
|
|
MinWidth="{TemplateBinding ActualWidth}"
|
|
MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
|
<Border x:Name="DropDownBorder"
|
|
Background="{StaticResource Brush_FlatControlWindowBackground}"
|
|
BorderThickness="1"
|
|
BorderBrush="{StaticResource SolidBorderBrush}"/>
|
|
<ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True" Visibility="Visible">
|
|
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Popup>
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="HasItems" Value="false">
|
|
<Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground" Value="{StaticResource Brush_FlatControlDisabledForeground}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsGrouping" Value="true">
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
|
|
</Trigger>
|
|
<Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="true">
|
|
<Setter TargetName="DropDownBorder" Property="Margin" Value="0,0,0,0"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEditable" Value="true">
|
|
<Setter Property="IsTabStop" Value="false"/>
|
|
<Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible"/>
|
|
<Setter TargetName="ContentSite" Property="Visibility" Value="Hidden"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- SimpleStyles: ComboBoxItem -->
|
|
<Style x:Key="{x:Type ComboBoxItem}" TargetType="ComboBoxItem">
|
|
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ComboBoxItem">
|
|
<Border
|
|
Name="Border"
|
|
Padding="0"
|
|
SnapsToDevicePixels="true">
|
|
<ContentPresenter />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsHighlighted" Value="true">
|
|
<Setter TargetName="Border" Property="Background" Value="{StaticResource Brush_FlatControlSelectedBackground}"/>
|
|
<Setter Property="Foreground" Value="{StaticResource Brush_FlatControlSelectedForeground}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground" Value="{StaticResource Brush_FlatControlForeground}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type ComboBox}" TargetType="ComboBox" BasedOn="{StaticResource FlatComboBoxStyle}" />
|
|
|
|
<Style x:Key="PageContentComboBoxStyle" TargetType="ComboBox" BasedOn="{StaticResource FlatComboBoxStyle}" >
|
|
<Setter Property="Margin" Value="5,2,5,2" />
|
|
<Setter Property="Height" Value="22" />
|
|
</Style>
|
|
<Style x:Key="PageContentComboBoxErrorStyle" TargetType="ComboBox" BasedOn="{StaticResource PageContentComboBoxStyle}">
|
|
<Setter Property="BorderThickness" Value="2" />
|
|
<Setter Property="BorderBrush" Value="Red" />
|
|
</Style>
|
|
</ResourceDictionary> |