App.xaml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <Application x:Class="PRSDesktop.App"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
  5. xmlns:themes="clr-namespace:InABox.WPF.Themes;assembly=InABox.Wpf"
  6. xmlns:fluent="urn:fluent-ribbon"
  7. xmlns:prsDesktop="clr-namespace:PRSDesktop">
  8. <Application.Resources>
  9. <ResourceDictionary>
  10. <themes:ThemeManager x:Key="Theme"/>
  11. <ResourceDictionary.MergedDictionaries>
  12. <ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Generic.xaml" />
  13. <ResourceDictionary>
  14. <Style x:Key="TemplateHeaderStyle" TargetType="{x:Type syncfusion:GridHeaderCellControl}">
  15. <Setter Property="Background" Value="LightSkyBlue"/>
  16. <Setter Property="Foreground" Value="Black"/>
  17. <Setter Property="BorderBrush" Value="Black"/>
  18. <Setter Property="BorderThickness" Value="0.5,0.5,0.5,0.5"/>
  19. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  20. <Setter Property="VerticalContentAlignment" Value="Center"/>
  21. <Setter Property="Padding" Value="5,3"/>
  22. <Setter Property="FontFamily" Value="Segoe UI"/>
  23. <Setter Property="FontSize" Value="14"/>
  24. <Setter Property="FontWeight" Value="Normal"/>
  25. <Setter Property="IsTabStop" Value="False"/>
  26. </Style>
  27. <Style TargetType="fluent:RibbonTabItem">
  28. <Setter Property="HeaderPadding" Value="20,0,20,0" />
  29. <Setter Property="Margin" Value="0,0,5,0" />
  30. <Setter Property="MinWidth" Value="80"/>
  31. <Setter Property="Height" Value="30" />
  32. </Style>
  33. <Style TargetType="fluent:Button">
  34. <Setter Property="MinWidth" Value="60" />
  35. </Style>
  36. <Style TargetType="fluent:Backstage">
  37. <Setter Property="Height" Value="30" />
  38. <Setter Property="Margin" Value="0,0,5,0" />
  39. <!-- <Setter Property="MinWidth" Value="100"/> -->
  40. <Setter Property="Padding" Value="20,0,20,0" />
  41. </Style>
  42. <ControlTemplate x:Key="VerticalSplitter">
  43. <Grid Background="{TemplateBinding Background}" Width="4">
  44. <Button x:Name="PART_Left" Visibility="Collapsed" />
  45. <Button x:Name="PART_Right" Visibility="Collapsed" />
  46. <StackPanel Margin="0" Orientation="Vertical" VerticalAlignment="Center"
  47. HorizontalAlignment="Center">
  48. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  49. Margin="0,2,0,0" />
  50. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  51. Margin="0,2,0,0" />
  52. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  53. Margin="0,2,0,0" />
  54. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  55. Margin="0,2,0,0" />
  56. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  57. Margin="0,2,0,0" />
  58. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  59. Margin="0,2,0,0" />
  60. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  61. Margin="0,2,0,0" />
  62. </StackPanel>
  63. </Grid>
  64. </ControlTemplate>
  65. <ControlTemplate x:Key="HorizontalSplitter">
  66. <Grid Background="{TemplateBinding Background}" Height="4">
  67. <Grid.ColumnDefinitions>
  68. <ColumnDefinition Width="*" />
  69. <ColumnDefinition Width="Auto" />
  70. <ColumnDefinition Width="*" />
  71. </Grid.ColumnDefinitions>
  72. <Button Grid.Column="0" x:Name="PART_Left" Visibility="Collapsed" />
  73. <StackPanel Grid.Column="1" Margin="0" Orientation="Horizontal"
  74. HorizontalAlignment="Center"
  75. VerticalAlignment="Center">
  76. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  77. Margin="2,0,0,0" />
  78. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  79. Margin="2,0,0,0" />
  80. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  81. Margin="2,0,0,0" />
  82. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  83. Margin="2,0,0,0" />
  84. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  85. Margin="2,0,0,0" />
  86. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  87. Margin="2,0,0,0" />
  88. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  89. Margin="2,0,0,0" />
  90. </StackPanel>
  91. <Button Grid.Column="2" x:Name="PART_Right" Visibility="Collapsed" />
  92. </Grid>
  93. </ControlTemplate>
  94. <ControlTemplate x:Key="VerticalColumnHeader"
  95. TargetType="{x:Type syncfusion:GridHeaderCellControl}">
  96. <Grid>
  97. <Grid.LayoutTransform>
  98. <RotateTransform Angle="270" />
  99. </Grid.LayoutTransform>
  100. <VisualStateManager.VisualStateGroups>
  101. <VisualStateGroup x:Name="HiddenColumnsResizingStates">
  102. <VisualState x:Name="PreviousColumnHidden">
  103. <Storyboard>
  104. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  105. Storyboard.TargetProperty="BorderThickness"
  106. Storyboard.TargetName="PART_HeaderCellBorder">
  107. <EasingThicknessKeyFrame KeyTime="0" Value="3,0,1,1" />
  108. </ThicknessAnimationUsingKeyFrames>
  109. </Storyboard>
  110. </VisualState>
  111. <VisualState x:Name="HiddenState">
  112. <Storyboard>
  113. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  114. Storyboard.TargetProperty="BorderThickness"
  115. Storyboard.TargetName="PART_HeaderCellBorder">
  116. <EasingThicknessKeyFrame KeyTime="0" Value="3,0,3,1" />
  117. </ThicknessAnimationUsingKeyFrames>
  118. </Storyboard>
  119. </VisualState>
  120. <VisualState x:Name="NormalState" />
  121. <VisualState x:Name="LastColumnHidden">
  122. <Storyboard>
  123. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  124. Storyboard.TargetProperty="BorderThickness"
  125. Storyboard.TargetName="PART_HeaderCellBorder">
  126. <EasingThicknessKeyFrame KeyTime="0" Value="0,0,3,1" />
  127. </ThicknessAnimationUsingKeyFrames>
  128. </Storyboard>
  129. </VisualState>
  130. </VisualStateGroup>
  131. <VisualStateGroup x:Name="CommonStates">
  132. <VisualState x:Name="MouseOver" />
  133. <VisualState x:Name="Normal" />
  134. </VisualStateGroup>
  135. <VisualStateGroup x:Name="BorderStates">
  136. <VisualState x:Name="NormalCell" />
  137. <VisualState x:Name="FooterColumnCell">
  138. <Storyboard BeginTime="0">
  139. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  140. Storyboard.TargetProperty="BorderThickness"
  141. Storyboard.TargetName="PART_FooterCellBorder">
  142. <EasingThicknessKeyFrame KeyTime="0" Value="1,0,1,1" />
  143. </ThicknessAnimationUsingKeyFrames>
  144. </Storyboard>
  145. </VisualState>
  146. <VisualState x:Name="BeforeFooterColumnCell">
  147. <Storyboard BeginTime="0">
  148. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  149. Storyboard.TargetProperty="BorderThickness"
  150. Storyboard.TargetName="PART_FooterCellBorder">
  151. <EasingThicknessKeyFrame KeyTime="0" Value="0,0,0,1" />
  152. </ThicknessAnimationUsingKeyFrames>
  153. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  154. Storyboard.TargetProperty="BorderThickness"
  155. Storyboard.TargetName="PART_HeaderCellBorder">
  156. <EasingThicknessKeyFrame KeyTime="0" Value="0,0,0,1" />
  157. </ThicknessAnimationUsingKeyFrames>
  158. </Storyboard>
  159. </VisualState>
  160. </VisualStateGroup>
  161. </VisualStateManager.VisualStateGroups>
  162. <Border x:Name="PART_FooterCellBorder" BorderBrush="{TemplateBinding BorderBrush}"
  163. Background="{TemplateBinding Background}" />
  164. <Border x:Name="PART_HeaderCellBorder" BorderBrush="{TemplateBinding BorderBrush}"
  165. BorderThickness="{TemplateBinding BorderThickness}"
  166. Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
  167. <Grid Margin="{TemplateBinding Padding}" SnapsToDevicePixels="True">
  168. <Grid.ColumnDefinitions>
  169. <ColumnDefinition Width="*" />
  170. <ColumnDefinition Width="Auto" />
  171. <ColumnDefinition Width="Auto" />
  172. </Grid.ColumnDefinitions>
  173. <ContentPresenter
  174. ContentTemplate="{TemplateBinding ContentTemplate}"
  175. ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False"
  176. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  177. VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
  178. <ContentPresenter.Content>
  179. <TextBlock Text="{Binding HeaderText}" TextWrapping="Wrap" />
  180. </ContentPresenter.Content>
  181. </ContentPresenter>
  182. <Grid x:Name="PART_SortButtonPresenter" Grid.Column="1" SnapsToDevicePixels="True">
  183. <Grid.ColumnDefinitions>
  184. <ColumnDefinition Width="*">
  185. <ColumnDefinition.MinWidth>
  186. <Binding Mode="OneWay" Path="SortDirection"
  187. RelativeSource="{RelativeSource TemplatedParent}">
  188. <Binding.Converter>
  189. <syncfusion:SortDirectionToWidthConverter />
  190. </Binding.Converter>
  191. </Binding>
  192. </ColumnDefinition.MinWidth>
  193. </ColumnDefinition>
  194. <ColumnDefinition Width="*" />
  195. </Grid.ColumnDefinitions>
  196. <TextBlock Grid.Column="1" Foreground="{TemplateBinding Foreground}"
  197. FontSize="10" Margin="0,-4,0,0" SnapsToDevicePixels="True"
  198. Text="{TemplateBinding SortNumber}"
  199. Visibility="{TemplateBinding SortNumberVisibility}"
  200. VerticalAlignment="Bottom" />
  201. </Grid>
  202. <syncfusion:FilterToggleButton x:Name="PART_FilterToggleButton" Grid.Column="2"
  203. HorizontalAlignment="Stretch"
  204. SnapsToDevicePixels="True"
  205. Visibility="{TemplateBinding FilterIconVisiblity}"
  206. VerticalAlignment="Stretch">
  207. <syncfusion:FilterToggleButton.LayoutTransform>
  208. <RotateTransform Angle="90" />
  209. </syncfusion:FilterToggleButton.LayoutTransform>
  210. </syncfusion:FilterToggleButton>
  211. <Border x:Name="PART_FilterPopUpPresenter">
  212. <Border.LayoutTransform>
  213. <RotateTransform Angle="90" />
  214. </Border.LayoutTransform>
  215. </Border>
  216. </Grid>
  217. </Border>
  218. </Grid>
  219. </ControlTemplate>
  220. <Style x:Key="HorizontalSplitterPreview" TargetType="Control">
  221. <Setter Property="Background" Value="Gray" />
  222. <Setter Property="Template">
  223. <Setter.Value>
  224. <ControlTemplate TargetType="Control">
  225. <Grid x:Name="Root" Opacity="0.5">
  226. <Rectangle Fill="{TemplateBinding Background}" />
  227. </Grid>
  228. </ControlTemplate>
  229. </Setter.Value>
  230. </Setter>
  231. </Style>
  232. </ResourceDictionary>
  233. </ResourceDictionary.MergedDictionaries>
  234. </ResourceDictionary>
  235. </Application.Resources>
  236. </Application>