SecondaryWindow.xaml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <syncfusion:RibbonWindow x:Class="PRSDesktop.SecondaryWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
  7. syncfusion:SkinStorage.VisualStyle="Office2013"
  8. mc:Ignorable="d"
  9. Title="SecondaryWindow"
  10. Height="450"
  11. Width="800"
  12. Loaded="Window_Loaded"
  13. SizeChanged="Window_SizeChanged"
  14. LocationChanged="Window_LocationChanged"
  15. Closing="Window_Closing"
  16. Office2010Icon="pack://application:,,,/Resources/appicon.png">
  17. <syncfusion:RibbonWindow.Resources>
  18. <ResourceDictionary>
  19. <Style x:Key="RibbonStyle" TargetType="syncfusion:Ribbon" BasedOn="{StaticResource Office2013RibbonStyle}">
  20. <Style.Triggers>
  21. <Trigger Property="RibbonState" Value="Normal">
  22. <Setter Property="Template">
  23. <Setter.Value>
  24. <ControlTemplate TargetType="{x:Type syncfusion:Ribbon}">
  25. <AdornerDecorator
  26. Name="PART_AdornerDecorator"
  27. Margin="0,-53,0,0"
  28. Panel.ZIndex="100"
  29. DockPanel.Dock="Top">
  30. <Border>
  31. <Grid ClipToBounds="True">
  32. <Grid.RowDefinitions>
  33. <RowDefinition>
  34. <RowDefinition.Style>
  35. <Style>
  36. <Setter Property="RowDefinition.Height" Value="28" />
  37. <Style.Triggers>
  38. <Trigger
  39. Property="syncfusion:SkinStorage.EnableTouch"
  40. Value="True">
  41. <Setter Property="RowDefinition.Height"
  42. Value="48" />
  43. </Trigger>
  44. </Style.Triggers>
  45. </Style>
  46. </RowDefinition.Style>
  47. </RowDefinition>
  48. <RowDefinition Height="*" />
  49. <RowDefinition Height="Auto" />
  50. </Grid.RowDefinitions>
  51. <DockPanel Grid.Row="0" Panel.ZIndex="200">
  52. <syncfusion:RibbonWindowPanel
  53. x:Name="PART_RibbonWindowPanel"
  54. MinHeight="28"
  55. Panel.ZIndex="100"
  56. DockPanel.Dock="Top">
  57. <Border
  58. x:Name="PART_TitleBorder"
  59. Width="{TemplateBinding ActualWidth}"
  60. Height="30"
  61. Margin="0,0,0,-20"
  62. Visibility="Collapsed" />
  63. <ContentPresenter Content="{TemplateBinding BackStageButton}"
  64. Focusable="False" />
  65. <ContentPresenter
  66. Margin="30,0,0,0"
  67. HorizontalAlignment="Center"
  68. syncfusion:WindowChrome.IsHitTestVisibleInChrome="True"
  69. Content="{TemplateBinding QuickAccessToolBar}">
  70. <ContentPresenter.Style>
  71. <Style>
  72. <Setter Property="FrameworkElement.Height"
  73. Value="25" />
  74. <Style.Triggers>
  75. <Trigger
  76. Property="syncfusion:SkinStorage.EnableTouch"
  77. Value="True">
  78. <Setter Property="FrameworkElement.Height"
  79. Value="40" />
  80. </Trigger>
  81. </Style.Triggers>
  82. </Style>
  83. </ContentPresenter.Style>
  84. </ContentPresenter>
  85. </syncfusion:RibbonWindowPanel>
  86. <Border
  87. Width="5"
  88. Height="1"
  89. Margin="0,-14,0,0"
  90. DockPanel.Dock="Left" />
  91. <Border
  92. Width="41"
  93. Height="0"
  94. Margin="0,-14,0,0"
  95. Panel.ZIndex="11"
  96. BorderBrush="{TemplateBinding BorderBrush}"
  97. BorderThickness="0,0,0,0"
  98. DockPanel.Dock="Left" />
  99. <Border
  100. Width="5"
  101. Height="0.02"
  102. Margin="0,-14,0,0"
  103. Panel.ZIndex="12"
  104. DockPanel.Dock="Right" />
  105. <Border
  106. Panel.ZIndex="12"
  107. BorderThickness="0"
  108. DockPanel.Dock="Right">
  109. <Border.Style>
  110. <Style>
  111. <Setter Property="Border.Margin" Value="0,-24,0,1" />
  112. <Setter Property="Border.Height" Value="23" />
  113. <Style.Triggers>
  114. <Trigger
  115. Property="syncfusion:SkinStorage.EnableTouch"
  116. Value="True">
  117. <Setter Property="Border.Margin"
  118. Value="0,-39,0,1" />
  119. <Setter Property="Border.Height" Value="40" />
  120. </Trigger>
  121. </Style.Triggers>
  122. </Style>
  123. </Border.Style>
  124. <ContentPresenter ContentSource="TabPanelItem" />
  125. </Border>
  126. <Border
  127. x:Name="ribbonTabBorder" Visibility="Collapsed"
  128. Panel.ZIndex="10"
  129. BorderBrush="{TemplateBinding BorderBrush}"
  130. DockPanel.Dock="Bottom">
  131. <Border.Style>
  132. <Style>
  133. <!--<Setter Property="Border.Margin" Value="17,-25,0,2"/>-->
  134. <Style.Triggers>
  135. <DataTrigger
  136. Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type syncfusion:Ribbon}}, Path=BackStageButton.Visibility}"
  137. Value="Visible">
  138. <Setter Property="Border.Margin"
  139. Value="17,-25,0,2" />
  140. </DataTrigger>
  141. <DataTrigger
  142. Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type syncfusion:Ribbon}}, Path=BackStageButton.Visibility}"
  143. Value="Collapsed">
  144. <Setter Property="Border.Margin"
  145. Value="-46,-25,0,2" />
  146. </DataTrigger>
  147. </Style.Triggers>
  148. </Style>
  149. </Border.Style>
  150. <ItemsPresenter Focusable="False"
  151. KeyboardNavigation.IsTabStop="False" />
  152. </Border>
  153. </DockPanel>
  154. <Border
  155. x:Name="ribBorder"
  156. Grid.Row="1"
  157. Margin="0,-1,0,0"
  158. Padding="0"
  159. Background="{TemplateBinding Background}"
  160. BorderBrush="{TemplateBinding BorderBrush}"
  161. BorderThickness="1">
  162. <Grid>
  163. <Grid.ColumnDefinitions>
  164. <ColumnDefinition Width="*" />
  165. <ColumnDefinition Width="Auto" />
  166. </Grid.ColumnDefinitions>
  167. <syncfusion:RibbonTabItemsControl
  168. DisplayMemberPath="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedTabItem.DisplayMemberPath}"
  169. Focusable="False"
  170. ItemContainerStyle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedTabItem.ItemContainerStyle}"
  171. ItemContainerStyleSelector="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedTabItem.ItemContainerStyleSelector}"
  172. ItemStringFormat="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedTabItem.ItemStringFormat}"
  173. ItemTemplate="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedTabItem.ItemTemplate}"
  174. ItemTemplateSelector="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedTabItem.ItemTemplateSelector}"
  175. ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedTabItem.Items}">
  176. <syncfusion:RibbonTabItemsControl.ItemsPanel>
  177. <ItemsPanelTemplate>
  178. <syncfusion:RibbonLayoutPanel />
  179. </ItemsPanelTemplate>
  180. </syncfusion:RibbonTabItemsControl.ItemsPanel>
  181. </syncfusion:RibbonTabItemsControl>
  182. <Grid Grid.Column="1" HorizontalAlignment="Right">
  183. <syncfusion:RibbonToggleButton
  184. x:Name="ToggleButton"
  185. Width="29"
  186. Height="22"
  187. HorizontalAlignment="Right"
  188. VerticalAlignment="Bottom"
  189. Panel.ZIndex="12"
  190. syncfusion:Ribbon.IsQATItem="False"
  191. Style="{DynamicResource RibbonToggleButtonStyle}"
  192. Visibility="{TemplateBinding MinimizeButtonVisibility}" />
  193. </Grid>
  194. </Grid>
  195. </Border>
  196. </Grid>
  197. </Border>
  198. </AdornerDecorator>
  199. <ControlTemplate.Triggers>
  200. <!-- <Trigger Property="componentModel:DesignerProperties.IsInDesignMode" -->
  201. <!-- Value="True"> -->
  202. <!-- <Setter TargetName="PART_AdornerDecorator" Property="Margin" -->
  203. <!-- Value="0,-53,0,0" /> -->
  204. <!-- </Trigger> -->
  205. <Trigger Property="syncfusion:SkinStorage.EnableTouch" Value="True">
  206. <Setter TargetName="ribbonTabBorder" Property="Margin" Value="17,-27,0,2" />
  207. <Setter TargetName="ribBorder" Property="Margin" Value="0,-3,0,0" />
  208. <Setter TargetName="PART_RibbonWindowPanel" Property="MinHeight" Value="73" />
  209. </Trigger>
  210. <Trigger Property="syncfusion:SkinStorage.EnableTouch" Value="False">
  211. <Setter TargetName="PART_RibbonWindowPanel" Property="MinHeight" Value="53" />
  212. </Trigger>
  213. </ControlTemplate.Triggers>
  214. </ControlTemplate>
  215. </Setter.Value>
  216. </Setter>
  217. </Trigger>
  218. </Style.Triggers>
  219. </Style>
  220. </ResourceDictionary>
  221. </syncfusion:RibbonWindow.Resources>
  222. <syncfusion:RibbonWindow.HeaderItems>
  223. <syncfusion:ButtonAdv x:Name="Wiki" Height="25" Label="Online Documentation" SizeMode="Normal"
  224. Click="Wiki_Click" SmallIcon="pack://application:,,,/Resources/help.png" />
  225. </syncfusion:RibbonWindow.HeaderItems>
  226. <syncfusion:RibbonWindow.StatusBar>
  227. <syncfusion:RibbonStatusBar Height="30" Background="DimGray" />
  228. </syncfusion:RibbonWindow.StatusBar>
  229. <Grid Background="WhiteSmoke">
  230. <Grid.RowDefinitions>
  231. <RowDefinition Height="Auto" />
  232. <RowDefinition Height="*" />
  233. </Grid.RowDefinitions>
  234. <!--syncfusion:Ribbon x:Name="_ribbon" Grid.Row="0" syncfusion:Ribbon.IsAutoSizeFormEnabled="False"
  235. RibbonState="Normal" MinimizeButtonVisibility="Collapsed" Background="White"
  236. Style="{StaticResource RibbonStyle}" Margin="-1"-->
  237. <syncfusion:Ribbon x:Name="_ribbon" Grid.Row="0" syncfusion:Ribbon.IsAutoSizeFormEnabled="False"
  238. RibbonState="Normal" MinimizeButtonVisibility="Collapsed" Background="White"
  239. Margin="-1">
  240. <syncfusion:RibbonTab x:Name="SecondaryTab" Caption="Quotes" IsChecked="False" Visibility="Visible">
  241. <syncfusion:RibbonBar x:Name="Actions" Header="Actions" LauncherClick="ManageModulesClick"
  242. IsLauncherButtonVisible="True">
  243. <syncfusion:RibbonButton x:Name="Refresh" SizeForm="Large" Label="Refresh"
  244. LargeIcon="pack://application:,,,/Resources/refresh.png"
  245. Click="RefreshMenu_Click" MinWidth="60" />
  246. <syncfusion:RibbonSeparator x:Name="Separator" Visibility="Collapsed" />
  247. </syncfusion:RibbonBar>
  248. <syncfusion:RibbonBar x:Name="Print" Header="Print" LauncherClick="ManageReportsClick"
  249. IsLauncherButtonVisible="True" />
  250. </syncfusion:RibbonTab>
  251. </syncfusion:Ribbon>
  252. <Border x:Name="ContentBorder" Grid.Row="2" Margin="-1" Padding="3" />
  253. </Grid>
  254. </syncfusion:RibbonWindow>