Generic.xaml 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828
  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. <!-- Collapsed Master -->
  113. <DockPanel Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Margin="0,0,4,0">
  114. <Button
  115. DockPanel.Dock="Top"
  116. x:Name="PART_DetailsOnly"
  117. BorderBrush="Gray"
  118. BorderThickness="0.75"
  119. Margin="0,0,0,4"
  120. Background="WhiteSmoke"
  121. MinHeight="25"
  122. MinWidth="25"
  123. Focusable="False"
  124. HorizontalAlignment="Stretch"
  125. Height="{Binding ElementName=PART_CombinedRight, Path=ActualHeight}">
  126. <Polygon
  127. Points="1,0 9,5, 1,10"
  128. Stroke="Gray"
  129. Fill="Silver" />
  130. </Button>
  131. <Border
  132. DockPanel.Dock="Top"
  133. BorderBrush="Gray"
  134. BorderThickness="0.75"
  135. Background="WhiteSmoke"
  136. HorizontalAlignment="Stretch">
  137. <Label
  138. x:Name="PART_MasterHeader"
  139. Content="{Binding MasterCaption, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicSplitPanel}}"
  140. HorizontalContentAlignment="Right">
  141. <Label.LayoutTransform>
  142. <RotateTransform Angle="270" />
  143. </Label.LayoutTransform>
  144. </Label>
  145. </Border>
  146. </DockPanel>
  147. <!-- Master Header -->
  148. <DockPanel Grid.Row="0" Grid.Column="1">
  149. <Button x:Name="PART_CombinedRight" BorderBrush="Gray" BorderThickness="0.75"
  150. Margin="4,0,0,4" Background="WhiteSmoke" DockPanel.Dock="Right" MinWidth="25"
  151. MinHeight="25" HorizontalContentAlignment="Center"
  152. VerticalContentAlignment="Center" Focusable="False">
  153. <Polygon Points="1,0 9,5, 1,10" Stroke="Gray" Fill="Silver" />
  154. </Button>
  155. <Button x:Name="PART_CombinedLeft" BorderBrush="Gray" BorderThickness="0.75"
  156. Margin="4,0,0,4" Background="WhiteSmoke" DockPanel.Dock="Right" MinWidth="25"
  157. MinHeight="25" Focusable="False">
  158. <Polygon Points="9,0 1,5, 9,10" Stroke="Gray" Fill="Silver" />
  159. </Button>
  160. <ContentPresenter DockPanel.Dock="Left" MinHeight="25" Margin="0,0,0,4"
  161. Content="{Binding Header, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicSplitPanel}}" />
  162. </DockPanel>
  163. <!-- Master -->
  164. <ContentPresenter Grid.Row="1" Grid.Column="1"
  165. Content="{Binding Master, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicSplitPanel}}" />
  166. <syncfusion:SfGridSplitter Grid.Row="0" Grid.RowSpan="2" Grid.Column="2" Name="PART_Splitter"
  167. ResizeBehavior="PreviousAndNext" Width="4" Background="Transparent"
  168. Template="{StaticResource VerticalSplitter}">
  169. <syncfusion:SfGridSplitter.PreviewStyle>
  170. <Style TargetType="Control">
  171. <Setter Property="Background" Value="Gray" />
  172. <Setter Property="Template">
  173. <Setter.Value>
  174. <ControlTemplate TargetType="Control">
  175. <Grid x:Name="Root" Opacity="0.5">
  176. <Rectangle Fill="{TemplateBinding Background}" />
  177. </Grid>
  178. </ControlTemplate>
  179. </Setter.Value>
  180. </Setter>
  181. </Style>
  182. </syncfusion:SfGridSplitter.PreviewStyle>
  183. </syncfusion:SfGridSplitter>
  184. <!-- Detail Header -->
  185. <ContentPresenter Grid.Row="0" Grid.Column="3" Margin="0,0,0,4"
  186. Content="{Binding DetailHeader, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicSplitPanel}}" />
  187. <!-- Detail -->
  188. <Grid x:Name="PART_DetailGrid" Grid.Row="1" Grid.Column="3">
  189. <Grid.RowDefinitions>
  190. <RowDefinition Height="*" />
  191. <RowDefinition Height="Auto" />
  192. <RowDefinition Height="*" />
  193. </Grid.RowDefinitions>
  194. <ContentPresenter Grid.Row="0"
  195. Content="{Binding Detail, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicSplitPanel}}" />
  196. <syncfusion:SfGridSplitter Grid.Row="1" Name="PART_DetailSplitter"
  197. ResizeBehavior="PreviousAndNext" Height="4"
  198. HorizontalAlignment="Stretch" Background="Transparent"
  199. Template="{StaticResource HorizontalSplitter}">
  200. <syncfusion:SfGridSplitter.PreviewStyle>
  201. <Style TargetType="Control">
  202. <Setter Property="Background" Value="Gray" />
  203. <Setter Property="Template">
  204. <Setter.Value>
  205. <ControlTemplate TargetType="Control">
  206. <Grid x:Name="Root" Opacity="0.5">
  207. <Rectangle Fill="{TemplateBinding Background}" />
  208. </Grid>
  209. </ControlTemplate>
  210. </Setter.Value>
  211. </Setter>
  212. </Style>
  213. </syncfusion:SfGridSplitter.PreviewStyle>
  214. </syncfusion:SfGridSplitter>
  215. <ContentPresenter Grid.Row="2"
  216. Content="{Binding SecondaryDetail, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicSplitPanel}}" />
  217. </Grid>
  218. <!-- Collapsed Detail -->
  219. <DockPanel Grid.Row="0" Grid.Column="4" Grid.RowSpan="2" Margin="4,0,0,0">
  220. <Button
  221. DockPanel.Dock="Top"
  222. x:Name="PART_MasterOnly"
  223. BorderBrush="Gray"
  224. BorderThickness="0.75"
  225. Margin="0,0,0,4"
  226. Background="WhiteSmoke"
  227. MinHeight="25"
  228. MinWidth="25"
  229. Focusable="False"
  230. Height="{Binding ElementName=PART_CombinedRight, Path=ActualHeight}">
  231. <Polygon
  232. Points="9,0 1,5, 9,10"
  233. Stroke="Gray"
  234. Fill="Silver" />
  235. </Button>
  236. <Border
  237. DockPanel.Dock="Top"
  238. BorderBrush="Gray"
  239. BorderThickness="0.75"
  240. Background="WhiteSmoke">
  241. <Label
  242. x:Name="PART_DetailHeader"
  243. Content="{Binding DetailCaption, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicSplitPanel}}"
  244. HorizontalContentAlignment="Right">
  245. <Label.LayoutTransform>
  246. <RotateTransform Angle="270" />
  247. </Label.LayoutTransform>
  248. </Label>
  249. </Border>
  250. </DockPanel>
  251. </Grid>
  252. </ControlTemplate>
  253. </Setter.Value>
  254. </Setter>
  255. </Style>
  256. <Style TargetType="syncfusion:GridFilterControl">
  257. <Setter Property="SortOptionVisibility" Value="Collapsed" />
  258. </Style>
  259. <!-- VerticalColumnHeader -->
  260. <Style x:Key="ActionColumnHeader" TargetType="{x:Type syncfusion:GridHeaderCellControl}">
  261. <Setter Property="Background" Value="LightSkyBlue" />
  262. <Setter Property="Foreground" Value="Black" />
  263. <Setter Property="BorderBrush" Value="Black" />
  264. <Setter Property="BorderThickness" Value="0.5,0.5,0.5,0.5" />
  265. <Setter Property="HorizontalContentAlignment" Value="Left" />
  266. <Setter Property="Padding" Value="5,3" />
  267. <Setter Property="FontFamily" Value="Segoe UI" />
  268. <Setter Property="FontSize" Value="14" />
  269. <Setter Property="FontWeight" Value="Normal" />
  270. <Setter Property="IsTabStop" Value="False" />
  271. <Setter Property="Template">
  272. <Setter.Value>
  273. <ControlTemplate TargetType="{x:Type syncfusion:GridHeaderCellControl}">
  274. <Grid>
  275. <Grid.LayoutTransform>
  276. <RotateTransform Angle="90" />
  277. </Grid.LayoutTransform>
  278. <VisualStateManager.VisualStateGroups>
  279. <VisualStateGroup x:Name="HiddenColumnsResizingStates">
  280. <VisualState x:Name="PreviousColumnHidden">
  281. <Storyboard>
  282. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  283. Storyboard.TargetProperty="BorderThickness"
  284. Storyboard.TargetName="PART_HeaderCellBorder">
  285. <EasingThicknessKeyFrame KeyTime="0" Value="3,0,1,1" />
  286. </ThicknessAnimationUsingKeyFrames>
  287. </Storyboard>
  288. </VisualState>
  289. <VisualState x:Name="HiddenState">
  290. <Storyboard>
  291. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  292. Storyboard.TargetProperty="BorderThickness"
  293. Storyboard.TargetName="PART_HeaderCellBorder">
  294. <EasingThicknessKeyFrame KeyTime="0" Value="3,0,3,1" />
  295. </ThicknessAnimationUsingKeyFrames>
  296. </Storyboard>
  297. </VisualState>
  298. <VisualState x:Name="NormalState" />
  299. <VisualState x:Name="LastColumnHidden">
  300. <Storyboard>
  301. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  302. Storyboard.TargetProperty="BorderThickness"
  303. Storyboard.TargetName="PART_HeaderCellBorder">
  304. <EasingThicknessKeyFrame KeyTime="0" Value="0,0,3,1" />
  305. </ThicknessAnimationUsingKeyFrames>
  306. </Storyboard>
  307. </VisualState>
  308. </VisualStateGroup>
  309. <VisualStateGroup x:Name="CommonStates">
  310. <VisualState x:Name="MouseOver" />
  311. <VisualState x:Name="Normal" />
  312. </VisualStateGroup>
  313. <VisualStateGroup x:Name="BorderStates">
  314. <VisualState x:Name="NormalCell" />
  315. <VisualState x:Name="FooterColumnCell">
  316. <Storyboard BeginTime="0">
  317. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  318. Storyboard.TargetProperty="BorderThickness"
  319. Storyboard.TargetName="PART_FooterCellBorder">
  320. <EasingThicknessKeyFrame KeyTime="0" Value="1,0,1,1" />
  321. </ThicknessAnimationUsingKeyFrames>
  322. </Storyboard>
  323. </VisualState>
  324. <VisualState x:Name="BeforeFooterColumnCell">
  325. <Storyboard BeginTime="0">
  326. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  327. Storyboard.TargetProperty="BorderThickness"
  328. Storyboard.TargetName="PART_FooterCellBorder">
  329. <EasingThicknessKeyFrame KeyTime="0" Value="0,0,0,1" />
  330. </ThicknessAnimationUsingKeyFrames>
  331. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  332. Storyboard.TargetProperty="BorderThickness"
  333. Storyboard.TargetName="PART_HeaderCellBorder">
  334. <EasingThicknessKeyFrame KeyTime="0" Value="0,0,0,1" />
  335. </ThicknessAnimationUsingKeyFrames>
  336. </Storyboard>
  337. </VisualState>
  338. </VisualStateGroup>
  339. </VisualStateManager.VisualStateGroups>
  340. <Border x:Name="PART_FooterCellBorder" BorderBrush="{TemplateBinding BorderBrush}"
  341. Background="{TemplateBinding Background}" />
  342. <Border x:Name="PART_HeaderCellBorder" BorderBrush="{TemplateBinding BorderBrush}"
  343. BorderThickness="{TemplateBinding BorderThickness}"
  344. Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
  345. <Grid Margin="{TemplateBinding Padding}" SnapsToDevicePixels="True">
  346. <Grid.ColumnDefinitions>
  347. <ColumnDefinition Width="*" />
  348. <ColumnDefinition Width="Auto" />
  349. <ColumnDefinition Width="Auto" />
  350. </Grid.ColumnDefinitions>
  351. <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}"
  352. Content="{TemplateBinding Content}"
  353. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  354. Focusable="False"
  355. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  356. VerticalAlignment="Center" />
  357. <Grid x:Name="PART_SortButtonPresenter" Grid.Column="1" SnapsToDevicePixels="True">
  358. <Grid.ColumnDefinitions>
  359. <ColumnDefinition Width="*">
  360. <ColumnDefinition.MinWidth>
  361. <Binding Mode="OneWay" Path="SortDirection"
  362. RelativeSource="{RelativeSource TemplatedParent}">
  363. <Binding.Converter>
  364. <syncfusion:SortDirectionToWidthConverter />
  365. </Binding.Converter>
  366. </Binding>
  367. </ColumnDefinition.MinWidth>
  368. </ColumnDefinition>
  369. <ColumnDefinition Width="*" />
  370. </Grid.ColumnDefinitions>
  371. <Path
  372. 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"
  373. Fill="Gray" HorizontalAlignment="Center" Height="8.138" Stretch="Fill"
  374. SnapsToDevicePixels="True" VerticalAlignment="Center" Width="8.938">
  375. <Path.RenderTransform>
  376. <TransformGroup>
  377. <RotateTransform Angle="90" />
  378. <ScaleTransform ScaleY="1" ScaleX="1" />
  379. </TransformGroup>
  380. </Path.RenderTransform>
  381. <!-- <Path.Visibility> -->
  382. <!-- <Binding ConverterParameter="Ascending" Path="SortDirection" RelativeSource="{RelativeSource TemplatedParent}"> -->
  383. <!-- <Binding.Converter> -->
  384. <!-- <syncfusion:SortDirectionToVisibilityConverter/> -->
  385. <!-- </Binding.Converter> -->
  386. <!-- </Binding> -->
  387. <!-- </Path.Visibility> -->
  388. </Path>
  389. <Path
  390. 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"
  391. Fill="Gray" HorizontalAlignment="Center" Height="8.138" Stretch="Fill"
  392. SnapsToDevicePixels="True" VerticalAlignment="Center" Width="8.938">
  393. <Path.RenderTransform>
  394. <TransformGroup>
  395. <RotateTransform Angle="90" />
  396. <ScaleTransform ScaleY="1" ScaleX="1" />
  397. </TransformGroup>
  398. </Path.RenderTransform>
  399. <!-- <Path.Visibility> -->
  400. <!-- <Binding ConverterParameter="Decending" Path="SortDirection" RelativeSource="{RelativeSource TemplatedParent}"> -->
  401. <!-- <Binding.Converter> -->
  402. <!-- <syncfusion:SortDirectionToVisibilityConverter/> -->
  403. <!-- </Binding.Converter> -->
  404. <!-- </Binding> -->
  405. <!-- </Path.Visibility> -->
  406. </Path>
  407. <TextBlock Grid.Column="1" Foreground="{TemplateBinding Foreground}" FontSize="10"
  408. Margin="0,-4,0,0" SnapsToDevicePixels="True"
  409. Text="{TemplateBinding SortNumber}"
  410. Visibility="{TemplateBinding SortNumberVisibility}"
  411. VerticalAlignment="Center" />
  412. </Grid>
  413. <syncfusion:FilterToggleButton x:Name="PART_FilterToggleButton" Grid.Column="2"
  414. HorizontalAlignment="Stretch" SnapsToDevicePixels="True"
  415. Visibility="{TemplateBinding FilterIconVisiblity}"
  416. VerticalAlignment="Stretch" />
  417. <Border x:Name="PART_FilterPopUpPresenter" />
  418. </Grid>
  419. </Border>
  420. </Grid>
  421. </ControlTemplate>
  422. </Setter.Value>
  423. </Setter>
  424. </Style>
  425. <ControlTemplate x:Key="VerticalColumnHeader"
  426. TargetType="{x:Type syncfusion:GridHeaderCellControl}">
  427. <Grid>
  428. <Grid.LayoutTransform>
  429. <RotateTransform Angle="270" />
  430. </Grid.LayoutTransform>
  431. <VisualStateManager.VisualStateGroups>
  432. <VisualStateGroup x:Name="HiddenColumnsResizingStates">
  433. <VisualState x:Name="PreviousColumnHidden">
  434. <Storyboard>
  435. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  436. Storyboard.TargetProperty="BorderThickness"
  437. Storyboard.TargetName="PART_HeaderCellBorder">
  438. <EasingThicknessKeyFrame KeyTime="0" Value="3,0,1,1" />
  439. </ThicknessAnimationUsingKeyFrames>
  440. </Storyboard>
  441. </VisualState>
  442. <VisualState x:Name="HiddenState">
  443. <Storyboard>
  444. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  445. Storyboard.TargetProperty="BorderThickness"
  446. Storyboard.TargetName="PART_HeaderCellBorder">
  447. <EasingThicknessKeyFrame KeyTime="0" Value="3,0,3,1" />
  448. </ThicknessAnimationUsingKeyFrames>
  449. </Storyboard>
  450. </VisualState>
  451. <VisualState x:Name="NormalState" />
  452. <VisualState x:Name="LastColumnHidden">
  453. <Storyboard>
  454. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  455. Storyboard.TargetProperty="BorderThickness"
  456. Storyboard.TargetName="PART_HeaderCellBorder">
  457. <EasingThicknessKeyFrame KeyTime="0" Value="0,0,3,1" />
  458. </ThicknessAnimationUsingKeyFrames>
  459. </Storyboard>
  460. </VisualState>
  461. </VisualStateGroup>
  462. <VisualStateGroup x:Name="CommonStates">
  463. <VisualState x:Name="MouseOver" />
  464. <VisualState x:Name="Normal" />
  465. </VisualStateGroup>
  466. <VisualStateGroup x:Name="BorderStates">
  467. <VisualState x:Name="NormalCell" />
  468. <VisualState x:Name="FooterColumnCell">
  469. <Storyboard BeginTime="0">
  470. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  471. Storyboard.TargetProperty="BorderThickness"
  472. Storyboard.TargetName="PART_FooterCellBorder">
  473. <EasingThicknessKeyFrame KeyTime="0" Value="1,0,1,1" />
  474. </ThicknessAnimationUsingKeyFrames>
  475. </Storyboard>
  476. </VisualState>
  477. <VisualState x:Name="BeforeFooterColumnCell">
  478. <Storyboard BeginTime="0">
  479. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  480. Storyboard.TargetProperty="BorderThickness"
  481. Storyboard.TargetName="PART_FooterCellBorder">
  482. <EasingThicknessKeyFrame KeyTime="0" Value="0,0,0,1" />
  483. </ThicknessAnimationUsingKeyFrames>
  484. <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0"
  485. Storyboard.TargetProperty="BorderThickness"
  486. Storyboard.TargetName="PART_HeaderCellBorder">
  487. <EasingThicknessKeyFrame KeyTime="0" Value="0,0,0,1" />
  488. </ThicknessAnimationUsingKeyFrames>
  489. </Storyboard>
  490. </VisualState>
  491. </VisualStateGroup>
  492. </VisualStateManager.VisualStateGroups>
  493. <Border x:Name="PART_FooterCellBorder" BorderBrush="{TemplateBinding BorderBrush}"
  494. Background="{TemplateBinding Background}" />
  495. <Border x:Name="PART_HeaderCellBorder" BorderBrush="{TemplateBinding BorderBrush}"
  496. BorderThickness="{TemplateBinding BorderThickness}"
  497. Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
  498. <Grid Margin="{TemplateBinding Padding}" SnapsToDevicePixels="True">
  499. <Grid.ColumnDefinitions>
  500. <ColumnDefinition Width="*" />
  501. <ColumnDefinition Width="Auto" />
  502. <ColumnDefinition Width="Auto" />
  503. </Grid.ColumnDefinitions>
  504. <ContentPresenter
  505. ContentTemplate="{TemplateBinding ContentTemplate}"
  506. ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False"
  507. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  508. VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
  509. <ContentPresenter.Content>
  510. <TextBlock Text="{Binding HeaderText}" TextWrapping="Wrap" />
  511. </ContentPresenter.Content>
  512. </ContentPresenter>
  513. <Grid x:Name="PART_SortButtonPresenter" Grid.Column="1" SnapsToDevicePixels="True">
  514. <Grid.ColumnDefinitions>
  515. <ColumnDefinition Width="*">
  516. <ColumnDefinition.MinWidth>
  517. <Binding Mode="OneWay" Path="SortDirection"
  518. RelativeSource="{RelativeSource TemplatedParent}">
  519. <Binding.Converter>
  520. <syncfusion:SortDirectionToWidthConverter />
  521. </Binding.Converter>
  522. </Binding>
  523. </ColumnDefinition.MinWidth>
  524. </ColumnDefinition>
  525. <ColumnDefinition Width="*" />
  526. </Grid.ColumnDefinitions>
  527. <TextBlock Grid.Column="1" Foreground="{TemplateBinding Foreground}"
  528. FontSize="10" Margin="0,-4,0,0" SnapsToDevicePixels="True"
  529. Text="{TemplateBinding SortNumber}"
  530. Visibility="{TemplateBinding SortNumberVisibility}"
  531. VerticalAlignment="Bottom" />
  532. </Grid>
  533. <syncfusion:FilterToggleButton x:Name="PART_FilterToggleButton" Grid.Column="2"
  534. HorizontalAlignment="Stretch"
  535. SnapsToDevicePixels="True"
  536. Visibility="{TemplateBinding FilterIconVisiblity}"
  537. VerticalAlignment="Stretch">
  538. <syncfusion:FilterToggleButton.LayoutTransform>
  539. <RotateTransform Angle="90" />
  540. </syncfusion:FilterToggleButton.LayoutTransform>
  541. </syncfusion:FilterToggleButton>
  542. <Border x:Name="PART_FilterPopUpPresenter">
  543. <Border.LayoutTransform>
  544. <RotateTransform Angle="90" />
  545. </Border.LayoutTransform>
  546. </Border>
  547. </Grid>
  548. </Border>
  549. </Grid>
  550. </ControlTemplate>
  551. <Style BasedOn="{StaticResource {x:Type TabItem}}" TargetType="{x:Type local:DynamicTabItem}">
  552. <Setter Property="Template">
  553. <Setter.Value>
  554. <ControlTemplate TargetType="{x:Type local:DynamicTabItem}">
  555. <Border Name="Panel" BorderBrush="Gray" PreviewMouseRightButtonUp="Panel_OnPreviewMouseRightButtonUp">
  556. <Border.MinHeight>
  557. <MultiBinding>
  558. <MultiBinding.Converter>
  559. <wpf:DoubleCalculator Type="Sum" Constants="-0.75" />
  560. </MultiBinding.Converter>
  561. <Binding RelativeSource="{RelativeSource AncestorType={x:Type local:DynamicTabControl}}" Path="TabStripHeight" />
  562. </MultiBinding>
  563. </Border.MinHeight>
  564. <DockPanel>
  565. <Button x:Name="CloseButton" DockPanel.Dock="Right" Content="x" BorderThickness="0"
  566. Padding="5,0,5,0" Background="Transparent" VerticalContentAlignment="Center"
  567. HorizontalContentAlignment="Center"
  568. IsEnabled="True" Margin="2"
  569. Command="{TemplateBinding CloseTabCommand}" />
  570. <ContentPresenter
  571. x:Name="ContentSite"
  572. DockPanel.Dock="Left"
  573. VerticalAlignment="Center"
  574. HorizontalAlignment="Center"
  575. ContentSource="Header"
  576. Margin="10,0"
  577. />
  578. </DockPanel>
  579. </Border>
  580. <ControlTemplate.Triggers>
  581. <Trigger Property="IsSelected" Value="True">
  582. <Setter TargetName="Panel" Property="Background"
  583. Value="{Binding Path=(themes:ThemeManager.SelectedTabItemBackgroundBrush)}" />
  584. <Setter TargetName="Panel" Property="TextBlock.Foreground"
  585. Value="{Binding Path=(themes:ThemeManager.SelectedTabItemForegroundBrush)}" />
  586. </Trigger>
  587. <Trigger Property="IsSelected" Value="False">
  588. <Setter TargetName="Panel" Property="Background"
  589. Value="{Binding Path=(themes:ThemeManager.WorkspaceBackgroundBrush)}" />
  590. <Setter TargetName="Panel" Property="TextBlock.Foreground"
  591. Value="{Binding Path=(themes:ThemeManager.WorkspaceForegroundBrush)}" />
  592. </Trigger>
  593. <Trigger Property="CanClose" Value="True">
  594. <Setter TargetName="CloseButton" Property="Visibility" Value="Visible" />
  595. </Trigger>
  596. <Trigger Property="CanClose" Value="False">
  597. <Setter TargetName="CloseButton" Property="Visibility" Value="Collapsed" />
  598. </Trigger>
  599. <Trigger Property="TabStripPlacement" Value="{x:Static Dock.Top}">
  600. <Setter TargetName="Panel" Property="CornerRadius" Value="5,5,0,0" />
  601. <Setter TargetName="Panel" Property="Margin" Value="0,0,2,0" />
  602. <Setter TargetName="Panel" Property="BorderThickness" Value="0.75,0.75,0.75,0" />
  603. </Trigger>
  604. <Trigger Property="TabStripPlacement" Value="{x:Static Dock.Bottom}">
  605. <Setter TargetName="Panel" Property="CornerRadius" Value="0,0,5,5" />
  606. <Setter TargetName="Panel" Property="Margin" Value="0,0,2,0" />
  607. <Setter TargetName="Panel" Property="BorderThickness" Value="0.75,0,0.75,0.75" />
  608. </Trigger>
  609. </ControlTemplate.Triggers>
  610. </ControlTemplate>
  611. </Setter.Value>
  612. </Setter>
  613. </Style>
  614. <!-- ~1~ This template explains how to render a tab item with a close button. @1@ -->
  615. <!-- <DataTemplate x:Key="ClosableTabItemHeader"> -->
  616. <!-- <DockPanel MinWidth="120"> -->
  617. <!-- <Button DockPanel.Dock="Right" Command="ApplicationCommands.Delete" CommandParameter="{Binding}" Content="X" Cursor="Hand" Focusable="False" FontSize="10" FontWeight="Bold" Height="16" Width="16" /> -->
  618. <!-- <TextBlock Padding="0,0,10,0" Text="{Binding DisplayName}" VerticalAlignment="Center" /> -->
  619. <!-- </DockPanel> -->
  620. <!-- </DataTemplate> -->
  621. <!-- ~1~ This template explains how to render a tab item with a new button. @1@ -->
  622. <!-- <DataTemplate x:Key="NewTabItemHeader"> -->
  623. <!-- <Button Command="{Binding NewTabCommand, RelativeSource={RelativeSource AncestorType={x:Type local:DynamicTabControl}}}" Content="+" Cursor="Hand" Focusable="False" FontWeight="Bold" -->
  624. <!-- Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"/> -->
  625. <!-- </DataTemplate> -->
  626. <Style BasedOn="{StaticResource {x:Type TabControl}}" TargetType="{x:Type local:DynamicTabControl}">
  627. <Setter Property="Template">
  628. <Setter.Value>
  629. <ControlTemplate TargetType="{x:Type local:DynamicTabControl}">
  630. <Grid Background="{Binding Path=(themes:ThemeManager.WorkspaceBackgroundBrush)}">
  631. <Grid.RowDefinitions>
  632. <RowDefinition Height="Auto" />
  633. <RowDefinition Height="2" x:Name="TopSeparator"/>
  634. <RowDefinition Height="*" />
  635. <RowDefinition Height="0" x:Name="BottomSeparator" />
  636. <RowDefinition Height="Auto" />
  637. </Grid.RowDefinitions>
  638. <Grid.ColumnDefinitions>
  639. <ColumnDefinition Width="Auto"/>
  640. <ColumnDefinition Width="Auto"/>
  641. <ColumnDefinition Width="*"/>
  642. <ColumnDefinition Width="Auto"/>
  643. <ColumnDefinition Width="Auto"/>
  644. </Grid.ColumnDefinitions>
  645. <Border
  646. x:Name="Separator"
  647. BorderBrush="Gray"
  648. Grid.Column="0"
  649. Grid.ColumnSpan="5"
  650. Padding="0"
  651. MinHeight="{Binding TabStripHeight, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicTabControl}}">
  652. <DockPanel x:Name="Panel" Background="{Binding Path=(themes:ThemeManager.WorkspaceBackgroundBrush)}" Margin="0">
  653. <Button x:Name="AddButton" DockPanel.Dock="Right" Content="+"
  654. BorderThickness="0" Padding="5,0,5,0" Background="Transparent"
  655. Command="{TemplateBinding CreateTabCommand}" />
  656. <TabPanel IsItemsHost="true" Background="Transparent" VerticalAlignment="Stretch" Margin="0"/>
  657. </DockPanel>
  658. </Border>
  659. <!-- Margin="0,2,0,2" -->
  660. <ContentPresenter
  661. Grid.Row="2"
  662. Grid.Column="0"
  663. ContentSource="LeftPanel" />
  664. <syncfusion:SfGridSplitter
  665. Grid.Row="2"
  666. Grid.Column="1"
  667. ResizeBehavior="PreviousAndNext"
  668. Width="4"
  669. Background="Transparent"
  670. Visibility="{Binding LeftPanel, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicTabControl}, Converter={StaticResource DynamicTabControlVisibilityConverter}}"
  671. Template="{StaticResource VerticalSplitter}"/>
  672. <ContentPresenter
  673. Grid.Row="2"
  674. Grid.Column="2"
  675. x:Name="PART_SelectedContentHost"
  676. ContentSource="SelectedContent"
  677. />
  678. <syncfusion:SfGridSplitter
  679. Grid.Row="2"
  680. Grid.Column="3"
  681. ResizeBehavior="PreviousAndNext"
  682. Width="4"
  683. Background="Transparent"
  684. Visibility="{Binding RightPanel, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicTabControl}, Converter={StaticResource DynamicTabControlVisibilityConverter}}"
  685. Template="{StaticResource VerticalSplitter}"/>
  686. <!-- Margin="0,2,0,2" -->
  687. <ContentPresenter
  688. Grid.Row="2"
  689. Grid.Column="4"
  690. ContentSource="RightPanel" />
  691. </Grid>
  692. <ControlTemplate.Triggers>
  693. <Trigger Property="CanCreateTab" Value="True">
  694. <Setter TargetName="AddButton" Property="Visibility" Value="Visible" />
  695. </Trigger>
  696. <Trigger Property="CanCreateTab" Value="False">
  697. <Setter TargetName="AddButton" Property="Visibility" Value="Collapsed" />
  698. </Trigger>
  699. <!-- <Trigger Property="TabStripPlacement" Value="{x:Static Dock.Top}"> -->
  700. <!-- <Setter TargetName="Panel" Property="Grid.Row" Value="0" /> -->
  701. <!-- <Setter TargetName="Content" Property="BorderThickness" Value="0,0.75,0,0" /> -->
  702. <!-- <Setter TargetName="Content" Property="Padding" Value="0,2,0,0" /> -->
  703. <!-- </Trigger> -->
  704. <MultiTrigger>
  705. <MultiTrigger.Conditions>
  706. <Condition Property="TabStripPlacement" Value="{x:Static Dock.Top}" />
  707. <Condition Property="TabStripVisible" Value="False"/>
  708. </MultiTrigger.Conditions>
  709. <MultiTrigger.Setters>
  710. <Setter TargetName="Separator" Property="Grid.Row" Value="0" />
  711. <Setter TargetName="Separator" Property="BorderThickness" Value="0,0,0,0" />
  712. <Setter TargetName="TopSeparator" Property="Height" Value="0" />
  713. <Setter TargetName="BottomSeparator" Property="Height" Value="0" />
  714. </MultiTrigger.Setters>
  715. </MultiTrigger>
  716. <MultiTrigger>
  717. <MultiTrigger.Conditions>
  718. <Condition Property="TabStripPlacement" Value="{x:Static Dock.Top}" />
  719. <Condition Property="TabStripVisible" Value="True"/>
  720. </MultiTrigger.Conditions>
  721. <MultiTrigger.Setters>
  722. <Setter TargetName="Separator" Property="Grid.Row" Value="0" />
  723. <Setter TargetName="Separator" Property="BorderThickness" Value="0,0,0,0.75" />
  724. <Setter TargetName="Separator" Property="Margin" Value="0,0,0,0" />
  725. <Setter TargetName="TopSeparator" Property="Height" Value="{Binding SeparatorMargin, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicTabControl}}" />
  726. <Setter TargetName="BottomSeparator" Property="Height" Value="0" />
  727. </MultiTrigger.Setters>
  728. </MultiTrigger>
  729. <MultiTrigger>
  730. <MultiTrigger.Conditions>
  731. <Condition Property="TabStripPlacement" Value="{x:Static Dock.Bottom}" />
  732. <Condition Property="TabStripVisible" Value="False"/>
  733. </MultiTrigger.Conditions>
  734. <MultiTrigger.Setters>
  735. <Setter TargetName="Separator" Property="Grid.Row" Value="4" />
  736. <Setter TargetName="Separator" Property="BorderThickness" Value="0,0,0,0" />
  737. <Setter TargetName="TopSeparator" Property="Height" Value="0" />
  738. <Setter TargetName="BottomSeparator" Property="Height" Value="0" />
  739. </MultiTrigger.Setters>
  740. </MultiTrigger>
  741. <MultiTrigger>
  742. <MultiTrigger.Conditions>
  743. <Condition Property="TabStripPlacement" Value="{x:Static Dock.Bottom}" />
  744. <Condition Property="TabStripVisible" Value="True"/>
  745. </MultiTrigger.Conditions>
  746. <MultiTrigger.Setters>
  747. <Setter TargetName="Separator" Property="Grid.Row" Value="4" />
  748. <Setter TargetName="Separator" Property="BorderThickness" Value="0,0.75,0,0" />
  749. <Setter TargetName="Separator" Property="Margin" Value="0,0,0,0" />
  750. <Setter TargetName="TopSeparator" Property="Height" Value="0" />
  751. <Setter TargetName="BottomSeparator" Property="Height" Value="{Binding SeparatorMargin, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicTabControl}}" />
  752. </MultiTrigger.Setters>
  753. </MultiTrigger>
  754. </ControlTemplate.Triggers>
  755. </ControlTemplate>
  756. </Setter.Value>
  757. </Setter>
  758. </Style>
  759. </ResourceDictionary>