App.xaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <prism:PrismApplication
  2. x:Class="PDF_Office.App"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:local="clr-namespace:PDF_Office"
  6. xmlns:prism="http://prismlibrary.com/">
  7. <Application.Resources>
  8. <ResourceDictionary>
  9. <ResourceDictionary.MergedDictionaries>
  10. <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Themes/Alias_Light.xaml" />
  11. <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Themes/Global.xaml" />
  12. <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/TabControlStyle.xaml" />
  13. <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ButtonStyle.xaml" />
  14. <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/TextBoxStyle.xaml" />
  15. <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ComboxStyle.xaml" />
  16. <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ListBoxStyle.xaml" />
  17. <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/WindowsStyle.xaml" />
  18. <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/CustomBtnStyle.xaml" />
  19. <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ContainerStyles/ComboxStyle/ComboxItemStyle.xaml" />
  20. <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/PathButtonStyle.xaml" />
  21. <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ContextMenuTextEditStyle.xaml" />
  22. <!-- Enable show customctrol's correctly UI in Xaml Designer -->
  23. <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Themes/Generic.xaml" />
  24. </ResourceDictionary.MergedDictionaries>
  25. <Style TargetType="{x:Type Hyperlink}">
  26. <Setter Property="Foreground" Value="#477EDE" />
  27. <Setter Property="TextBlock.TextDecorations" Value="{x:Null}" />
  28. <Style.Triggers>
  29. <Trigger Property="IsMouseOver" Value="True">
  30. <Setter Property="Foreground" Value="#6B97E4" />
  31. <!-- 在鼠标悬停显示下划线 -->
  32. <Setter Property="TextBlock.TextDecorations">
  33. <Setter.Value>
  34. <TextDecorationCollection>
  35. <TextDecoration Location="Underline" />
  36. </TextDecorationCollection>
  37. </Setter.Value>
  38. </Setter>
  39. </Trigger>
  40. </Style.Triggers>
  41. </Style>
  42. <Style TargetType="{x:Type MenuItem}">
  43. <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
  44. <Setter Property="Background" Value="{StaticResource color.sys.layout.anti}" />
  45. <Setter Property="Height" Value="32" />
  46. <Setter Property="Template">
  47. <Setter.Value>
  48. <ControlTemplate TargetType="{x:Type MenuItem}">
  49. <Border
  50. x:Name="Border"
  51. Background="{TemplateBinding Background}"
  52. BorderBrush="{TemplateBinding BorderBrush}"
  53. BorderThickness="0"
  54. CornerRadius="4">
  55. <Grid>
  56. <Grid.ColumnDefinitions>
  57. <ColumnDefinition
  58. x:Name="ColIcon"
  59. Width="Auto"
  60. SharedSizeGroup="MenuItemIconColumnGroup" />
  61. <ColumnDefinition Width="Auto" SharedSizeGroup="MenuTextColumnGroup" />
  62. <ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup" />
  63. <ColumnDefinition x:Name="ColNext" Width="auto" />
  64. </Grid.ColumnDefinitions>
  65. <ContentPresenter
  66. x:Name="Icon"
  67. Grid.Column="0"
  68. Margin="5,0"
  69. VerticalAlignment="Center"
  70. ContentSource="Icon" />
  71. <Grid
  72. x:Name="GlyphPanel"
  73. Grid.Column="0"
  74. Margin="5,0"
  75. VerticalAlignment="Center"
  76. Visibility="Hidden">
  77. <Viewbox
  78. Width="18"
  79. Height="18"
  80. VerticalAlignment="Center"
  81. FlowDirection="LeftToRight">
  82. <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}" />
  83. </Viewbox>
  84. </Grid>
  85. <ContentPresenter
  86. x:Name="HeaderHost"
  87. Grid.Column="1"
  88. Margin="{TemplateBinding Padding}"
  89. VerticalAlignment="Center"
  90. ContentSource="Header"
  91. RecognizesAccessKey="True" />
  92. <ContentPresenter
  93. x:Name="IGTHost"
  94. Grid.Column="2"
  95. Margin="8,0"
  96. VerticalAlignment="Center"
  97. ContentSource="InputGestureText" />
  98. <Grid
  99. x:Name="ArrowPanel"
  100. Grid.Column="3"
  101. Margin="10,0"
  102. HorizontalAlignment="Right"
  103. VerticalAlignment="Center">
  104. <Path
  105. x:Name="ArrowPanelPath"
  106. HorizontalAlignment="Right"
  107. VerticalAlignment="Center"
  108. Data="M0,0 L0,8 L4,4 z"
  109. Fill="{TemplateBinding Foreground}" />
  110. </Grid>
  111. <Popup
  112. x:Name="SubMenuPopup"
  113. AllowsTransparency="True"
  114. Focusable="false"
  115. IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
  116. Placement="Right">
  117. <Border
  118. x:Name="SubMenuBorder"
  119. Padding="2,2,2,2"
  120. Background="#1D1D1D"
  121. BorderBrush="#999999"
  122. BorderThickness="0"
  123. CornerRadius="7">
  124. <Grid x:Name="SubMenu" Grid.IsSharedSizeScope="True">
  125. <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
  126. </Grid>
  127. </Border>
  128. </Popup>
  129. </Grid>
  130. </Border>
  131. <ControlTemplate.Triggers>
  132. <Trigger Property="Role" Value="TopLevelHeader">
  133. <Setter Property="Padding" Value="6,1" />
  134. <Setter Property="Background" Value="Transparent" />
  135. <Setter TargetName="SubMenuPopup" Property="Placement" Value="Bottom" />
  136. <Setter TargetName="ColIcon" Property="MinWidth" Value="0" />
  137. <Setter TargetName="ColNext" Property="Width" Value="Auto" />
  138. <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
  139. <Setter TargetName="GlyphPanel" Property="Visibility" Value="Collapsed" />
  140. <Setter TargetName="IGTHost" Property="Visibility" Value="Collapsed" />
  141. <Setter TargetName="ArrowPanel" Property="Visibility" Value="Collapsed" />
  142. </Trigger>
  143. <Trigger Property="IsHighlighted" Value="true">
  144. <Setter TargetName="Border" Property="Background" Value="#373737" />
  145. </Trigger>
  146. <MultiTrigger>
  147. <MultiTrigger.Conditions>
  148. <Condition Property="IsHighlighted" Value="True" />
  149. <Condition Property="Role" Value="TopLevelHeader" />
  150. </MultiTrigger.Conditions>
  151. <MultiTrigger.Setters>
  152. <Setter TargetName="Border" Property="Background" Value="#0cffffff" />
  153. </MultiTrigger.Setters>
  154. </MultiTrigger>
  155. <Trigger Property="Role" Value="TopLevelItem">
  156. <Setter Property="Padding" Value="6,1" />
  157. <Setter TargetName="ArrowPanel" Property="Visibility" Value="Collapsed" />
  158. </Trigger>
  159. <Trigger Property="Role" Value="SubmenuHeader">
  160. <Setter Property="Padding" Value="5,2" />
  161. </Trigger>
  162. <Trigger Property="Role" Value="SubmenuItem">
  163. <Setter Property="Padding" Value="5,2" />
  164. <Setter TargetName="ArrowPanel" Property="Visibility" Value="Collapsed" />
  165. </Trigger>
  166. <Trigger Property="Icon" Value="{x:Null}">
  167. <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
  168. </Trigger>
  169. <Trigger Property="IsChecked" Value="true">
  170. <Setter TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
  171. <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
  172. </Trigger>
  173. <Trigger Property="IsEnabled" Value="false">
  174. <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.dis}" />
  175. </Trigger>
  176. </ControlTemplate.Triggers>
  177. </ControlTemplate>
  178. </Setter.Value>
  179. </Setter>
  180. </Style>
  181. </ResourceDictionary>
  182. </Application.Resources>
  183. </prism:PrismApplication>