Generic.xaml 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778
  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:local="clr-namespace:InABox.DynamicGrid"
  5. xmlns:wpf="clr-namespace:InABox.WPF"
  6. xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
  7. xmlns:themes="clr-namespace:InABox.WPF.Themes"
  8. x:Class="InABox.WPF.Generic"
  9. x:ClassModifier="public">
  10. <wpf:ObjectToVisibilityConverter x:Key="DynamicTabControlVisibilityConverter" IsNull="Collapsed" NotNull="Visible" />
  11. <!-- VerticalSplitter -->
  12. <ControlTemplate x:Key="VerticalSplitter">
  13. <Grid Background="{TemplateBinding Background}" Width="4">
  14. <Button x:Name="PART_Left" Visibility="Collapsed" />
  15. <Button x:Name="PART_Right" Visibility="Collapsed" />
  16. <StackPanel Margin="0" Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
  17. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1" Margin="0,2,0,0" />
  18. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1" Margin="0,2,0,0" />
  19. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1" Margin="0,2,0,0" />
  20. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1" Margin="0,2,0,0" />
  21. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1" Margin="0,2,0,0" />
  22. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1" Margin="0,2,0,0" />
  23. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1" Margin="0,2,0,0" />
  24. </StackPanel>
  25. </Grid>
  26. </ControlTemplate>
  27. <!-- HorizontalSplitter -->
  28. <ControlTemplate x:Key="HorizontalSplitter">
  29. <Grid Background="{TemplateBinding Background}" Height="4">
  30. <Button x:Name="PART_Left" Visibility="Collapsed" />
  31. <Button x:Name="PART_Right" Visibility="Collapsed" />
  32. <StackPanel Margin="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  33. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1" Margin="2,0,0,0" />
  34. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1" Margin="2,0,0,0" />
  35. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1" Margin="2,0,0,0" />
  36. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1" Margin="2,0,0,0" />
  37. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1" Margin="2,0,0,0" />
  38. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1" Margin="2,0,0,0" />
  39. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1" Margin="2,0,0,0" />
  40. </StackPanel>
  41. </Grid>
  42. </ControlTemplate>
  43. <Style TargetType="wpf:ZoomPanel">
  44. <Setter Property="Template">
  45. <Setter.Value>
  46. <ControlTemplate TargetType="wpf:ZoomPanel">
  47. <ControlTemplate.Resources>
  48. <wpf:BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
  49. </ControlTemplate.Resources>
  50. <Grid>
  51. <Grid.RowDefinitions>
  52. <RowDefinition Height="*"/>
  53. <RowDefinition Height="Auto"/>
  54. </Grid.RowDefinitions>
  55. <ScrollViewer Grid.Row="0"
  56. Background="{TemplateBinding Background}"
  57. x:Name="PART_Scroll"
  58. HorizontalScrollBarVisibility="Auto"
  59. VerticalScrollBarVisibility="Auto">
  60. <Border Background="Transparent" x:Name="PART_ContentBorder">
  61. <ContentControl x:Name="PART_ZoomContent" VerticalAlignment="Center" Content="{TemplateBinding Content}">
  62. <ContentControl.LayoutTransform>
  63. <ScaleTransform ScaleX="{Binding Scale,RelativeSource={RelativeSource TemplatedParent}}"
  64. ScaleY="{Binding Scale,RelativeSource={RelativeSource TemplatedParent}}"/>
  65. </ContentControl.LayoutTransform>
  66. </ContentControl>
  67. </Border>
  68. </ScrollViewer>
  69. <DockPanel Grid.Row="1" LastChildFill="False"
  70. Visibility="{Binding ShowNavigationButtons,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource BoolToVisibilityConverter}}">
  71. <Button x:Name="PART_ZoomInButton" Margin="5">
  72. <Image Source="pack://application:,,,/InABox.Wpf;component/Resources/zoomin.png" Width="32" Height="32"/>
  73. </Button>
  74. <Button x:Name="PART_ZoomOutButton" Margin="0,5,5,5">
  75. <Image Source="pack://application:,,,/InABox.Wpf;component/Resources/zoomout.png" Width="32" Height="32"/>
  76. </Button>
  77. <Button x:Name="PART_LeftButton" Margin="0,5,5,5">
  78. <Image Source="pack://application:,,,/InABox.Wpf;component/Resources/leftarrow.png" Width="32" Height="32"/>
  79. </Button>
  80. <Button x:Name="PART_RightButton" Margin="0,5,5,5">
  81. <Image Source="pack://application:,,,/InABox.Wpf;component/Resources/rightarrow.png" Width="32" Height="32"/>
  82. </Button>
  83. <Button x:Name="PART_UpButton" Margin="0,5,5,5">
  84. <Image Source="pack://application:,,,/InABox.Wpf;component/Resources/uparrow.png" Width="32" Height="32"/>
  85. </Button>
  86. <Button x:Name="PART_DownButton" Margin="0,5,5,5">
  87. <Image Source="pack://application:,,,/InABox.Wpf;component/Resources/downarrow.png" Width="32" Height="32"/>
  88. </Button>
  89. </DockPanel>
  90. </Grid>
  91. </ControlTemplate>
  92. </Setter.Value>
  93. </Setter>
  94. </Style>
  95. <!-- DynamicSplitPanel -->
  96. <Style TargetType="{x:Type local:DynamicSplitPanel}">
  97. <Setter Property="Template">
  98. <Setter.Value>
  99. <ControlTemplate TargetType="{x:Type local:DynamicSplitPanel}">
  100. <Grid x:Name="PART_Grid">
  101. <Grid.ColumnDefinitions>
  102. <ColumnDefinition Width="0" />
  103. <ColumnDefinition Width="Auto" />
  104. <ColumnDefinition Width="Auto" />
  105. <ColumnDefinition Width="*" />
  106. <ColumnDefinition Width="0" />
  107. </Grid.ColumnDefinitions>
  108. <Grid.RowDefinitions>
  109. <RowDefinition Height="Auto" />
  110. <RowDefinition Height="*" />
  111. </Grid.RowDefinitions>
  112. <DockPanel Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Margin="0,0,2,0">
  113. <Button DockPanel.Dock="Top" x:Name="PART_DetailsOnly" BorderBrush="Gray"
  114. BorderThickness="0.75,0.75,0.75,0" Margin="0" Background="WhiteSmoke" MinHeight="25"
  115. Width="25" Focusable="False" >
  116. <Polygon Points="0,0 8,5, 0,10" Stroke="Gray" Fill="Silver" />
  117. </Button>
  118. <Border DockPanel.Dock="Top" BorderBrush="Gray" BorderThickness="0.75,0,0.75,0.75" Margin="0,0,0,0"
  119. Background="WhiteSmoke" Width="25">
  120. <Label x:Name="PART_MasterHeader"
  121. Content="{Binding MasterCaption, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicSplitPanel}}"
  122. HorizontalContentAlignment="Right">
  123. <Label.LayoutTransform>
  124. <RotateTransform Angle="270" />
  125. </Label.LayoutTransform>
  126. </Label>
  127. </Border>
  128. </DockPanel>
  129. <DockPanel Grid.Row="0" Grid.Column="1">
  130. <Button x:Name="PART_CombinedRight" BorderBrush="Gray" BorderThickness="0.75"
  131. Margin="2,0,0,2" Background="WhiteSmoke" DockPanel.Dock="Right" MinWidth="25"
  132. MinHeight="25" HorizontalContentAlignment="Center"
  133. VerticalContentAlignment="Center" Focusable="False">
  134. <Polygon Points="0,0 8,5, 0,10" Stroke="Gray" Fill="Silver" />
  135. </Button>
  136. <Button x:Name="PART_CombinedLeft" BorderBrush="Gray" BorderThickness="0.75"
  137. Margin="2,0,0,2" Background="WhiteSmoke" DockPanel.Dock="Right" MinWidth="25"
  138. MinHeight="25" Focusable="False">
  139. <Polygon Points="8,0 0,5, 8,10" Stroke="Gray" Fill="Silver" />
  140. </Button>
  141. <ContentPresenter DockPanel.Dock="Left" MinHeight="25" Margin="0,0,0,2"
  142. Content="{Binding Header, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicSplitPanel}}" />
  143. </DockPanel>
  144. <ContentPresenter Grid.Row="1" Grid.Column="1"
  145. Content="{Binding Master, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicSplitPanel}}" />
  146. <syncfusion:SfGridSplitter Grid.Row="0" Grid.RowSpan="2" Grid.Column="2" Name="PART_Splitter"
  147. ResizeBehavior="PreviousAndNext" Width="4" Background="Transparent"
  148. Template="{StaticResource VerticalSplitter}">
  149. <syncfusion:SfGridSplitter.PreviewStyle>
  150. <Style TargetType="Control">
  151. <Setter Property="Background" Value="Gray" />
  152. <Setter Property="Template">
  153. <Setter.Value>
  154. <ControlTemplate TargetType="Control">
  155. <Grid x:Name="Root" Opacity="0.5">
  156. <Rectangle Fill="{TemplateBinding Background}" />
  157. </Grid>
  158. </ControlTemplate>
  159. </Setter.Value>
  160. </Setter>
  161. </Style>
  162. </syncfusion:SfGridSplitter.PreviewStyle>
  163. </syncfusion:SfGridSplitter>
  164. <ContentPresenter Grid.Row="0" Grid.Column="3" Margin="0,0,0,2"
  165. Content="{Binding DetailHeader, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicSplitPanel}}" />
  166. <Grid x:Name="PART_DetailGrid" Grid.Row="1" Grid.Column="3">
  167. <Grid.RowDefinitions>
  168. <RowDefinition Height="*" />
  169. <RowDefinition Height="Auto" />
  170. <RowDefinition Height="*" />
  171. </Grid.RowDefinitions>
  172. <ContentPresenter Grid.Row="0"
  173. Content="{Binding Detail, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicSplitPanel}}" />
  174. <syncfusion:SfGridSplitter Grid.Row="1" Name="PART_DetailSplitter"
  175. ResizeBehavior="PreviousAndNext" Height="4"
  176. HorizontalAlignment="Stretch" Background="Transparent"
  177. Template="{StaticResource HorizontalSplitter}">
  178. <syncfusion:SfGridSplitter.PreviewStyle>
  179. <Style TargetType="Control">
  180. <Setter Property="Background" Value="Gray" />
  181. <Setter Property="Template">
  182. <Setter.Value>
  183. <ControlTemplate TargetType="Control">
  184. <Grid x:Name="Root" Opacity="0.5">
  185. <Rectangle Fill="{TemplateBinding Background}" />
  186. </Grid>
  187. </ControlTemplate>
  188. </Setter.Value>
  189. </Setter>
  190. </Style>
  191. </syncfusion:SfGridSplitter.PreviewStyle>
  192. </syncfusion:SfGridSplitter>
  193. <ContentPresenter Grid.Row="2"
  194. Content="{Binding SecondaryDetail, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicSplitPanel}}" />
  195. </Grid>
  196. <DockPanel Grid.Row="0" Grid.Column="4" Grid.RowSpan="2" Margin="2,0,0,0">
  197. <Button DockPanel.Dock="Top" x:Name="PART_MasterOnly" BorderBrush="Gray"
  198. BorderThickness="0.75,0.75,0.75,0" Margin="0" Background="WhiteSmoke" MinHeight="25"
  199. MinWidth="25" Focusable="False">
  200. <Polygon Points="8,0 0,5, 8,10" Stroke="Gray" Fill="Silver" />
  201. </Button>
  202. <Border DockPanel.Dock="Top" BorderBrush="Gray" BorderThickness="0.75,0,0.75,0.75"
  203. Background="WhiteSmoke">
  204. <Label x:Name="PART_DetailHeader"
  205. Content="{Binding DetailCaption, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicSplitPanel}}"
  206. HorizontalContentAlignment="Right">
  207. <Label.LayoutTransform>
  208. <RotateTransform Angle="270" />
  209. </Label.LayoutTransform>
  210. </Label>
  211. </Border>
  212. </DockPanel>
  213. </Grid>
  214. </ControlTemplate>
  215. </Setter.Value>
  216. </Setter>
  217. </Style>
  218. <Style TargetType="syncfusion:GridFilterControl">
  219. <Setter Property="SortOptionVisibility" Value="Collapsed" />
  220. </Style>
  221. <!-- VerticalColumnHeader -->
  222. <Style x:Key="ActionColumnHeader" TargetType="{x:Type syncfusion:GridHeaderCellControl}">
  223. <Setter Property="Background" Value="LightSkyBlue" />
  224. <Setter Property="Foreground" Value="Black" />
  225. <Setter Property="BorderBrush" Value="Black" />
  226. <Setter Property="BorderThickness" Value="0.5,0.5,0.5,0.5" />
  227. <Setter Property="HorizontalContentAlignment" Value="Left" />
  228. <Setter Property="Padding" Value="5,3" />
  229. <Setter Property="FontFamily" Value="Segoe UI" />
  230. <Setter Property="FontSize" Value="14" />
  231. <Setter Property="FontWeight" Value="Normal" />
  232. <Setter Property="IsTabStop" Value="False" />
  233. <Setter Property="Template">
  234. <Setter.Value>
  235. <ControlTemplate TargetType="{x:Type syncfusion:GridHeaderCellControl}">
  236. <Grid>
  237. <Grid.LayoutTransform>
  238. <RotateTransform Angle="90" />
  239. </Grid.LayoutTransform>
  240. <VisualStateManager.VisualStateGroups>
  241. <VisualStateGroup x:Name="HiddenColumnsResizingStates">
  242. <VisualState x:Name="PreviousColumnHidden">
  243. <Storyboard>
  244. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  245. Storyboard.TargetProperty="BorderThickness"
  246. Storyboard.TargetName="PART_HeaderCellBorder">
  247. <EasingThicknessKeyFrame KeyTime="0" Value="3,0,1,1" />
  248. </ThicknessAnimationUsingKeyFrames>
  249. </Storyboard>
  250. </VisualState>
  251. <VisualState x:Name="HiddenState">
  252. <Storyboard>
  253. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  254. Storyboard.TargetProperty="BorderThickness"
  255. Storyboard.TargetName="PART_HeaderCellBorder">
  256. <EasingThicknessKeyFrame KeyTime="0" Value="3,0,3,1" />
  257. </ThicknessAnimationUsingKeyFrames>
  258. </Storyboard>
  259. </VisualState>
  260. <VisualState x:Name="NormalState" />
  261. <VisualState x:Name="LastColumnHidden">
  262. <Storyboard>
  263. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  264. Storyboard.TargetProperty="BorderThickness"
  265. Storyboard.TargetName="PART_HeaderCellBorder">
  266. <EasingThicknessKeyFrame KeyTime="0" Value="0,0,3,1" />
  267. </ThicknessAnimationUsingKeyFrames>
  268. </Storyboard>
  269. </VisualState>
  270. </VisualStateGroup>
  271. <VisualStateGroup x:Name="CommonStates">
  272. <VisualState x:Name="MouseOver" />
  273. <VisualState x:Name="Normal" />
  274. </VisualStateGroup>
  275. <VisualStateGroup x:Name="BorderStates">
  276. <VisualState x:Name="NormalCell" />
  277. <VisualState x:Name="FooterColumnCell">
  278. <Storyboard BeginTime="0">
  279. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  280. Storyboard.TargetProperty="BorderThickness"
  281. Storyboard.TargetName="PART_FooterCellBorder">
  282. <EasingThicknessKeyFrame KeyTime="0" Value="1,0,1,1" />
  283. </ThicknessAnimationUsingKeyFrames>
  284. </Storyboard>
  285. </VisualState>
  286. <VisualState x:Name="BeforeFooterColumnCell">
  287. <Storyboard BeginTime="0">
  288. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  289. Storyboard.TargetProperty="BorderThickness"
  290. Storyboard.TargetName="PART_FooterCellBorder">
  291. <EasingThicknessKeyFrame KeyTime="0" Value="0,0,0,1" />
  292. </ThicknessAnimationUsingKeyFrames>
  293. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  294. Storyboard.TargetProperty="BorderThickness"
  295. Storyboard.TargetName="PART_HeaderCellBorder">
  296. <EasingThicknessKeyFrame KeyTime="0" Value="0,0,0,1" />
  297. </ThicknessAnimationUsingKeyFrames>
  298. </Storyboard>
  299. </VisualState>
  300. </VisualStateGroup>
  301. </VisualStateManager.VisualStateGroups>
  302. <Border x:Name="PART_FooterCellBorder" BorderBrush="{TemplateBinding BorderBrush}"
  303. Background="{TemplateBinding Background}" />
  304. <Border x:Name="PART_HeaderCellBorder" BorderBrush="{TemplateBinding BorderBrush}"
  305. BorderThickness="{TemplateBinding BorderThickness}"
  306. Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
  307. <Grid Margin="{TemplateBinding Padding}" SnapsToDevicePixels="True">
  308. <Grid.ColumnDefinitions>
  309. <ColumnDefinition Width="*" />
  310. <ColumnDefinition Width="Auto" />
  311. <ColumnDefinition Width="Auto" />
  312. </Grid.ColumnDefinitions>
  313. <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}"
  314. Content="{TemplateBinding Content}"
  315. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  316. Focusable="False"
  317. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  318. VerticalAlignment="Center" />
  319. <Grid x:Name="PART_SortButtonPresenter" Grid.Column="1" SnapsToDevicePixels="True">
  320. <Grid.ColumnDefinitions>
  321. <ColumnDefinition Width="*">
  322. <ColumnDefinition.MinWidth>
  323. <Binding Mode="OneWay" Path="SortDirection"
  324. RelativeSource="{RelativeSource TemplatedParent}">
  325. <Binding.Converter>
  326. <syncfusion:SortDirectionToWidthConverter />
  327. </Binding.Converter>
  328. </Binding>
  329. </ColumnDefinition.MinWidth>
  330. </ColumnDefinition>
  331. <ColumnDefinition Width="*" />
  332. </Grid.ColumnDefinitions>
  333. <Path
  334. Data="F1M753.644,-13.0589L753.736,-12.9639 753.557,-12.7816 732.137,8.63641 732.137,29.7119 756.445,5.40851 764.094,-2.24384 764.275,-2.42352 771.834,5.1286 796.137,29.4372 796.137,8.36163 774.722,-13.0589 764.181,-23.5967 753.644,-13.0589z"
  335. Fill="Gray" HorizontalAlignment="Center" Height="8.138" Stretch="Fill"
  336. SnapsToDevicePixels="True" VerticalAlignment="Center" Width="8.938">
  337. <Path.RenderTransform>
  338. <TransformGroup>
  339. <RotateTransform Angle="90" />
  340. <ScaleTransform ScaleY="1" ScaleX="1" />
  341. </TransformGroup>
  342. </Path.RenderTransform>
  343. <!-- <Path.Visibility> -->
  344. <!-- <Binding ConverterParameter="Ascending" Path="SortDirection" RelativeSource="{RelativeSource TemplatedParent}"> -->
  345. <!-- <Binding.Converter> -->
  346. <!-- <syncfusion:SortDirectionToVisibilityConverter/> -->
  347. <!-- </Binding.Converter> -->
  348. <!-- </Binding> -->
  349. <!-- </Path.Visibility> -->
  350. </Path>
  351. <Path
  352. Data="F1M181.297,177.841L181.205,177.746 181.385,177.563 202.804,156.146 202.804,135.07 178.497,159.373 170.847,167.026 170.666,167.205 163.107,159.653 138.804,135.345 138.804,156.42 160.219,177.841 170.76,188.379 181.297,177.841z"
  353. Fill="Gray" HorizontalAlignment="Center" Height="8.138" Stretch="Fill"
  354. SnapsToDevicePixels="True" VerticalAlignment="Center" Width="8.938">
  355. <Path.RenderTransform>
  356. <TransformGroup>
  357. <RotateTransform Angle="90" />
  358. <ScaleTransform ScaleY="1" ScaleX="1" />
  359. </TransformGroup>
  360. </Path.RenderTransform>
  361. <!-- <Path.Visibility> -->
  362. <!-- <Binding ConverterParameter="Decending" Path="SortDirection" RelativeSource="{RelativeSource TemplatedParent}"> -->
  363. <!-- <Binding.Converter> -->
  364. <!-- <syncfusion:SortDirectionToVisibilityConverter/> -->
  365. <!-- </Binding.Converter> -->
  366. <!-- </Binding> -->
  367. <!-- </Path.Visibility> -->
  368. </Path>
  369. <TextBlock Grid.Column="1" Foreground="{TemplateBinding Foreground}" FontSize="10"
  370. Margin="0,-4,0,0" SnapsToDevicePixels="True"
  371. Text="{TemplateBinding SortNumber}"
  372. Visibility="{TemplateBinding SortNumberVisibility}"
  373. VerticalAlignment="Center" />
  374. </Grid>
  375. <syncfusion:FilterToggleButton x:Name="PART_FilterToggleButton" Grid.Column="2"
  376. HorizontalAlignment="Stretch" SnapsToDevicePixels="True"
  377. Visibility="{TemplateBinding FilterIconVisiblity}"
  378. VerticalAlignment="Stretch" />
  379. <Border x:Name="PART_FilterPopUpPresenter" />
  380. </Grid>
  381. </Border>
  382. </Grid>
  383. </ControlTemplate>
  384. </Setter.Value>
  385. </Setter>
  386. </Style>
  387. <ControlTemplate x:Key="VerticalColumnHeader"
  388. TargetType="{x:Type syncfusion:GridHeaderCellControl}">
  389. <Grid>
  390. <Grid.LayoutTransform>
  391. <RotateTransform Angle="270" />
  392. </Grid.LayoutTransform>
  393. <VisualStateManager.VisualStateGroups>
  394. <VisualStateGroup x:Name="HiddenColumnsResizingStates">
  395. <VisualState x:Name="PreviousColumnHidden">
  396. <Storyboard>
  397. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  398. Storyboard.TargetProperty="BorderThickness"
  399. Storyboard.TargetName="PART_HeaderCellBorder">
  400. <EasingThicknessKeyFrame KeyTime="0" Value="3,0,1,1" />
  401. </ThicknessAnimationUsingKeyFrames>
  402. </Storyboard>
  403. </VisualState>
  404. <VisualState x:Name="HiddenState">
  405. <Storyboard>
  406. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  407. Storyboard.TargetProperty="BorderThickness"
  408. Storyboard.TargetName="PART_HeaderCellBorder">
  409. <EasingThicknessKeyFrame KeyTime="0" Value="3,0,3,1" />
  410. </ThicknessAnimationUsingKeyFrames>
  411. </Storyboard>
  412. </VisualState>
  413. <VisualState x:Name="NormalState" />
  414. <VisualState x:Name="LastColumnHidden">
  415. <Storyboard>
  416. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  417. Storyboard.TargetProperty="BorderThickness"
  418. Storyboard.TargetName="PART_HeaderCellBorder">
  419. <EasingThicknessKeyFrame KeyTime="0" Value="0,0,3,1" />
  420. </ThicknessAnimationUsingKeyFrames>
  421. </Storyboard>
  422. </VisualState>
  423. </VisualStateGroup>
  424. <VisualStateGroup x:Name="CommonStates">
  425. <VisualState x:Name="MouseOver" />
  426. <VisualState x:Name="Normal" />
  427. </VisualStateGroup>
  428. <VisualStateGroup x:Name="BorderStates">
  429. <VisualState x:Name="NormalCell" />
  430. <VisualState x:Name="FooterColumnCell">
  431. <Storyboard BeginTime="0">
  432. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  433. Storyboard.TargetProperty="BorderThickness"
  434. Storyboard.TargetName="PART_FooterCellBorder">
  435. <EasingThicknessKeyFrame KeyTime="0" Value="1,0,1,1" />
  436. </ThicknessAnimationUsingKeyFrames>
  437. </Storyboard>
  438. </VisualState>
  439. <VisualState x:Name="BeforeFooterColumnCell">
  440. <Storyboard BeginTime="0">
  441. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  442. Storyboard.TargetProperty="BorderThickness"
  443. Storyboard.TargetName="PART_FooterCellBorder">
  444. <EasingThicknessKeyFrame KeyTime="0" Value="0,0,0,1" />
  445. </ThicknessAnimationUsingKeyFrames>
  446. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  447. Storyboard.TargetProperty="BorderThickness"
  448. Storyboard.TargetName="PART_HeaderCellBorder">
  449. <EasingThicknessKeyFrame KeyTime="0" Value="0,0,0,1" />
  450. </ThicknessAnimationUsingKeyFrames>
  451. </Storyboard>
  452. </VisualState>
  453. </VisualStateGroup>
  454. </VisualStateManager.VisualStateGroups>
  455. <Border x:Name="PART_FooterCellBorder" BorderBrush="{TemplateBinding BorderBrush}"
  456. Background="{TemplateBinding Background}" />
  457. <Border x:Name="PART_HeaderCellBorder" BorderBrush="{TemplateBinding BorderBrush}"
  458. BorderThickness="{TemplateBinding BorderThickness}"
  459. Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
  460. <Grid Margin="{TemplateBinding Padding}" SnapsToDevicePixels="True">
  461. <Grid.ColumnDefinitions>
  462. <ColumnDefinition Width="*" />
  463. <ColumnDefinition Width="Auto" />
  464. <ColumnDefinition Width="Auto" />
  465. </Grid.ColumnDefinitions>
  466. <ContentPresenter
  467. ContentTemplate="{TemplateBinding ContentTemplate}"
  468. ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False"
  469. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  470. VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
  471. <ContentPresenter.Content>
  472. <TextBlock Text="{Binding HeaderText}" TextWrapping="Wrap" />
  473. </ContentPresenter.Content>
  474. </ContentPresenter>
  475. <Grid x:Name="PART_SortButtonPresenter" Grid.Column="1" SnapsToDevicePixels="True">
  476. <Grid.ColumnDefinitions>
  477. <ColumnDefinition Width="*">
  478. <ColumnDefinition.MinWidth>
  479. <Binding Mode="OneWay" Path="SortDirection"
  480. RelativeSource="{RelativeSource TemplatedParent}">
  481. <Binding.Converter>
  482. <syncfusion:SortDirectionToWidthConverter />
  483. </Binding.Converter>
  484. </Binding>
  485. </ColumnDefinition.MinWidth>
  486. </ColumnDefinition>
  487. <ColumnDefinition Width="*" />
  488. </Grid.ColumnDefinitions>
  489. <TextBlock Grid.Column="1" Foreground="{TemplateBinding Foreground}"
  490. FontSize="10" Margin="0,-4,0,0" SnapsToDevicePixels="True"
  491. Text="{TemplateBinding SortNumber}"
  492. Visibility="{TemplateBinding SortNumberVisibility}"
  493. VerticalAlignment="Bottom" />
  494. </Grid>
  495. <syncfusion:FilterToggleButton x:Name="PART_FilterToggleButton" Grid.Column="2"
  496. HorizontalAlignment="Stretch"
  497. SnapsToDevicePixels="True"
  498. Visibility="{TemplateBinding FilterIconVisiblity}"
  499. VerticalAlignment="Stretch">
  500. <syncfusion:FilterToggleButton.LayoutTransform>
  501. <RotateTransform Angle="90" />
  502. </syncfusion:FilterToggleButton.LayoutTransform>
  503. </syncfusion:FilterToggleButton>
  504. <Border x:Name="PART_FilterPopUpPresenter">
  505. <Border.LayoutTransform>
  506. <RotateTransform Angle="90" />
  507. </Border.LayoutTransform>
  508. </Border>
  509. </Grid>
  510. </Border>
  511. </Grid>
  512. </ControlTemplate>
  513. <Style BasedOn="{StaticResource {x:Type TabItem}}" TargetType="{x:Type local:DynamicTabItem}">
  514. <Setter Property="Template">
  515. <Setter.Value>
  516. <ControlTemplate TargetType="{x:Type local:DynamicTabItem}">
  517. <Border Name="Panel" BorderBrush="Gray" Background="Aqua" PreviewMouseRightButtonUp="Panel_OnPreviewMouseRightButtonUp" >
  518. <DockPanel>
  519. <Button x:Name="CloseButton" DockPanel.Dock="Right" Content="x" BorderThickness="0"
  520. Padding="5,0,5,0" Background="Transparent" VerticalContentAlignment="Center"
  521. HorizontalContentAlignment="Center"
  522. IsEnabled="True" Margin="2"
  523. Command="{TemplateBinding CloseTabCommand}" />
  524. <ContentPresenter
  525. x:Name="ContentSite"
  526. DockPanel.Dock="Left"
  527. VerticalAlignment="Center"
  528. HorizontalAlignment="Center"
  529. ContentSource="Header"
  530. Margin="10,0"
  531. />
  532. </DockPanel>
  533. </Border>
  534. <ControlTemplate.Triggers>
  535. <Trigger Property="IsSelected" Value="True">
  536. <Setter TargetName="Panel" Property="Background"
  537. Value="{Binding Path=(themes:ThemeManager.SelectedTabItemBackgroundBrush)}" />
  538. <Setter TargetName="Panel" Property="TextBlock.Foreground"
  539. Value="{Binding Path=(themes:ThemeManager.SelectedTabItemForegroundBrush)}" />
  540. </Trigger>
  541. <Trigger Property="IsSelected" Value="False">
  542. <Setter TargetName="Panel" Property="Background"
  543. Value="{Binding Path=(themes:ThemeManager.WorkspaceBackgroundBrush)}" />
  544. <Setter TargetName="Panel" Property="TextBlock.Foreground"
  545. Value="{Binding Path=(themes:ThemeManager.WorkspaceForegroundBrush)}" />
  546. </Trigger>
  547. <Trigger Property="CanClose" Value="True">
  548. <Setter TargetName="CloseButton" Property="Visibility" Value="Visible" />
  549. </Trigger>
  550. <Trigger Property="CanClose" Value="False">
  551. <Setter TargetName="CloseButton" Property="Visibility" Value="Collapsed" />
  552. </Trigger>
  553. <Trigger Property="TabStripPlacement" Value="{x:Static Dock.Top}">
  554. <Setter TargetName="Panel" Property="CornerRadius" Value="5,5,0,0" />
  555. <Setter TargetName="Panel" Property="Margin" Value="0,0,2,0" />
  556. <Setter TargetName="Panel" Property="BorderThickness" Value="0.75,0.75,0.75,0" />
  557. </Trigger>
  558. <Trigger Property="TabStripPlacement" Value="{x:Static Dock.Bottom}">
  559. <Setter TargetName="Panel" Property="CornerRadius" Value="0,0,5,5" />
  560. <Setter TargetName="Panel" Property="Margin" Value="0,0,2,0" />
  561. <Setter TargetName="Panel" Property="BorderThickness" Value="0.75,0,0.75,0.75" />
  562. </Trigger>
  563. </ControlTemplate.Triggers>
  564. </ControlTemplate>
  565. </Setter.Value>
  566. </Setter>
  567. </Style>
  568. <!-- ~1~ This template explains how to render a tab item with a close button. @1@ -->
  569. <!-- <DataTemplate x:Key="ClosableTabItemHeader"> -->
  570. <!-- <DockPanel MinWidth="120"> -->
  571. <!-- <Button DockPanel.Dock="Right" Command="ApplicationCommands.Delete" CommandParameter="{Binding}" Content="X" Cursor="Hand" Focusable="False" FontSize="10" FontWeight="Bold" Height="16" Width="16" /> -->
  572. <!-- <TextBlock Padding="0,0,10,0" Text="{Binding DisplayName}" VerticalAlignment="Center" /> -->
  573. <!-- </DockPanel> -->
  574. <!-- </DataTemplate> -->
  575. <!-- ~1~ This template explains how to render a tab item with a new button. @1@ -->
  576. <!-- <DataTemplate x:Key="NewTabItemHeader"> -->
  577. <!-- <Button Command="{Binding NewTabCommand, RelativeSource={RelativeSource AncestorType={x:Type local:DynamicTabControl}}}" Content="+" Cursor="Hand" Focusable="False" FontWeight="Bold" -->
  578. <!-- Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"/> -->
  579. <!-- </DataTemplate> -->
  580. <Style BasedOn="{StaticResource {x:Type TabControl}}" TargetType="{x:Type local:DynamicTabControl}">
  581. <Setter Property="Template">
  582. <Setter.Value>
  583. <ControlTemplate TargetType="{x:Type local:DynamicTabControl}">
  584. <Grid Background="Transparent" Margin="0,0,0,0">
  585. <Grid.RowDefinitions>
  586. <RowDefinition Height="Auto" />
  587. <RowDefinition Height="*" />
  588. <RowDefinition Height="Auto" />
  589. </Grid.RowDefinitions>
  590. <Grid.ColumnDefinitions>
  591. <ColumnDefinition Width="Auto"/>
  592. <ColumnDefinition Width="Auto"/>
  593. <ColumnDefinition Width="*"/>
  594. <ColumnDefinition Width="Auto"/>
  595. <ColumnDefinition Width="Auto"/>
  596. </Grid.ColumnDefinitions>
  597. <Border
  598. x:Name="Separator"
  599. BorderBrush="Gray"
  600. Grid.Column="0"
  601. Grid.ColumnSpan="5">
  602. <DockPanel x:Name="Panel" Background="{Binding Path=(themes:ThemeManager.WorkspaceBackgroundBrush)}">
  603. <Button x:Name="AddButton" DockPanel.Dock="Right" Content="+"
  604. BorderThickness="0" Padding="5,0,5,0" Background="Transparent"
  605. Command="{TemplateBinding CreateTabCommand}" />
  606. <TabPanel IsItemsHost="true" Background="Transparent" />
  607. </DockPanel>
  608. </Border>
  609. <ContentPresenter
  610. Grid.Row="1"
  611. Margin="0,2,0,2"
  612. ContentSource="{Binding LeftPanel, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicTabControl}}" />
  613. <syncfusion:SfGridSplitter
  614. Grid.Row="1"
  615. Grid.Column="1"
  616. ResizeBehavior="PreviousAndNext"
  617. Width="2"
  618. Background="Transparent"
  619. Visibility="{Binding LeftPanel, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicTabControl}, Converter={StaticResource DynamicTabControlVisibilityConverter}}"
  620. Template="{StaticResource VerticalSplitter}"/>
  621. <Border
  622. x:Name="Content"
  623. Grid.Row="1"
  624. Grid.Column="2"
  625. Background="{Binding Path=(themes:ThemeManager.WorkspaceBackgroundBrush)}"
  626. BorderThickness="0">
  627. <ContentPresenter
  628. x:Name="PART_SelectedContentHost"
  629. ContentSource="SelectedContent"
  630. />
  631. </Border>
  632. <syncfusion:SfGridSplitter
  633. Grid.Row="1"
  634. Grid.Column="3"
  635. ResizeBehavior="PreviousAndNext"
  636. Width="4"
  637. Background="Transparent"
  638. Visibility="{Binding RightPanel, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicTabControl}, Converter={StaticResource DynamicTabControlVisibilityConverter}}"
  639. Template="{StaticResource VerticalSplitter}"/>
  640. <ContentPresenter
  641. Grid.Row="1"
  642. Grid.Column="4"
  643. Margin="0,2,0,2"
  644. ContentSource="RightPanel" />
  645. </Grid>
  646. <ControlTemplate.Triggers>
  647. <Trigger Property="CanCreateTab" Value="True">
  648. <Setter TargetName="AddButton" Property="Visibility" Value="Visible" />
  649. </Trigger>
  650. <Trigger Property="CanCreateTab" Value="False">
  651. <Setter TargetName="AddButton" Property="Visibility" Value="Collapsed" />
  652. </Trigger>
  653. <!-- <Trigger Property="TabStripPlacement" Value="{x:Static Dock.Top}"> -->
  654. <!-- <Setter TargetName="Panel" Property="Grid.Row" Value="0" /> -->
  655. <!-- <Setter TargetName="Content" Property="BorderThickness" Value="0,0.75,0,0" /> -->
  656. <!-- <Setter TargetName="Content" Property="Padding" Value="0,2,0,0" /> -->
  657. <!-- </Trigger> -->
  658. <MultiTrigger>
  659. <MultiTrigger.Conditions>
  660. <Condition Property="TabStripPlacement" Value="{x:Static Dock.Top}" />
  661. <Condition Property="TabStripVisible" Value="False"/>
  662. </MultiTrigger.Conditions>
  663. <MultiTrigger.Setters>
  664. <Setter TargetName="Separator" Property="Grid.Row" Value="0" />
  665. <Setter TargetName="Separator" Property="BorderThickness" Value="0,0,0,0" />
  666. <Setter TargetName="Content" Property="Padding" Value="0,0,0,0" />
  667. </MultiTrigger.Setters>
  668. </MultiTrigger>
  669. <MultiTrigger>
  670. <MultiTrigger.Conditions>
  671. <Condition Property="TabStripPlacement" Value="{x:Static Dock.Top}" />
  672. <Condition Property="TabStripVisible" Value="True"/>
  673. </MultiTrigger.Conditions>
  674. <MultiTrigger.Setters>
  675. <Setter TargetName="Separator" Property="Grid.Row" Value="0" />
  676. <Setter TargetName="Separator" Property="BorderThickness" Value="0,0,0,0.75" />
  677. <Setter TargetName="Separator" Property="Margin" Value="0,0,0,1.5" />
  678. <Setter TargetName="Content" Property="Padding" Value="0,0,0,0" />
  679. </MultiTrigger.Setters>
  680. </MultiTrigger>
  681. <MultiTrigger>
  682. <MultiTrigger.Conditions>
  683. <Condition Property="TabStripPlacement" Value="{x:Static Dock.Bottom}" />
  684. <Condition Property="TabStripVisible" Value="False"/>
  685. </MultiTrigger.Conditions>
  686. <MultiTrigger.Setters>
  687. <Setter TargetName="Separator" Property="Grid.Row" Value="2" />
  688. <Setter TargetName="Separator" Property="BorderThickness" Value="0,0,0,0" />
  689. <Setter TargetName="Content" Property="Padding" Value="0,0,0,0" />
  690. </MultiTrigger.Setters>
  691. </MultiTrigger>
  692. <MultiTrigger>
  693. <MultiTrigger.Conditions>
  694. <Condition Property="TabStripPlacement" Value="{x:Static Dock.Bottom}" />
  695. <Condition Property="TabStripVisible" Value="True"/>
  696. </MultiTrigger.Conditions>
  697. <MultiTrigger.Setters>
  698. <Setter TargetName="Separator" Property="Grid.Row" Value="2" />
  699. <Setter TargetName="Separator" Property="BorderThickness" Value="0,0.75,0,0" />
  700. <Setter TargetName="Separator" Property="Margin" Value="0,0,0,0" />
  701. <Setter TargetName="Content" Property="Margin" Value="0,0,0,0" />
  702. <Setter TargetName="Content" Property="Padding" Value="0,0,0,2" />
  703. </MultiTrigger.Setters>
  704. </MultiTrigger>
  705. </ControlTemplate.Triggers>
  706. </ControlTemplate>
  707. </Setter.Value>
  708. </Setter>
  709. </Style>
  710. </ResourceDictionary>