App.xaml 13 KB

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