123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840 |
- <prism:PrismApplication
- x:Class="PDF_Master.App"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2"
- xmlns:local="clr-namespace:PDF_Master"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:sys="clr-namespace:System;assembly=mscorlib">
- <Application.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Themes/Alias_Light.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Themes/Global.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/TabControlStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/SeparatorStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/ButtonStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/ToggleButton.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/TextBoxStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/ComboxStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/ListBoxStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/WindowsStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/CustomBtnStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/ContainerStyles/ComboxStyle/ComboxItemStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/RadioButtonStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/PathButtonStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/ImageButtonStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/PathRadioButtonDictionary.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/ImageRadioButtonDictionary.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/ContextMenuTextEditStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/ContextMenuStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/ContextMenuFormStyle.xaml" />
- <!-- Enable show customctrol's correctly UI in Xaml Designer -->
- <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Themes/Generic.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <Style TargetType="{x:Type Hyperlink}">
- <Setter Property="Foreground" Value="#477EDE" />
- <Setter Property="TextBlock.TextDecorations" Value="{x:Null}" />
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Foreground" Value="#6B97E4" />
- <!-- 在鼠标悬停显示下划线 -->
- <Setter Property="TextBlock.TextDecorations">
- <Setter.Value>
- <TextDecorationCollection>
- <TextDecoration Location="Underline" />
- </TextDecorationCollection>
- </Setter.Value>
- </Setter>
- </Trigger>
- </Style.Triggers>
- </Style>
- <!-- Design Token Menu Without Icon -->
- <Style x:Key="GlobalMenuItem" TargetType="{x:Type MenuItem}">
- <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Height" Value="32" />
- <Setter Property="Margin" Value="8,0" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type MenuItem}">
- <Border
- x:Name="Border"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="0"
- CornerRadius="7">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition
- x:Name="ColIcon"
- Width="Auto"
- SharedSizeGroup="MenuItemIconColumnGroup" />
- <ColumnDefinition Width="Auto" SharedSizeGroup="MenuTextColumnGroup" />
- <ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup" />
- <ColumnDefinition x:Name="ColNext" Width="auto" />
- </Grid.ColumnDefinitions>
- <ContentPresenter
- x:Name="Icon"
- Grid.Column="0"
- Margin="5,0"
- VerticalAlignment="Center"
- ContentSource="Icon" />
- <Grid
- x:Name="GlyphPanel"
- Grid.Column="0"
- Margin="5,0"
- VerticalAlignment="Center"
- Visibility="Collapsed">
- <Viewbox
- Width="18"
- Height="18"
- VerticalAlignment="Center"
- FlowDirection="LeftToRight">
- <Path Data="M422.36247 839.786465c-13.320377 13.421684-34.909068 13.421684-48.126091 0l-10.69355-10.800997 0 0-11.398608-11.502985-50.145074-50.544163c-0.097214-0.201591 0-0.500397-0.201591-0.604774L72.380494 533.085224c-13.320377-13.421684-13.320377-35.218106 0-48.535413l72.132854-72.842005c13.319353-13.408381 34.907021-13.408381 48.224328 0l205.814506 209.252815L831.363631 184.208419c13.218046-13.414521 34.806737-13.414521 48.124044 0l72.134901 72.842005c13.317307 13.408381 13.317307 35.113729 0 48.52211L422.36247 839.786465 422.36247 839.786465z" Fill="{TemplateBinding Foreground}" />
- </Viewbox>
- </Grid>
- <ContentPresenter
- x:Name="HeaderHost"
- Grid.Column="1"
- Margin="{TemplateBinding Padding}"
- VerticalAlignment="Center"
- ContentSource="Header"
- RecognizesAccessKey="True" />
- <ContentPresenter
- x:Name="IGTHost"
- Grid.Column="2"
- Margin="8,0"
- VerticalAlignment="Center"
- ContentSource="InputGestureText" />
- <Grid
- x:Name="ArrowPanel"
- Grid.Column="3"
- Margin="10,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center">
- <Path
- x:Name="ArrowPanelPath"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Data="M0,0 L0,8 L4,4 z"
- Fill="{TemplateBinding Foreground}" />
- </Grid>
- <Popup
- x:Name="SubMenuPopup"
- AllowsTransparency="True"
- Focusable="false"
- IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
- Placement="Right">
- <Border
- x:Name="SubMenuBorder"
- Padding="2,2,2,2"
- Background="{StaticResource color.sys.layout.mg}"
- BorderBrush="#999999"
- BorderThickness="0"
- CornerRadius="7">
- <Grid x:Name="SubMenu" Grid.IsSharedSizeScope="True">
- <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
- </Grid>
- </Border>
- </Popup>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="Role" Value="TopLevelHeader">
- <Setter Property="Padding" Value="6,1" />
- <Setter TargetName="SubMenuPopup" Property="Placement" Value="Bottom" />
- <Setter TargetName="ColIcon" Property="MinWidth" Value="0" />
- <Setter TargetName="ColNext" Property="Width" Value="Auto" />
- <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
- <Setter TargetName="GlyphPanel" Property="Visibility" Value="Collapsed" />
- <Setter TargetName="IGTHost" Property="Visibility" Value="Collapsed" />
- <Setter TargetName="ArrowPanel" Property="Visibility" Value="Collapsed" />
- </Trigger>
- <Trigger Property="IsHighlighted" Value="true">
- <Setter TargetName="Border" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv1}" />
- <Setter Property="Foreground" Value="{StaticResource color.sys.text.accent.norm}" />
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsHighlighted" Value="True" />
- <Condition Property="Role" Value="TopLevelHeader" />
- </MultiTrigger.Conditions>
- <MultiTrigger.Setters>
- <Setter TargetName="Border" Property="Background" Value="{StaticResource color.sys.layout.mg}" />
- </MultiTrigger.Setters>
- </MultiTrigger>
- <Trigger Property="Role" Value="TopLevelItem">
- <Setter Property="Padding" Value="6,1" />
- <Setter TargetName="ArrowPanel" Property="Visibility" Value="Collapsed" />
- </Trigger>
- <Trigger Property="Role" Value="SubmenuHeader">
- <Setter Property="Padding" Value="5,2" />
- </Trigger>
- <Trigger Property="Role" Value="SubmenuItem">
- <Setter Property="Padding" Value="5,2" />
- <Setter TargetName="ArrowPanel" Property="Visibility" Value="Collapsed" />
- </Trigger>
- <Trigger Property="Icon" Value="{x:Null}">
- <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
- </Trigger>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
- <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.dis}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!-- set as defualt MenuItem Style -->
- <Style BasedOn="{StaticResource GlobalMenuItem}" TargetType="{x:Type MenuItem}" />
- <!-- Design Token ContextMenu -->
- <Style TargetType="{x:Type ContextMenu}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ContextMenu}">
- <!-- Here is where you change the border thickness to zero on the menu -->
- <Border Width="{TemplateBinding Width}" Padding="5">
- <Border.Effect>
- <DropShadowEffect
- BlurRadius="5"
- Direction="0"
- Opacity="0.16"
- ShadowDepth="0"
- Color="#000000" />
- </Border.Effect>
- <Border
- x:Name="Border"
- Padding="0,5"
- CornerRadius="5">
- <StackPanel
- ClipToBounds="True"
- IsItemsHost="True"
- KeyboardNavigation.DirectionalNavigation="Cycle"
- Orientation="Vertical" />
- </Border>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="Border" Property="Background" Value="{StaticResource color.sys.layout.mg}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!-- Design Token CheckBox -->
- <Style TargetType="{x:Type CheckBox}">
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Background" Value="{StaticResource color.icon.checkbox-radio.norm.bg}" />
- <Setter Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.norm.border}" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="FontFamily" Value="Segoe UI" />
- <Setter Property="FontSize" Value="14" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type CheckBox}">
- <Grid
- x:Name="templateRoot"
- Background="Transparent"
- SnapsToDevicePixels="True">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Border
- x:Name="checkBoxBorder"
- Width="14"
- Height="14"
- Margin="1"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="2">
- <Grid x:Name="markGrid">
- <Path
- x:Name="optionMark"
- Data="M3 7L6.2 10L11 4"
- Opacity="0"
- Stroke="{StaticResource color.icon.checkbox-radio.norm.bg}"
- StrokeLineJoin="Round"
- StrokeThickness="1.5">
- <Path.RenderTransform>
- <TranslateTransform X="-0.5" Y="-1" />
- </Path.RenderTransform>
- </Path>
- <Rectangle
- x:Name="indeterminateMark"
- Margin="2"
- Fill="{StaticResource color.icon.checkbox-radio.norm.border}"
- Opacity="0" />
- </Grid>
- </Border>
- <ContentPresenter
- x:Name="contentPresenter"
- Grid.Column="1"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Focusable="False"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="HasContent" Value="true">
- <Setter Property="Padding" Value="4,0,0,0" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource color.icon.checkbox-radio.hov.bg}" />
- <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.hov.border}" />
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsEnabled" Value="false" />
- <Condition Property="IsChecked" Value="True" />
- </MultiTrigger.Conditions>
- <MultiTrigger.Setters>
- <Setter TargetName="optionMark" Property="Opacity" Value="1" />
- <Setter TargetName="indeterminateMark" Property="Opacity" Value="0" />
- <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource color.icon.checkbox-radio.dis.bg}" />
- <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.dis.border}" />
- <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource color.icon.checkbox-radio.dis.fill}" />
- <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.dis}" />
- </MultiTrigger.Setters>
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsEnabled" Value="false" />
- <Condition Property="IsChecked" Value="false" />
- </MultiTrigger.Conditions>
- <MultiTrigger.Setters>
- <Setter TargetName="optionMark" Property="Opacity" Value="0" />
- <Setter TargetName="indeterminateMark" Property="Opacity" Value="1" />
- <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource color.icon.checkbox-radio.dis.bg}" />
- <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.dis.border}" />
- </MultiTrigger.Setters>
- </MultiTrigger>
- <!--<Trigger Property="IsPressed" Value="true">
- <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource OptionMark.Pressed.Background}" />
- <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.Pressed.Border}" />
- <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource OptionMark.Pressed.Glyph}" />
- <Setter TargetName="indeterminateMark" Property="Fill" Value="{StaticResource OptionMark.Pressed.Glyph}" />
- </Trigger>-->
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="optionMark" Property="Opacity" Value="1" />
- <Setter TargetName="indeterminateMark" Property="Opacity" Value="0" />
- <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource color.icon.checkbox-radio.sel.bg}" />
- <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.sel.bg}" />
- </Trigger>
- <Trigger Property="IsChecked" Value="{x:Null}">
- <Setter TargetName="optionMark" Property="Opacity" Value="0" />
- <Setter TargetName="indeterminateMark" Property="Opacity" Value="1" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </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="Height" Value="32" />
- <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" />
- <Setter Property="Foreground" Value="{StaticResource color.sys.text.accent.norm}" />
- </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" />
- <Setter Property="Foreground" Value="{StaticResource color.sys.text.accent.norm}" />
- </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" />
- <Setter Property="Foreground" Value="{StaticResource color.sys.text.accent.norm}" />
- </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="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="ClickMode" Value="Press" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Border
- x:Name="templateRoot"
- Background="{TemplateBinding Background}"
- 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"
- 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>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="{StaticResource color.field.text.dis}"/>
- </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="3 1 8 1"
- 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 3 5 3"/>
- <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
- </Trigger>
- </Style.Triggers>
- </Style>
- <!-- Design Token RadionButton -->
- <Style TargetType="{x:Type RadioButton}">
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Background" Value="{StaticResource color.icon.checkbox-radio.norm.bg}" />
- <Setter Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.norm.border}" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Padding" Value="8,0,0,0" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RadioButton}">
- <Grid
- x:Name="templateRoot"
- Background="Transparent"
- SnapsToDevicePixels="True">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Border
- x:Name="radioButtonBorder"
- Width="14"
- Height="14"
- HorizontalAlignment="Center"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="100">
- <Grid x:Name="markGrid" Margin="1.8">
- <Ellipse
- x:Name="optionMark"
- MinWidth="6"
- MinHeight="6"
- Fill="{StaticResource color.icon.checkbox-radio.sel.bg}"
- Opacity="0" />
- </Grid>
- </Border>
- <ContentPresenter
- x:Name="contentPresenter"
- Grid.Column="1"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Focusable="False"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
- <ControlTemplate.Triggers>
- <!--<Trigger Property="HasContent" Value="true">
- <Setter Property="Padding" Value="4,-1,0,0" />
- </Trigger>-->
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.hov.border}" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource color.icon.checkbox-radio.dis.bg}" />
- <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.dis.border}" />
- <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource color.icon.checkbox-radio.dis.fill}" />
- </Trigger>
- <!--<Trigger Property="IsPressed" Value="true">
- <Setter Property="Background" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Pressed.Background2}" />
- <Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Pressed.Border}" />
- <Setter Property="Fill" TargetName="optionMark" Value="{StaticResource RadioButton.Pressed.Glyph2}" />
- </Trigger>-->
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="optionMark" Property="Opacity" Value="1" />
- <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.hov.border}" />
- </Trigger>
- <Trigger Property="IsChecked" Value="{x:Null}">
- <Setter TargetName="optionMark" Property="Opacity" Value="0.56" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
- </Application.Resources>
- </prism:PrismApplication>
|