123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346 |
- <prism:PrismApplication
- x:Class="PDF_Office.App"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:PDF_Office"
- xmlns:prism="http://prismlibrary.com/">
- <Application.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Themes/Alias_Light.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Themes/Global.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/TabControlStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ButtonStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/TextBoxStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ComboxStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ListBoxStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/WindowsStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/CustomBtnStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ContainerStyles/ComboxStyle/ComboxItemStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/PathButtonStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ContextMenuTextEditStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ContextMenuStyle.xaml" />
- <!-- Enable show customctrol's correctly UI in Xaml Designer -->
- <ResourceDictionary Source="pack://application:,,,/PDF Office;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 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="#1D1D1D"
- 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 Property="Background" Value="Transparent" />
- <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="#0cffffff" />
- </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>
- <!-- 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="#ffffff" />
- </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>
- </ResourceDictionary>
- </Application.Resources>
- </prism:PrismApplication>
|