|
@@ -2,6 +2,7 @@
|
|
x:Class="PDF_Office.App"
|
|
x:Class="PDF_Office.App"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
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:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2"
|
|
xmlns:local="clr-namespace:PDF_Office"
|
|
xmlns:local="clr-namespace:PDF_Office"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib">
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib">
|
|
@@ -344,7 +345,405 @@
|
|
</Setter>
|
|
</Setter>
|
|
</Style>
|
|
</Style>
|
|
|
|
|
|
|
|
+ <!-- Design Token ComboboxItem -->
|
|
|
|
+ <Style TargetType="{x:Type ComboBoxItem}">
|
|
|
|
+ <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
|
|
|
|
+ <Setter Property="BorderThickness" Value="0" />
|
|
|
|
+ <Setter Property="Padding" Value="8,0" />
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="{x:Type ComboBoxItem}">
|
|
|
|
+ <Border
|
|
|
|
+ Name="Bd"
|
|
|
|
+ Padding="{TemplateBinding Control.Padding}"
|
|
|
|
+ Background="{TemplateBinding Panel.Background}"
|
|
|
|
+ BorderBrush="{TemplateBinding Border.BorderBrush}"
|
|
|
|
+ BorderThickness="{TemplateBinding Border.BorderThickness}"
|
|
|
|
+ CornerRadius="{StaticResource border-radius.4}"
|
|
|
|
+ SnapsToDevicePixels="True">
|
|
|
|
+ <ContentPresenter
|
|
|
|
+ HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
|
|
|
|
+ VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
|
|
|
|
+ Content="{TemplateBinding ContentControl.Content}"
|
|
|
|
+ ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
|
|
|
|
+ ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
|
|
|
|
+ SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
|
|
|
|
+ </Border>
|
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
|
+ <Trigger Property="UIElement.IsEnabled" Value="False">
|
|
|
|
+ <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.dis}" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <MultiTrigger>
|
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
|
+ <Condition Property="Selector.IsSelected" Value="False" />
|
|
|
|
+ <Condition Property="UIElement.IsMouseOver" Value="True" />
|
|
|
|
+ <Condition Property="UIElement.IsKeyboardFocused" Value="False" />
|
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
|
+ <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.hov.bg}" />
|
|
|
|
+ <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#A826A0DA" />
|
|
|
|
+ </MultiTrigger>
|
|
|
|
+ <MultiTrigger>
|
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
|
+ <Condition Property="Selector.IsSelected" Value="True" />
|
|
|
|
+ <Condition Property="UIElement.IsMouseOver" Value="False" />
|
|
|
|
+ <Condition Property="UIElement.IsKeyboardFocused" Value="True" />
|
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
|
+ <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.sel.bg.lv1}" />
|
|
|
|
+ <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#26A0DA" />
|
|
|
|
+ </MultiTrigger>
|
|
|
|
+ <MultiTrigger>
|
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
|
+ <Condition Property="Selector.IsSelected" Value="True" />
|
|
|
|
+ <Condition Property="UIElement.IsMouseOver" Value="True" />
|
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
|
+ <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.hov.bg}" />
|
|
|
|
+ <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A477EDE" />
|
|
|
|
+ </MultiTrigger>
|
|
|
|
+ <MultiTrigger>
|
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
|
+ <Condition Property="Selector.IsSelected" Value="True" />
|
|
|
|
+ <Condition Property="UIElement.IsMouseOver" Value="False" />
|
|
|
|
+ <Condition Property="UIElement.IsKeyboardFocused" Value="False" />
|
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
|
+ <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.sel.bg.lv1}" />
|
|
|
|
+ <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#DADADA" />
|
|
|
|
+ </MultiTrigger>
|
|
|
|
+ <MultiTrigger>
|
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
|
+ <Condition Property="Selector.IsSelected" Value="False" />
|
|
|
|
+ <Condition Property="UIElement.IsMouseOver" Value="False" />
|
|
|
|
+ <Condition Property="UIElement.IsKeyboardFocused" Value="True" />
|
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
|
+ <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#26A0DA" />
|
|
|
|
+ </MultiTrigger>
|
|
|
|
+ <MultiTrigger>
|
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
|
+ <Condition Property="Selector.IsSelected" Value="False" />
|
|
|
|
+ <Condition Property="UIElement.IsMouseOver" Value="True" />
|
|
|
|
+ <Condition Property="UIElement.IsKeyboardFocused" Value="True" />
|
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
|
+ <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.hov.bg}" />
|
|
|
|
+ <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A000000" />
|
|
|
|
+ </MultiTrigger>
|
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Style>
|
|
|
|
|
|
|
|
+ <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="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
|
|
+ <Border
|
|
|
|
+ x:Name="templateRoot"
|
|
|
|
+ Background="Transparent"
|
|
|
|
+ BorderBrush="{StaticResource color.field.border.norm}"
|
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
+ CornerRadius="{StaticResource border-radius.4}"
|
|
|
|
+ SnapsToDevicePixels="true">
|
|
|
|
+ <Border
|
|
|
|
+ x:Name="splitBorder"
|
|
|
|
+ Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
|
|
|
|
+ Margin="8,0"
|
|
|
|
+ HorizontalAlignment="Right"
|
|
|
|
+ BorderBrush="Transparent"
|
|
|
|
+ BorderThickness="0"
|
|
|
|
+ SnapsToDevicePixels="true">
|
|
|
|
+ <Path
|
|
|
|
+ x:Name="arrow"
|
|
|
|
+ Width="12"
|
|
|
|
+ Height="12"
|
|
|
|
+ Margin="0"
|
|
|
|
+ HorizontalAlignment="Center"
|
|
|
|
+ VerticalAlignment="Center"
|
|
|
|
+ Data="M6 7.56434L2.03039 3.59473L0.969727 4.65539L5.46967 9.15533C5.76256 9.44822 6.23743 9.44822 6.53033 9.15533L11.0303 4.65539L9.9696 3.59473L6 7.56434Z"
|
|
|
|
+ Fill="{StaticResource color.icon.arrow.gray.def}" />
|
|
|
|
+ </Border>
|
|
|
|
+ </Border>
|
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
|
+ <MultiDataTrigger>
|
|
|
|
+ <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" />
|
|
|
|
+ </MultiDataTrigger.Conditions>
|
|
|
|
+ <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.field.border.norm}" />
|
|
|
|
+ </MultiDataTrigger>
|
|
|
|
+ <Trigger Property="IsMouseOver" Value="true">
|
|
|
|
+ <Setter TargetName="arrow" Property="Fill" Value="{StaticResource color.icon.arrow.accent.hov}" />
|
|
|
|
+ <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.field.border.hov}" />
|
|
|
|
+ </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 TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.field.border.hov}" />
|
|
|
|
+ </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>
|
|
|
|
+ <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.field.border.hov}" />
|
|
|
|
+ </MultiDataTrigger>
|
|
|
|
+ <Trigger Property="IsPressed" Value="true">
|
|
|
|
+ <Setter TargetName="arrow" Property="Fill" Value="{StaticResource color.icon.arrow.accent.hov}" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <Trigger Property="IsFocused" Value="True">
|
|
|
|
+ <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.field.border.focus}" />
|
|
|
|
+ <Setter TargetName="templateRoot" Property="Effect" Value="{StaticResource shadow.blue-0-4}" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <Trigger Property="IsChecked" Value="True">
|
|
|
|
+ <Setter TargetName="arrow" Property="LayoutTransform">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <RotateTransform Angle="180" />
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Trigger>
|
|
|
|
+ <Trigger Property="IsEnabled" Value="false">
|
|
|
|
+ <Setter TargetName="arrow" Property="Fill" Value="{StaticResource color.icon.arrow.gray.dis}" />
|
|
|
|
+ <Setter TargetName="templateRoot" Property="Background" Value="{StaticResource color.field.bg.dis}" />
|
|
|
|
+ <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.field.border.dis}" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Style>
|
|
|
|
+ <ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
|
|
|
|
+ <Grid
|
|
|
|
+ x:Name="templateRoot"
|
|
|
|
+ Background="Transparent"
|
|
|
|
+ SnapsToDevicePixels="true">
|
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
+ <ColumnDefinition Width="0" MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" />
|
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
+ <Popup
|
|
|
|
+ x:Name="PART_Popup"
|
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
|
+ Margin="1"
|
|
|
|
+ AllowsTransparency="true"
|
|
|
|
+ IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
|
|
+ Placement="Bottom"
|
|
|
|
+ PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
|
|
|
|
+ <Themes:SystemDropShadowChrome
|
|
|
|
+ x:Name="shadow"
|
|
|
|
+ MinWidth="{Binding ActualWidth, ElementName=templateRoot}"
|
|
|
|
+ MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
|
|
|
+ Color="Transparent">
|
|
|
|
+ <Border
|
|
|
|
+ x:Name="dropDownBorder"
|
|
|
|
+ Margin="0,4,0,0"
|
|
|
|
+ Background="{StaticResource color.sys.layout.anti}"
|
|
|
|
+ BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
|
|
|
|
+ BorderThickness="0"
|
|
|
|
+ CornerRadius="{StaticResource radius.base.m}"
|
|
|
|
+ Effect="{StaticResource shadow.neutral.m}">
|
|
|
|
+ <ScrollViewer x:Name="DropDownScrollViewer">
|
|
|
|
+ <Grid HorizontalAlignment="Stretch" SnapsToDevicePixels="True">
|
|
|
|
+ <!-- 圆角背景 -->
|
|
|
|
+ <Border
|
|
|
|
+ x:Name="Bd"
|
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
|
+ Background="{StaticResource color.sys.layout.anti}"
|
|
|
|
+ BorderThickness="1"
|
|
|
|
+ CornerRadius="7">
|
|
|
|
+ <!-- 面板内容 -->
|
|
|
|
+ <StackPanel
|
|
|
|
+ Margin="4"
|
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
|
+ IsItemsHost="True"
|
|
|
|
+ KeyboardNavigation.DirectionalNavigation="Contained" />
|
|
|
|
+ </Border>
|
|
|
|
+ </Grid>
|
|
|
|
+ </ScrollViewer>
|
|
|
|
+ </Border>
|
|
|
|
+ </Themes:SystemDropShadowChrome>
|
|
|
|
+ </Popup>
|
|
|
|
+ <ToggleButton
|
|
|
|
+ x:Name="toggleButton"
|
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
|
+ Margin="2"
|
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
|
+ BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
+ IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
|
|
+ Style="{StaticResource ComboBoxToggleButton}" />
|
|
|
|
+ <ContentPresenter
|
|
|
|
+ x:Name="contentPresenter"
|
|
|
|
+ Margin="{TemplateBinding Padding}"
|
|
|
|
+ HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
|
+ VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
|
+ Content="{TemplateBinding SelectionBoxItem}"
|
|
|
|
+ ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
|
|
|
|
+ ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
|
|
|
|
+ ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
|
|
|
|
+ IsHitTestVisible="false"
|
|
|
|
+ SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
|
|
+ </Grid>
|
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
|
+ <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
|
|
|
|
+ <Setter TargetName="shadow" Property="Margin" Value="5" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <Trigger Property="HasItems" Value="false">
|
|
|
|
+ <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <MultiTrigger>
|
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
|
+ <Condition Property="IsGrouping" Value="true" />
|
|
|
|
+ <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
|
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
|
+ <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
|
|
|
|
+ </MultiTrigger>
|
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ <SolidColorBrush x:Key="TextBox.Static.Background" Color="#FFFFFFFF" />
|
|
|
|
+ <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
|
|
|
|
+ <Setter Property="OverridesDefaultStyle" Value="true" />
|
|
|
|
+ <Setter Property="AllowDrop" Value="true" />
|
|
|
|
+ <Setter Property="MinWidth" Value="0" />
|
|
|
|
+ <Setter Property="MinHeight" Value="0" />
|
|
|
|
+ <Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
|
|
+ <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
|
|
|
|
+ <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="{x:Type TextBox}">
|
|
|
|
+ <ScrollViewer
|
|
|
|
+ x:Name="PART_ContentHost"
|
|
|
|
+ Background="Transparent"
|
|
|
|
+ Focusable="false"
|
|
|
|
+ HorizontalScrollBarVisibility="Hidden"
|
|
|
|
+ VerticalScrollBarVisibility="Hidden" />
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Style>
|
|
|
|
+ <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
|
|
|
|
+ <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
|
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
+ <ColumnDefinition Width="0" MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" />
|
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
+ <Popup
|
|
|
|
+ x:Name="PART_Popup"
|
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
|
+ AllowsTransparency="true"
|
|
|
|
+ IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
|
|
|
|
+ Placement="Bottom"
|
|
|
|
+ PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
|
|
|
|
+ <Themes:SystemDropShadowChrome
|
|
|
|
+ x:Name="shadow"
|
|
|
|
+ MinWidth="{Binding ActualWidth, ElementName=templateRoot}"
|
|
|
|
+ MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
|
|
|
+ Color="Transparent">
|
|
|
|
+ <Border
|
|
|
|
+ x:Name="dropDownBorder"
|
|
|
|
+ Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
|
|
|
|
+ BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
|
|
|
|
+ BorderThickness="1">
|
|
|
|
+ <ScrollViewer x:Name="DropDownScrollViewer">
|
|
|
|
+ <Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
|
|
|
|
+ <Canvas
|
|
|
|
+ x:Name="canvas"
|
|
|
|
+ Width="0"
|
|
|
|
+ Height="0"
|
|
|
|
+ HorizontalAlignment="Left"
|
|
|
|
+ VerticalAlignment="Top">
|
|
|
|
+ <Rectangle
|
|
|
|
+ x:Name="opaqueRect"
|
|
|
|
+ Width="{Binding ActualWidth, ElementName=dropDownBorder}"
|
|
|
|
+ Height="{Binding ActualHeight, ElementName=dropDownBorder}"
|
|
|
|
+ Fill="{Binding Background, ElementName=dropDownBorder}" />
|
|
|
|
+ </Canvas>
|
|
|
|
+ <ItemsPresenter
|
|
|
|
+ x:Name="ItemsPresenter"
|
|
|
|
+ KeyboardNavigation.DirectionalNavigation="Contained"
|
|
|
|
+ SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
|
|
+ </Grid>
|
|
|
|
+ </ScrollViewer>
|
|
|
|
+ </Border>
|
|
|
|
+ </Themes:SystemDropShadowChrome>
|
|
|
|
+ </Popup>
|
|
|
|
+ <ToggleButton
|
|
|
|
+ x:Name="toggleButton"
|
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
|
+ BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
+ IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
|
|
+ Style="{StaticResource ComboBoxToggleButton}" />
|
|
|
|
+ <Border
|
|
|
|
+ x:Name="border"
|
|
|
|
+ Margin="{TemplateBinding BorderThickness}"
|
|
|
|
+ Background="{StaticResource TextBox.Static.Background}">
|
|
|
|
+ <TextBox
|
|
|
|
+ x:Name="PART_EditableTextBox"
|
|
|
|
+ Margin="{TemplateBinding Padding}"
|
|
|
|
+ HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
|
+ VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
|
+ IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
|
|
|
|
+ Style="{StaticResource ComboBoxEditableTextBox}" />
|
|
|
|
+ </Border>
|
|
|
|
+ </Grid>
|
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
|
+ <Trigger Property="IsEnabled" Value="false">
|
|
|
|
+ <Setter TargetName="border" Property="Opacity" Value="0.56" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <Trigger Property="IsKeyboardFocusWithin" Value="true">
|
|
|
|
+ <Setter Property="Foreground" Value="Black" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
|
|
|
|
+ <Setter TargetName="shadow" Property="Margin" Value="0,0,5,5" />
|
|
|
|
+ <Setter TargetName="shadow" Property="Color" Value="#71000000" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <Trigger Property="HasItems" Value="false">
|
|
|
|
+ <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <MultiTrigger>
|
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
|
+ <Condition Property="IsGrouping" Value="true" />
|
|
|
|
+ <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
|
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
|
+ <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
|
|
|
|
+ </MultiTrigger>
|
|
|
|
+ <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
|
|
|
|
+ <Setter TargetName="opaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
|
|
|
|
+ <Setter TargetName="opaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ <!-- Design Token ComBobox -->
|
|
|
|
+ <Style TargetType="{x:Type ComboBox}">
|
|
|
|
+ <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
|
|
|
|
+ <Setter Property="Background" Value="{StaticResource color.field.bg.def}" />
|
|
|
|
+ <Setter Property="BorderBrush" Value="{StaticResource color.field.border.norm}" />
|
|
|
|
+ <Setter Property="Foreground" Value="{StaticResource color.field.text.act}" />
|
|
|
|
+ <Setter Property="BorderThickness" Value="{StaticResource border-width.1}" />
|
|
|
|
+ <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
|
|
|
|
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
|
+ <Setter Property="Padding" Value="8,3,5,3" />
|
|
|
|
+ <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
|
|
|
|
+ <Setter Property="ScrollViewer.PanningMode" Value="Both" />
|
|
|
|
+ <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
|
|
|
|
+ <Setter Property="Template" Value="{StaticResource ComboBoxTemplate}" />
|
|
|
|
+ <Style.Triggers>
|
|
|
|
+ <Trigger Property="IsEditable" Value="true">
|
|
|
|
+ <Setter Property="IsTabStop" Value="false" />
|
|
|
|
+ <Setter Property="Padding" Value="2" />
|
|
|
|
+ <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ </Style.Triggers>
|
|
|
|
+ </Style>
|
|
</ResourceDictionary>
|
|
</ResourceDictionary>
|
|
</Application.Resources>
|
|
</Application.Resources>
|
|
</prism:PrismApplication>
|
|
</prism:PrismApplication>
|