App.xaml 70 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001
  1. <Application x:Class="ivf_tl_Manage.App"
  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:ivf_tl_Manage"
  5. xmlns:viewModels="clr-namespace:ivf_tl_Manage.ViewModels"
  6. xmlns:views="clr-namespace:ivf_tl_Manage.Views"
  7. xmlns:converter="clr-namespace:ivf_tl_Manage.Converts"
  8. xmlns:userControl="clr-namespace:ivf_tl_Manage.UserControls"
  9. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  10. StartupUri="MainWindow.xaml">
  11. <Application.Resources>
  12. <ResourceDictionary>
  13. <ResourceDictionary.MergedDictionaries>
  14. <ResourceDictionary>
  15. <FontFamily x:Key="sourceHan">
  16. Resources/Fonts/SourceHanSansSC-VF.ttf#Source Han Sans SC VF
  17. </FontFamily>
  18. </ResourceDictionary>
  19. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/Colors.xaml"/>
  20. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/Effects.xaml"/>
  21. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/Brushes.xaml"/>
  22. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/Geometrys.xaml"/>
  23. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/ConstProperty.xaml"/>
  24. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/BaseStyleResource.xaml"/>
  25. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/Others/OtherResource.xaml"/>
  26. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/Blocks/BlocksResource.xaml"/>
  27. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/Buttons/ButtonResource.xaml"/>
  28. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/ScrollViewers/ScrollViewerResource.xaml"/>
  29. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/ListBoxs/ListBoxResource.xaml"/>
  30. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/ComboBoxs/ComboBoxResource.xaml"/>
  31. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/DatePickers/DatePickerResource.xaml"/>
  32. <ResourceDictionary Source="pack://application:,,,/ivf_tl_CustomControls_PC;component/BaseStyle/BaseStyleResource.xaml"/>
  33. <ResourceDictionary Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Language/Chinese.xaml"/>
  34. <!--<ResourceDictionary Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Language/English.xaml"/>-->
  35. </ResourceDictionary.MergedDictionaries>
  36. <!--设备管理界面-->
  37. <DataTemplate DataType="{x:Type viewModels:DevManageViewModel}">
  38. <views:DevManageView/>
  39. </DataTemplate>
  40. <!--患者管理界面-->
  41. <DataTemplate DataType="{x:Type viewModels:PatientManageViewModel}">
  42. <views:PatientManageView/>
  43. </DataTemplate>
  44. <!--胚胎详情界面-->
  45. <DataTemplate DataType="{x:Type viewModels:DetailViewModel}">
  46. <views:DetailView/>
  47. </DataTemplate>
  48. <!--标记页面-->
  49. <DataTemplate DataType="{x:Type viewModels:MarkUseViewModel}">
  50. <views:MarkUseView/>
  51. </DataTemplate>
  52. <!--图片查看页面-->
  53. <DataTemplate DataType="{x:Type viewModels:DetailPicViewModel}">
  54. <views:DetailPicView/>
  55. </DataTemplate>
  56. <!--标记详情-->
  57. <DataTemplate DataType="{x:Type viewModels:MarkDetailViewModel}">
  58. <views:MarkDetail/>
  59. </DataTemplate>
  60. <!--标记明细-->
  61. <DataTemplate DataType="{x:Type viewModels:MarkDetailViewModel1}">
  62. <views:MarkDetail1/>
  63. </DataTemplate>
  64. <!--模型配置页面-->
  65. <DataTemplate DataType="{x:Type viewModels:MarkSettingViewModel}">
  66. <views:MarkSettingView/>
  67. </DataTemplate>
  68. <!--报警配置页面-->
  69. <DataTemplate DataType="{x:Type viewModels:AlarmSettingViewModel}">
  70. <views:AlarmSettingView/>
  71. </DataTemplate>
  72. <!--培养记录页面-->
  73. <DataTemplate DataType="{x:Type viewModels:DishRecordViewModel}">
  74. <views:DishRecordView/>
  75. </DataTemplate>
  76. <!--系统异常页面-->
  77. <DataTemplate DataType="{x:Type viewModels:AlarmHistoryViewModel}">
  78. <views:AlarmHistoryView/>
  79. </DataTemplate>
  80. <!--仓室页面-->
  81. <DataTemplate DataType="{x:Type viewModels:BinSettingViewModel}">
  82. <views:BinSetting/>
  83. </DataTemplate>
  84. <!--系统管理页面-->
  85. <DataTemplate DataType="{x:Type viewModels:AppSettingViewModel}">
  86. <views:AppSettingView/>
  87. </DataTemplate>
  88. <!--系统设置页面-->
  89. <DataTemplate DataType="{x:Type viewModels:HouseSettingViewModel}">
  90. <views:HouseSettingView/>
  91. </DataTemplate>
  92. <!--测试页面-->
  93. <DataTemplate DataType="{x:Type viewModels:TestViewModel}">
  94. <views:TestView/>
  95. </DataTemplate>
  96. <DataTemplate DataType="{x:Type viewModels:AlarmSettingNewViewModel}">
  97. <views:AlarmSettingViewNew/>
  98. </DataTemplate>
  99. <DataTemplate DataType="{x:Type viewModels:PdfViewModel}">
  100. <views:PdfView/>
  101. </DataTemplate>
  102. <converter:CompositeCollectionConverter x:Key="CompositeCollectionConverter" />
  103. <converter:ObjectToVisibilityConvert x:Key="ObjectToVisibilityConvert" />
  104. <converter:IntToDownStringConvert x:Key="IntToDownStringConvert" />
  105. <converter:IntToDownColorConvert x:Key="IntToDownColorConvert" />
  106. <converter:Int2ToDownVisibilityConvert x:Key="Int2ToDownVisibilityConvert" />
  107. <!--DeviceInfoUserControlConvert 设备管理界面-->
  108. <converter:CustomButtonIconConvert x:Key="CustomButtonIconConvert" />
  109. <converter:CustomButtonMouseOverIconConvert x:Key="CustomButtonMouseOverIconConvert" />
  110. <converter:ForegroundConver x:Key="ForegroundConver" />
  111. <converter:MouseForegroundConver x:Key="MouseForegroundConver" />
  112. <!--HouseInfoUserControlConvert 设备管理界面舱室卡片-->
  113. <converter:HouseSnForegroundConvert x:Key="HouseSnForegroundConvert" />
  114. <converter:DishInfoForegroundConver x:Key="DishInfoForegroundConver" />
  115. <converter:HouseInfoImageConvert x:Key="HouseInfoImageConvert" />
  116. <converter:HouseInfoImageConvert1 x:Key="HouseInfoImageConvert1" />
  117. <converter:HouseInfoAlarmImageConvert x:Key="HouseInfoAlarmImageConvert" />
  118. <converter:HouseInfoForegroundConver x:Key="HouseInfoForegroundConver" />
  119. <converter:HouseInfoForegroundConver1 x:Key="HouseInfoForegroundConver1" />
  120. <!--DishInfoUserControl 患者管理界面-->
  121. <converter:DishInfoUserOnlyVipConvert x:Key="DishInfoUserOnlyVipConvert" />
  122. <converter:DishInfoDataAndVipConvert x:Key="DishInfoDataAndVipConvert" />
  123. <converter:DishInfoDataAndVipConvert1 x:Key="DishInfoDataAndVipConvert1" />
  124. <converter:DishInfoOnlyHouseConvert x:Key="DishInfoOnlyHouseConvert" />
  125. <!--AddDishWindow 新建或者编辑患者信息-->
  126. <SolidColorBrush x:Key="ListBox.Static.Background1" Color="#FFFFFFFF"/>
  127. <SolidColorBrush x:Key="ListBox.Static.Border1" Color="#FFABADB3"/>
  128. <SolidColorBrush x:Key="ListBox.Disabled.Background1" Color="#FFFFFFFF"/>
  129. <SolidColorBrush x:Key="ListBox.Disabled.Border1" Color="#FFD9D9D9"/>
  130. <converter:AddDishOnlyVipConvert x:Key="AddDishOnlyVipConvert" />
  131. <!--AddDishWindow 模型配置界面-->
  132. <converter:MarkSettingStackpanelVisibilityConvert x:Key="MarkSettingStackpanelVisibilityConvert" />
  133. <converter:UnitToTextConvert x:Key="UnitToTextConvert" />
  134. <converter:CanvasBackgroundSourceConvert x:Key="CanvasBackgroundSourceConvert" />
  135. <converter:CanvasMouseOverBackgroundSourceConvert x:Key="CanvasMouseOverBackgroundSourceConvert" />
  136. <converter:CanvasBackgroundSourceConvert1 x:Key="CanvasBackgroundSourceConvert1" />
  137. <converter:CanvasMouseOverBackgroundSourceConvert1 x:Key="CanvasMouseOverBackgroundSourceConvert1" />
  138. <converter:TLStateInfoConvert x:Key="TLStateInfoConvert" />
  139. <converter:HouseInfoDishConvert x:Key="HouseInfoDishConvert" />
  140. <converter:Int_1ToHiddenConvert x:Key="Int_1ToHiddenConvert" />
  141. <converter:Int_1ToVisibleConvert x:Key="Int_1ToVisibleConvert" />
  142. <converter:Int0ToHiddenConvert x:Key="Int0ToHiddenConvert" />
  143. <converter:Int0ToCollapsedConvert x:Key="Int0ToCollapsedConvert" />
  144. <converter:Int0ToVisibilityConvert x:Key="Int0ToVisibilityConvert" />
  145. <converter:Int1ToVisibilityConvert x:Key="Int1ToVisibilityConvert" />
  146. <converter:Int1ToHiddenConvert x:Key="Int1ToHiddenConvert" />
  147. <converter:Int2ToVisibilityConvert x:Key="Int2ToVisibilityConvert" />
  148. <converter:IntToBoolConvert x:Key="IntToBoolConvert" />
  149. <converter:Int0ToBoolConvert x:Key="Int0ToBoolConvert" />
  150. <converter:BoolToVisibilityConvert x:Key="BoolToVisibilityConvert" />
  151. <converter:BooleanToBitmapImageConvert x:Key="BooleanToBitmapImageConvert" />
  152. <converter:IsNullToVisibilityConvert x:Key="IsNullToVisibilityConvert" />
  153. <converter:StringToVisibilityConvert x:Key="StringToVisibilityConvert" />
  154. <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
  155. <converter:ScrOffectToOpacityConvert x:Key="ScrOffectToOpacityConvert" />
  156. <ControlTemplate x:Key="t1">
  157. <Canvas >
  158. <Canvas Background="Transparent" Canvas.Left="{Binding Position.X}" Canvas.Top="{Binding Position.Y}" Width="255" Height="209">
  159. <Canvas.RenderTransform>
  160. <TranslateTransform X="-127.5" Y="-184" />
  161. </Canvas.RenderTransform>
  162. <Image Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/TrackBackground.png" Width="255" Height="184"/>
  163. <TextBlock Canvas.Left="80" Canvas.Top="40" Text="{Binding}" FontWeight="Medium" Foreground="#4D4D4D" FontSize="16"/>
  164. <Rectangle Canvas.Left="75" Canvas.Top="83" Fill="#6AAAF5" Width="24" Height="14" RadiusX="7" RadiusY="7"/>
  165. <TextBlock Canvas.Left="109" Canvas.Top="71" Text="{Binding DataPoint.Y,StringFormat={}{0:00.00}}" FontWeight="Bold" Foreground="#0B0B0B" FontSize="26"/>
  166. <TextBlock Canvas.Left="100" Canvas.Top="115" FontWeight="Medium" Foreground="#707070" FontSize="16">
  167. <Run Text="{DynamicResource 0348}"/><Run Text="/℃"/>
  168. </TextBlock>
  169. <Image Panel.ZIndex="5" Canvas.Left="102" Canvas.Top="157" Width="50" Height="50" Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/RadImage.png"/>
  170. </Canvas>
  171. </Canvas>
  172. </ControlTemplate>
  173. <ControlTemplate x:Key="t2">
  174. <Canvas >
  175. <Canvas Background="Transparent" Canvas.Left="{Binding Position.X}" Canvas.Top="{Binding Position.Y}" Width="255" Height="209">
  176. <Canvas.RenderTransform>
  177. <TranslateTransform X="-127.5" Y="-184" />
  178. </Canvas.RenderTransform>
  179. <Image Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/TrackBackground.png" Width="255" Height="184"/>
  180. <TextBlock Canvas.Left="80" Canvas.Top="40" Text="{Binding}" FontWeight="Medium" Foreground="#4D4D4D" FontSize="16"/>
  181. <Rectangle Canvas.Left="95" Canvas.Top="83" Fill="#9D77EE" Width="24" Height="14" RadiusX="7" RadiusY="7"/>
  182. <TextBlock Canvas.Left="129" Canvas.Top="71" Text="{Binding DataPoint.Y,StringFormat={}{0:00}}" FontWeight="Bold" Foreground="#0B0B0B" FontSize="26"/>
  183. <TextBlock Canvas.Left="88" Canvas.Top="115" FontWeight="Medium" Foreground="#707070" FontSize="16">
  184. <Run Text="{DynamicResource 0349}"/><Run Text="/mbar"/>
  185. </TextBlock>
  186. <Image Panel.ZIndex="5" Canvas.Left="102" Canvas.Top="157" Width="50" Height="50" Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/RadImage2.png"/>
  187. </Canvas>
  188. </Canvas>
  189. </ControlTemplate>
  190. <ControlTemplate x:Key="t3">
  191. <Canvas >
  192. <Canvas Background="Transparent" Canvas.Left="{Binding Position.X}" Canvas.Top="{Binding Position.Y}" Width="255" Height="209">
  193. <Canvas.RenderTransform>
  194. <TranslateTransform X="-127.5" Y="-184" />
  195. </Canvas.RenderTransform>
  196. <Image Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/TrackBackground.png" Width="255" Height="184"/>
  197. <TextBlock Canvas.Left="80" Canvas.Top="40" Text="{Binding}" FontWeight="Medium" Foreground="#4D4D4D" FontSize="16"/>
  198. <Rectangle Canvas.Left="75" Canvas.Top="83" Fill="#A9C9EE" Width="24" Height="14" RadiusX="7" RadiusY="7"/>
  199. <TextBlock Canvas.Left="109" Canvas.Top="71" Text="{Binding DataPoint.Y,StringFormat={}{0:00.00}}" FontWeight="Bold" Foreground="#0B0B0B" FontSize="26"/>
  200. <TextBlock Canvas.Left="100" Canvas.Top="115" FontWeight="Medium" Foreground="#707070" FontSize="16">
  201. <Run Text="{DynamicResource 0348}"/><Run Text="/℃"/>
  202. </TextBlock>
  203. <Image Panel.ZIndex="5" Canvas.Left="102" Canvas.Top="157" Width="50" Height="50" Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/RadImage3.png"/>
  204. </Canvas>
  205. </Canvas>
  206. </ControlTemplate>
  207. <ControlTemplate x:Key="t4">
  208. <Canvas >
  209. <Canvas Background="Transparent" Canvas.Left="{Binding Position.X}" Canvas.Top="{Binding Position.Y}" Width="255" Height="209">
  210. <Canvas.RenderTransform>
  211. <TranslateTransform X="-127.5" Y="-184" />
  212. </Canvas.RenderTransform>
  213. <Image Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/TrackBackground.png" Width="255" Height="184"/>
  214. <TextBlock Canvas.Left="80" Canvas.Top="40" Text="{Binding}" FontWeight="Medium" Foreground="#4D4D4D" FontSize="16"/>
  215. <Rectangle Canvas.Left="95" Canvas.Top="83" Fill="#C5AFF4" Width="24" Height="14" RadiusX="7" RadiusY="7"/>
  216. <TextBlock Canvas.Left="129" Canvas.Top="71" Text="{Binding DataPoint.Y,StringFormat={}{0:00}}" FontWeight="Bold" Foreground="#0B0B0B" FontSize="26"/>
  217. <TextBlock Canvas.Left="88" Canvas.Top="115" FontWeight="Medium" Foreground="#707070" FontSize="16">
  218. <Run Text="{DynamicResource 0349}"/><Run Text="/mbar"/>
  219. </TextBlock>
  220. <Image Panel.ZIndex="5" Canvas.Left="102" Canvas.Top="157" Width="50" Height="50" Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/RadImage4.png"/>
  221. </Canvas>
  222. </Canvas>
  223. </ControlTemplate>
  224. <Style x:Key="FocusVisual">
  225. <Setter Property="Control.Template">
  226. <Setter.Value>
  227. <ControlTemplate>
  228. <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
  229. </ControlTemplate>
  230. </Setter.Value>
  231. </Setter>
  232. </Style>
  233. <SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
  234. <SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
  235. <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
  236. <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
  237. <SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
  238. <SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
  239. <SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
  240. <SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
  241. <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
  242. <SolidColorBrush x:Key="ListBox.Static.Background" Color="#FFFFFFFF"/>
  243. <SolidColorBrush x:Key="ListBox.Static.Border" Color="#FFABADB3"/>
  244. <SolidColorBrush x:Key="ListBox.Disabled.Background" Color="#FFFFFFFF"/>
  245. <SolidColorBrush x:Key="ListBox.Disabled.Border" Color="#FFD9D9D9"/>
  246. <SolidColorBrush x:Key="OptionMark.Static.Background" Color="#FFFFFFFF"/>
  247. <SolidColorBrush x:Key="OptionMark.Static.Border" Color="#FF707070"/>
  248. <SolidColorBrush x:Key="OptionMark.Static.Glyph" Color="#FF212121"/>
  249. <SolidColorBrush x:Key="OptionMark.MouseOver.Background" Color="#FFF3F9FF"/>
  250. <SolidColorBrush x:Key="OptionMark.MouseOver.Border" Color="#FF5593FF"/>
  251. <SolidColorBrush x:Key="OptionMark.MouseOver.Glyph" Color="#FF212121"/>
  252. <SolidColorBrush x:Key="OptionMark.Pressed.Background" Color="#FFD9ECFF"/>
  253. <SolidColorBrush x:Key="OptionMark.Pressed.Border" Color="#FF3C77DD"/>
  254. <SolidColorBrush x:Key="OptionMark.Pressed.Glyph" Color="#FF212121"/>
  255. <SolidColorBrush x:Key="OptionMark.Disabled.Background" Color="#FFE6E6E6"/>
  256. <SolidColorBrush x:Key="OptionMark.Disabled.Border" Color="#FFBCBCBC"/>
  257. <SolidColorBrush x:Key="OptionMark.Disabled.Glyph" Color="#FF707070"/>
  258. <ItemsPanelTemplate x:Key="ItemsPanelHorCenter">
  259. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"/>
  260. </ItemsPanelTemplate>
  261. <ItemsPanelTemplate x:Key="ItemsPanelHorCenter1">
  262. <VirtualizingStackPanel Orientation="Horizontal" HorizontalAlignment="Center"/>
  263. </ItemsPanelTemplate>
  264. <Style x:Key="ButtonStyle1" TargetType="{x:Type Button}">
  265. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  266. <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
  267. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
  268. <Setter Property="Foreground" Value="#9B9B9B"/>
  269. <Setter Property="BorderThickness" Value="1"/>
  270. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  271. <Setter Property="VerticalContentAlignment" Value="Center"/>
  272. <Setter Property="Padding" Value="1"/>
  273. <Setter Property="Template">
  274. <Setter.Value>
  275. <ControlTemplate TargetType="{x:Type Button}">
  276. <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
  277. <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  278. </Border>
  279. </ControlTemplate>
  280. </Setter.Value>
  281. </Setter>
  282. <Style.Triggers>
  283. <Trigger Property="IsMouseOver" Value="true">
  284. <Setter Property="Foreground" Value="Black"/>
  285. </Trigger>
  286. </Style.Triggers>
  287. </Style>
  288. <Style x:Key="ListBoxItemContainerStyleP" TargetType="{x:Type ListBoxItem}">
  289. <Setter Property="FontWeight" Value="Medium"/>
  290. <Setter Property="FontSize" Value="24"/>
  291. <Setter Property="Foreground" Value="#4D4D4D"/>
  292. <Setter Property="SnapsToDevicePixels" Value="True"/>
  293. <Setter Property="Padding" Value="0"/>
  294. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  295. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  296. <Setter Property="Background" Value="Transparent"/>
  297. <Setter Property="BorderBrush" Value="Transparent"/>
  298. <Setter Property="BorderThickness" Value="0"/>
  299. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
  300. <Setter Property="Template">
  301. <Setter.Value>
  302. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  303. <Border x:Name="Bd" Margin="16 6 16 0" CornerRadius="8" Width="89" Height="39" SnapsToDevicePixels="true" Background="Transparent">
  304. <ContentPresenter Margin="0 -4 0 0" HorizontalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
  305. </Border>
  306. <ControlTemplate.Triggers>
  307. <Trigger Property="IsSelected" Value="True">
  308. <Setter TargetName="Bd" Property="Background" Value="#1A4D75AC"/>
  309. </Trigger>
  310. <Trigger Property="IsMouseOver" Value="True">
  311. <Setter TargetName="Bd" Property="Background" Value="#1A4D75AC"/>
  312. </Trigger>
  313. </ControlTemplate.Triggers>
  314. </ControlTemplate>
  315. </Setter.Value>
  316. </Setter>
  317. <Style.Triggers>
  318. <Trigger Property="IsSelected" Value="True">
  319. <Setter Property="Foreground" Value="#4D75AC"/>
  320. </Trigger>
  321. <Trigger Property="IsMouseOver" Value="True">
  322. <Setter Property="Foreground" Value="#4D75AC"/>
  323. </Trigger>
  324. </Style.Triggers>
  325. </Style>
  326. <Style x:Key="ListBoxItemContainerStyleMark" TargetType="{x:Type ListBoxItem}">
  327. <Setter Property="FontWeight" Value="Medium"/>
  328. <Setter Property="FontSize" Value="14"/>
  329. <Setter Property="Foreground" Value="#4D4D4D"/>
  330. <Setter Property="SnapsToDevicePixels" Value="True"/>
  331. <Setter Property="Padding" Value="0"/>
  332. <Setter Property="Background" Value="Transparent"/>
  333. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  334. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  335. <Setter Property="BorderBrush" Value="Transparent"/>
  336. <Setter Property="BorderThickness" Value="0"/>
  337. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  338. <Setter Property="Template">
  339. <Setter.Value>
  340. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  341. <Canvas Width="268" Height="54" Background="{TemplateBinding Background}">
  342. <Border Width="134" Height="52.5">
  343. <TextBlock Text="{Binding name}" FontWeight="Medium" Foreground="{TemplateBinding Foreground}" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  344. </Border>
  345. <Border Canvas.Left="134" Width="134" Height="52.5" >
  346. <!--{Binding minTime,StringFormat={}{0}h}-->
  347. <TextBlock Text="{Binding minTimeString}" FontWeight="Medium" Foreground="{TemplateBinding Foreground}" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  348. </Border>
  349. <Rectangle Canvas.Left="18" Canvas.Top="52.5" Width="231" Height="1.5" Fill="#E5E5E5"/>
  350. </Canvas>
  351. </ControlTemplate>
  352. </Setter.Value>
  353. </Setter>
  354. <Style.Triggers>
  355. <Trigger Property="IsSelected" Value="True">
  356. <Setter Property="Foreground" Value="#4D75AC"/>
  357. <Setter Property="Background" Value="#E5E9EF"/>
  358. </Trigger>
  359. <Trigger Property="IsMouseOver" Value="True">
  360. <Setter Property="Foreground" Value="#4D75AC"/>
  361. </Trigger>
  362. </Style.Triggers>
  363. </Style>
  364. <ControlTemplate x:Key="ThumbTemplateNew" TargetType="Thumb">
  365. <Grid>
  366. <Border x:Name="Bg" CornerRadius="10" Margin="1" SnapsToDevicePixels="True" Background="#C6C6C6"/>
  367. </Grid>
  368. <ControlTemplate.Triggers>
  369. <Trigger Property="IsMouseOver" Value="True">
  370. <Setter Property="Background" Value="#C6C6C6" TargetName="Bg"></Setter>
  371. </Trigger>
  372. <Trigger Property="IsEnabled" Value="False">
  373. <Setter Property="Opacity" Value="0.5" TargetName="Bg"></Setter>
  374. </Trigger>
  375. </ControlTemplate.Triggers>
  376. </ControlTemplate>
  377. <ControlTemplate x:Key="VerticalScrollBarNew" TargetType="{x:Type ScrollBar}">
  378. <Grid x:Name="VerticalRoot" Height="{TemplateBinding Height}">
  379. <Grid.RowDefinitions>
  380. <RowDefinition Height="Auto" />
  381. <RowDefinition Height="*" />
  382. <RowDefinition Height="Auto" />
  383. </Grid.RowDefinitions>
  384. <!--外部背景,好像不用更好看-->
  385. <!--<Border x:Name="Bg" Grid.Row="0" Grid.RowSpan="3" CornerRadius="0" Opacity="0" Background="#858585"/>-->
  386. <!--内部背景-->
  387. <Border x:Name="BgInner" Grid.Row="1" Margin="0" CornerRadius="3" SnapsToDevicePixels ="True" Opacity="0.3" Background="Transparent"/>
  388. <!--上按钮-->
  389. <!--<Border Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="VerticalSmallDecrease">
  390. <RepeatButton local:ControlAttachProperty.FIcon="&#xe65d;" Style="{StaticResource ScrollBarButton}"
  391. IsTabStop="False" Interval="50" Margin="0" Command="ScrollBar.LineUpCommand"/>
  392. </Border>-->
  393. <!--中间滑动区域-->
  394. <Track x:Name="PART_Track" IsDirectionReversed="True" Grid.Row="1">
  395. <Track.Resources>
  396. <sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">
  397. 100
  398. </sys:Double>
  399. </Track.Resources>
  400. <!--上滑块-->
  401. <Track.DecreaseRepeatButton>
  402. <RepeatButton x:Name="HorizontalLargeDecrease" Command="ScrollBar.PageUpCommand"
  403. IsTabStop="False" Interval="50" Style="{DynamicResource ScrollBarTrackButton}" />
  404. </Track.DecreaseRepeatButton>
  405. <!--中间滑块-->
  406. <Track.Thumb>
  407. <Thumb Template="{StaticResource ThumbTemplateNew}" />
  408. </Track.Thumb>
  409. <!--下滑块-->
  410. <Track.IncreaseRepeatButton>
  411. <RepeatButton x:Name="HorizontalLargeIncrease" Command="ScrollBar.PageDownCommand" IsTabStop="False" Interval="50" Style="{DynamicResource ScrollBarTrackButton}" />
  412. </Track.IncreaseRepeatButton>
  413. </Track>
  414. <!--下按钮-->
  415. <!--<Border Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="VerticalSmallIncrease">
  416. <RepeatButton local:ControlAttachProperty.FIcon="&#xe64b;" Style="{StaticResource ScrollBarButton}"
  417. IsTabStop="False" Interval="50" Margin="0" Command="ScrollBar.LineDownCommand"/>
  418. </Border>-->
  419. </Grid>
  420. <ControlTemplate.Triggers>
  421. <Trigger Property="IsMouseOver" Value="true">
  422. <Setter TargetName="BgInner" Property="Opacity" Value="0.5"/>
  423. </Trigger>
  424. </ControlTemplate.Triggers>
  425. </ControlTemplate>
  426. <Style x:Key="DefaultScrollBar1" TargetType="{x:Type ScrollBar}">
  427. <Setter Property="SnapsToDevicePixels" Value="True" />
  428. <Setter Property="OverridesDefaultStyle" Value="true" />
  429. <Style.Triggers>
  430. <Trigger Property="Orientation" Value="Horizontal">
  431. <Setter Property="Template" Value="{StaticResource HorizontalScrollBar}" />
  432. <Setter Property="Height" Value="6" />
  433. </Trigger>
  434. <Trigger Property="Orientation" Value="Vertical">
  435. <Setter Property="Template" Value="{StaticResource VerticalScrollBarNew}" />
  436. <Setter Property="Width" Value="40" />
  437. </Trigger>
  438. </Style.Triggers>
  439. </Style>
  440. <Style x:Key="DefaultScrollViewer1" TargetType="{x:Type ScrollViewer }" >
  441. <Setter Property="Template">
  442. <Setter.Value>
  443. <ControlTemplate TargetType="{x:Type ScrollViewer}">
  444. <Grid x:Name="Grid" Background="{TemplateBinding Background}">
  445. <Grid.ColumnDefinitions>
  446. <ColumnDefinition Width="*" x:Name="leftColumn" />
  447. <ColumnDefinition Width="Auto" x:Name="rightColumn" />
  448. </Grid.ColumnDefinitions>
  449. <Grid.RowDefinitions>
  450. <RowDefinition Height="*" />
  451. <RowDefinition Height="Auto" />
  452. </Grid.RowDefinitions>
  453. <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}"
  454. CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}"
  455. Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}"
  456. Grid.Row="0" Grid.Column="0" />
  457. <!--垂直滚动条 -->
  458. <ScrollBar Style="{StaticResource DefaultScrollBar1}" x:Name="PART_VerticalScrollBar"
  459. AutomationProperties.AutomationId="VerticalScrollBar"
  460. ViewportSize="{TemplateBinding ViewportHeight}"
  461. Cursor="Arrow" Minimum="0" Maximum="{TemplateBinding ScrollableHeight}"
  462. Orientation="Vertical" Grid.Row="0" Grid.Column="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
  463. Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"/>
  464. </Grid>
  465. </ControlTemplate>
  466. </Setter.Value>
  467. </Setter>
  468. </Style>
  469. <Style x:Key="ListBoxItemContainerStyleAutoPic" TargetType="{x:Type ListBoxItem}">
  470. <Setter Property="FontWeight" Value="Medium"/>
  471. <Setter Property="FontSize" Value="16"/>
  472. <Setter Property="Foreground" Value="#4D4D4D"/>
  473. <Setter Property="SnapsToDevicePixels" Value="True"/>
  474. <Setter Property="Padding" Value="0"/>
  475. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  476. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  477. <Setter Property="Background" Value="Transparent"/>
  478. <Setter Property="BorderBrush" Value="Transparent"/>
  479. <Setter Property="BorderThickness" Value="0"/>
  480. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  481. <Setter Property="Template">
  482. <Setter.Value>
  483. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  484. <Canvas Margin="10 0 0 0" Width="59" Height="34" SnapsToDevicePixels="true" Background="Transparent">
  485. <Border x:Name="Bd" Width="59" Height="34" CornerRadius="6" Background="#F9F9F9" BorderThickness="1" BorderBrush="#C6C6C6">
  486. <ContentPresenter Margin="0 -1.5 0 0" HorizontalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
  487. </Border>
  488. </Canvas>
  489. <ControlTemplate.Triggers>
  490. <Trigger Property="IsSelected" Value="True">
  491. <Setter TargetName="Bd" Property="Background" Value="#4D75AC"/>
  492. <Setter TargetName="Bd" Property="BorderBrush" Value="#4D75AC"/>
  493. </Trigger>
  494. </ControlTemplate.Triggers>
  495. </ControlTemplate>
  496. </Setter.Value>
  497. </Setter>
  498. <Style.Triggers>
  499. <Trigger Property="IsSelected" Value="True">
  500. <Setter Property="Foreground" Value="White"/>
  501. </Trigger>
  502. <MultiTrigger>
  503. <MultiTrigger.Conditions>
  504. <Condition Property="IsMouseOver" Value="True"/>
  505. <Condition Property="IsSelected" Value="False"/>
  506. </MultiTrigger.Conditions>
  507. <Setter Property="Foreground" Value="#4D75AC"/>
  508. </MultiTrigger>
  509. </Style.Triggers>
  510. </Style>
  511. <Style x:Key="ListBoxStyleAutoPic" TargetType="{x:Type ListBox}">
  512. <Setter Property="Background" Value="{StaticResource ListBox.Static.Background}"/>
  513. <Setter Property="BorderBrush" Value="{StaticResource ListBox.Static.Border}"/>
  514. <Setter Property="BorderThickness" Value="0"/>
  515. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  516. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
  517. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
  518. <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
  519. <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
  520. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  521. <Setter Property="VerticalContentAlignment" Value="Center"/>
  522. <Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemContainerStyleAutoPic}"/>
  523. <Setter Property="Template">
  524. <Setter.Value>
  525. <ControlTemplate TargetType="{x:Type ListBox}">
  526. <Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="0" SnapsToDevicePixels="true">
  527. <ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}">
  528. <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0 0 0 0"/>
  529. </ScrollViewer>
  530. </Border>
  531. <ControlTemplate.Triggers>
  532. <Trigger Property="IsEnabled" Value="false">
  533. <Setter Property="Background" TargetName="Bd" Value="{StaticResource ListBox.Disabled.Background}"/>
  534. <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource ListBox.Disabled.Border}"/>
  535. </Trigger>
  536. <MultiTrigger>
  537. <MultiTrigger.Conditions>
  538. <Condition Property="IsGrouping" Value="true"/>
  539. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
  540. </MultiTrigger.Conditions>
  541. <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
  542. </MultiTrigger>
  543. </ControlTemplate.Triggers>
  544. </ControlTemplate>
  545. </Setter.Value>
  546. </Setter>
  547. </Style>
  548. <Style x:Key="ListBoxItemContainerStylePic" TargetType="{x:Type ListBoxItem}">
  549. <Setter Property="FontWeight" Value="Medium"/>
  550. <Setter Property="FontSize" Value="18"/>
  551. <Setter Property="Foreground" Value="#4D4D4D"/>
  552. <Setter Property="SnapsToDevicePixels" Value="True"/>
  553. <Setter Property="Padding" Value="0"/>
  554. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  555. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  556. <Setter Property="Background" Value="Transparent"/>
  557. <Setter Property="BorderBrush" Value="Transparent"/>
  558. <Setter Property="BorderThickness" Value="0"/>
  559. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  560. <Setter Property="Template">
  561. <Setter.Value>
  562. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  563. <Canvas Margin="-10 0 0 0" x:Name="Bd" Width="81" Height="62" SnapsToDevicePixels="true" >
  564. <Canvas.Background>
  565. <ImageBrush ImageSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/PicWellNoSelected.png"/>
  566. </Canvas.Background>
  567. <Border Width="81" Height="62">
  568. <ContentPresenter Margin="0 -3 0 0" HorizontalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
  569. </Border>
  570. <!--<ContentPresenter HorizontalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>-->
  571. </Canvas>
  572. <ControlTemplate.Triggers>
  573. <Trigger Property="IsSelected" Value="True">
  574. <Setter TargetName="Bd" Property="Background">
  575. <Setter.Value>
  576. <ImageBrush ImageSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/PicWellSelected.png"/>
  577. </Setter.Value>
  578. </Setter>
  579. </Trigger>
  580. <!--<Trigger Property="IsMouseOver" Value="True">
  581. <Setter TargetName="Bd" Property="Background">
  582. <Setter.Value>
  583. <ImageBrush ImageSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/PicWellSelected.png"/>
  584. </Setter.Value>
  585. </Setter>
  586. </Trigger>-->
  587. </ControlTemplate.Triggers>
  588. </ControlTemplate>
  589. </Setter.Value>
  590. </Setter>
  591. <Style.Triggers>
  592. <Trigger Property="IsSelected" Value="True">
  593. <Setter Property="Foreground" Value="White"/>
  594. </Trigger>
  595. <MultiTrigger>
  596. <MultiTrigger.Conditions>
  597. <Condition Property="IsMouseOver" Value="True"/>
  598. <Condition Property="IsSelected" Value="False"/>
  599. </MultiTrigger.Conditions>
  600. <Setter Property="Foreground" Value="#4D75AC"/>
  601. </MultiTrigger>
  602. <!--<Trigger Property="IsMouseOver" Value="True">
  603. <Setter Property="Foreground" Value="#4D75AC"/>
  604. </Trigger>-->
  605. </Style.Triggers>
  606. </Style>
  607. <Style x:Key="ListBoxStylePic" TargetType="{x:Type ListBox}">
  608. <Setter Property="Background" Value="{StaticResource ListBox.Static.Background}"/>
  609. <Setter Property="BorderBrush" Value="{StaticResource ListBox.Static.Border}"/>
  610. <Setter Property="BorderThickness" Value="0"/>
  611. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  612. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
  613. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
  614. <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
  615. <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
  616. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  617. <Setter Property="VerticalContentAlignment" Value="Center"/>
  618. <Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemContainerStylePic}"/>
  619. <Setter Property="Template">
  620. <Setter.Value>
  621. <ControlTemplate TargetType="{x:Type ListBox}">
  622. <Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="0" SnapsToDevicePixels="true">
  623. <ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}">
  624. <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="10 0 0 0"/>
  625. </ScrollViewer>
  626. </Border>
  627. <ControlTemplate.Triggers>
  628. <Trigger Property="IsEnabled" Value="false">
  629. <Setter Property="Background" TargetName="Bd" Value="{StaticResource ListBox.Disabled.Background}"/>
  630. <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource ListBox.Disabled.Border}"/>
  631. </Trigger>
  632. <MultiTrigger>
  633. <MultiTrigger.Conditions>
  634. <Condition Property="IsGrouping" Value="true"/>
  635. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
  636. </MultiTrigger.Conditions>
  637. <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
  638. </MultiTrigger>
  639. </ControlTemplate.Triggers>
  640. </ControlTemplate>
  641. </Setter.Value>
  642. </Setter>
  643. </Style>
  644. <Style x:Key="ListBoxItemContainerStylePage" TargetType="{x:Type ListBoxItem}">
  645. <Setter Property="FontWeight" Value="Medium"/>
  646. <Setter Property="FontSize" Value="18"/>
  647. <Setter Property="Foreground" Value="#7B98C0"/>
  648. <Setter Property="SnapsToDevicePixels" Value="True"/>
  649. <Setter Property="Padding" Value="0"/>
  650. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  651. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  652. <Setter Property="Background" Value="Transparent"/>
  653. <Setter Property="BorderBrush" Value="Transparent"/>
  654. <Setter Property="BorderThickness" Value="0"/>
  655. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  656. <Setter Property="Template">
  657. <Setter.Value>
  658. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  659. <Border x:Name="bd" Margin="5 0 0 0" Width="41" Height="32" CornerRadius="10" Background="Transparent">
  660. <ContentPresenter x:Name="content_Text" Margin="0 -3 0 0" HorizontalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
  661. </Border>
  662. <ControlTemplate.Triggers>
  663. <Trigger Property="IsSelected" Value="True">
  664. <Setter TargetName="bd" Property="Background" Value="#FDFDFD"/>
  665. <Setter TargetName="content_Text" Property="TextBlock.Foreground" Value="#4D75AC"/>
  666. </Trigger>
  667. <Trigger Property="IsMouseOver" Value="True">
  668. <Setter TargetName="bd" Property="Background" Value="#FDFDFD"/>
  669. <Setter TargetName="content_Text" Property="TextBlock.Foreground" Value="#4D75AC"/>
  670. </Trigger>
  671. </ControlTemplate.Triggers>
  672. </ControlTemplate>
  673. </Setter.Value>
  674. </Setter>
  675. <Style.Triggers>
  676. <Trigger Property="IsSelected" Value="True">
  677. <Setter Property="Foreground" Value="#4D75AC"/>
  678. </Trigger>
  679. <!--<MultiTrigger>
  680. <MultiTrigger.Conditions>
  681. <Condition Property="IsMouseOver" Value="True"/>
  682. <Condition Property="IsSelected" Value="False"/>
  683. </MultiTrigger.Conditions>
  684. <Setter Property="Foreground" Value="#4D75AC"/>
  685. </MultiTrigger>-->
  686. <Trigger Property="IsMouseOver" Value="True">
  687. <Setter Property="Foreground" Value="#4D75AC"/>
  688. </Trigger>
  689. </Style.Triggers>
  690. </Style>
  691. <Style x:Key="ListBoxStylePage" TargetType="{x:Type ListBox}">
  692. <Setter Property="Background" Value="{StaticResource ListBox.Static.Background}"/>
  693. <Setter Property="BorderBrush" Value="{StaticResource ListBox.Static.Border}"/>
  694. <Setter Property="BorderThickness" Value="0"/>
  695. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  696. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
  697. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
  698. <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
  699. <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
  700. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  701. <Setter Property="VerticalContentAlignment" Value="Center"/>
  702. <Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemContainerStylePage}"/>
  703. <Setter Property="Template">
  704. <Setter.Value>
  705. <ControlTemplate TargetType="{x:Type ListBox}">
  706. <Border CornerRadius="10" x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="0" SnapsToDevicePixels="true">
  707. <ScrollViewer x:Name="scroll" Focusable="false" Padding="{TemplateBinding Padding}"
  708. PanningMode="None" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled">
  709. <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0 0 5 0"/>
  710. </ScrollViewer>
  711. </Border>
  712. <ControlTemplate.Triggers>
  713. <Trigger Property="IsEnabled" Value="false">
  714. <Setter Property="Background" TargetName="Bd" Value="{StaticResource ListBox.Disabled.Background}"/>
  715. <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource ListBox.Disabled.Border}"/>
  716. </Trigger>
  717. <MultiTrigger>
  718. <MultiTrigger.Conditions>
  719. <Condition Property="IsGrouping" Value="true"/>
  720. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
  721. </MultiTrigger.Conditions>
  722. <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
  723. </MultiTrigger>
  724. </ControlTemplate.Triggers>
  725. </ControlTemplate>
  726. </Setter.Value>
  727. </Setter>
  728. </Style>
  729. <Style x:Key="ListBoxStyleMarkSetting" TargetType="{x:Type ListBox}">
  730. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  731. <Setter Property="Template">
  732. <Setter.Value>
  733. <ControlTemplate TargetType="{x:Type ListBox}">
  734. <Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="0" SnapsToDevicePixels="true">
  735. <ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}">
  736. <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  737. </ScrollViewer>
  738. </Border>
  739. </ControlTemplate>
  740. </Setter.Value>
  741. </Setter>
  742. </Style>
  743. <Style x:Key="ListBoxItemContainerStyleBigImage" TargetType="{x:Type ListBoxItem}">
  744. <Setter Property="FontWeight" Value="Medium"/>
  745. <Setter Property="FontSize" Value="24"/>
  746. <Setter Property="Foreground" Value="#4D4D4D"/>
  747. <Setter Property="SnapsToDevicePixels" Value="True"/>
  748. <Setter Property="Padding" Value="0"/>
  749. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  750. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  751. <Setter Property="Background" Value="Transparent"/>
  752. <Setter Property="BorderBrush" Value="Transparent"/>
  753. <Setter Property="BorderThickness" Value="0"/>
  754. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  755. <Setter Property="Template">
  756. <Setter.Value>
  757. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  758. <Canvas Width="144" Height="144" Margin="10 0 10 0" SnapsToDevicePixels="True" Focusable="False" >
  759. <Image Canvas.Left="2" Canvas.Top="2" Width="140" Height="140" SnapsToDevicePixels="True" Focusable="False"
  760. Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/PicLoadIcon.png">
  761. <Image.Clip>
  762. <RectangleGeometry Rect="0,0,140,140" RadiusX="14" RadiusY="14"/>
  763. </Image.Clip>
  764. </Image>
  765. <Image Canvas.Left="2" Canvas.Top="2" Width="140" Height="140" SnapsToDevicePixels="True" Focusable="False"
  766. Source="{Binding AllUrl}" >
  767. <Image.Clip>
  768. <RectangleGeometry Rect="0,0,140,140" RadiusX="14" RadiusY="14"/>
  769. </Image.Clip>
  770. </Image>
  771. <Rectangle x:Name="_Rectangle" Visibility="Hidden" Width="144" Height="144" StrokeThickness="4" Stroke="#6DA5FF" RadiusX="14" RadiusY="14" />
  772. </Canvas>
  773. <ControlTemplate.Triggers>
  774. <Trigger Property="IsSelected" Value="True">
  775. <Setter TargetName="_Rectangle" Property="Visibility" Value="Visible"/>
  776. </Trigger>
  777. <Trigger Property="IsMouseOver" Value="True">
  778. <Setter TargetName="_Rectangle" Property="Visibility" Value="Visible"/>
  779. </Trigger>
  780. </ControlTemplate.Triggers>
  781. </ControlTemplate>
  782. </Setter.Value>
  783. </Setter>
  784. </Style>
  785. <Style x:Key="ListBoxStyleBigImage" TargetType="{x:Type ListBox}">
  786. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  787. <Setter Property="ItemsPanel" Value="{StaticResource ItemsPanelHorCenter1}"/>
  788. <Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemContainerStyleBigImage}"/>
  789. <Setter Property="Template">
  790. <Setter.Value>
  791. <ControlTemplate TargetType="{x:Type ListBox}">
  792. <Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="0" SnapsToDevicePixels="true">
  793. <ScrollViewer x:Name="_ScrollViewer" Focusable="false" Padding="{TemplateBinding Padding}" PanningMode="Both" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Disabled">
  794. <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  795. </ScrollViewer>
  796. </Border>
  797. </ControlTemplate>
  798. </Setter.Value>
  799. </Setter>
  800. </Style>
  801. <Style x:Key="DateListBoxStyle" TargetType="{x:Type ListBox}">
  802. <Setter Property="Background" Value="{StaticResource ListBox.Static.Background}"/>
  803. <Setter Property="BorderBrush" Value="{StaticResource ListBox.Static.Border}"/>
  804. <Setter Property="BorderThickness" Value="1"/>
  805. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  806. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
  807. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
  808. <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
  809. <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
  810. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  811. <Setter Property="VerticalContentAlignment" Value="Center"/>
  812. <Setter Property="Template">
  813. <Setter.Value>
  814. <ControlTemplate TargetType="{x:Type ListBox}">
  815. <Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="1" SnapsToDevicePixels="true">
  816. <ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}">
  817. <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  818. </ScrollViewer>
  819. </Border>
  820. </ControlTemplate>
  821. </Setter.Value>
  822. </Setter>
  823. </Style>
  824. <Style x:Key="ListBoxStyleAlarmSetting" TargetType="{x:Type ListBox}">
  825. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  826. <Setter Property="Template">
  827. <Setter.Value>
  828. <ControlTemplate TargetType="{x:Type ListBox}">
  829. <Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="0" SnapsToDevicePixels="true">
  830. <ScrollViewer x:Name="_ScrollViewer" Focusable="false" Padding="{TemplateBinding Padding}" PanningMode="Both" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
  831. <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Left"/>
  832. </ScrollViewer>
  833. </Border>
  834. </ControlTemplate>
  835. </Setter.Value>
  836. </Setter>
  837. </Style>
  838. <Style x:Key="ListBoxStyleUserBus" TargetType="{x:Type ListBox}">
  839. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  840. <Setter Property="Template">
  841. <Setter.Value>
  842. <ControlTemplate TargetType="{x:Type ListBox}">
  843. <Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="0" SnapsToDevicePixels="true">
  844. <ScrollViewer x:Name="_ScrollViewer" Focusable="false" Padding="{TemplateBinding Padding}" PanningMode="Both" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
  845. <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  846. </ScrollViewer>
  847. </Border>
  848. </ControlTemplate>
  849. </Setter.Value>
  850. </Setter>
  851. </Style>
  852. <Style x:Key="CheckBoxStyle1" TargetType="{x:Type CheckBox}">
  853. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  854. <Setter Property="Background" Value="Transparent"/>
  855. <Setter Property="BorderBrush" Value="{StaticResource OptionMark.Static.Border}"/>
  856. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  857. <Setter Property="BorderThickness" Value="1"/>
  858. <Setter Property="Template">
  859. <Setter.Value>
  860. <ControlTemplate TargetType="{x:Type CheckBox}">
  861. <Canvas Focusable="False" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
  862. <Rectangle x:Name="rec" IsHitTestVisible="False" Focusable="False" Canvas.Top="15" StrokeThickness="1" Stroke="#9B9B9B" Width="26" Height="26" RadiusX="4" RadiusY="4" Fill="Transparent"/>
  863. <Image x:Name="image" IsHitTestVisible="False" Visibility="Hidden" Focusable="False" Canvas.Top="15" Width="26" Height="26" Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/MarkDefeatIcon.png"/>
  864. </Canvas>
  865. <ControlTemplate.Triggers>
  866. <Trigger Property="IsChecked" Value="true">
  867. <Setter Property="Visibility" TargetName="rec" Value="Hidden"/>
  868. <Setter Property="Visibility" TargetName="image" Value="Visible"/>
  869. </Trigger>
  870. </ControlTemplate.Triggers>
  871. </ControlTemplate>
  872. </Setter.Value>
  873. </Setter>
  874. </Style>
  875. <Style x:Key="CheckBoxStyle2" TargetType="{x:Type CheckBox}">
  876. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  877. <Setter Property="Background" Value="Transparent"/>
  878. <Setter Property="BorderBrush" Value="{StaticResource OptionMark.Static.Border}"/>
  879. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  880. <Setter Property="BorderThickness" Value="1"/>
  881. <Setter Property="Template">
  882. <Setter.Value>
  883. <ControlTemplate TargetType="{x:Type CheckBox}">
  884. <!--<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
  885. <Grid.ColumnDefinitions>
  886. <ColumnDefinition Width="Auto"/>
  887. <ColumnDefinition Width="*"/>
  888. </Grid.ColumnDefinitions>
  889. <Canvas Width="36" Grid.Column="0" Focusable="False" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" Height="{TemplateBinding Height}" >
  890. <Rectangle x:Name="rec" IsHitTestVisible="False" Focusable="False" Canvas.Top="15" StrokeThickness="1" Stroke="#9B9B9B" Width="26" Height="26" RadiusX="4" RadiusY="4" Fill="Transparent"/>
  891. <Image x:Name="image" IsHitTestVisible="False" Visibility="Hidden" Focusable="False" Canvas.Top="15" Width="26" Height="26" Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/MarkDefeatIcon.png"/>
  892. </Canvas>
  893. <ContentPresenter Width="100" x:Name="contentPresenter" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  894. </Grid>-->
  895. <!---->
  896. <Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
  897. <Grid.ColumnDefinitions>
  898. <ColumnDefinition Width="Auto"/>
  899. <ColumnDefinition Width="*"/>
  900. </Grid.ColumnDefinitions>
  901. <Canvas Width="31" Grid.Column="0" Focusable="False" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" Height="{TemplateBinding Height}" >
  902. <Rectangle x:Name="rec" IsHitTestVisible="False" Focusable="False" Canvas.Top="15" StrokeThickness="1" Stroke="#9B9B9B" Width="26" Height="26" RadiusX="4" RadiusY="4" Fill="Transparent"/>
  903. <Image x:Name="image" IsHitTestVisible="False" Visibility="Hidden" Focusable="False" Canvas.Top="15" Width="26" Height="26" Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/MarkDefeatIcon.png"/>
  904. </Canvas>
  905. <ContentPresenter x:Name="contentPresenter" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  906. </Grid>
  907. <ControlTemplate.Triggers>
  908. <Trigger Property="IsChecked" Value="true">
  909. <Setter Property="Visibility" TargetName="rec" Value="Hidden"/>
  910. <Setter Property="Visibility" TargetName="image" Value="Visible"/>
  911. </Trigger>
  912. </ControlTemplate.Triggers>
  913. </ControlTemplate>
  914. </Setter.Value>
  915. </Setter>
  916. </Style>
  917. <Style x:Key="ListBoxItemContainerTime" TargetType="{x:Type ListBoxItem}">
  918. <Setter Property="FontWeight" Value="Medium"/>
  919. <Setter Property="FontSize" Value="14"/>
  920. <Setter Property="Foreground" Value="#4D4D4D"/>
  921. <Setter Property="SnapsToDevicePixels" Value="True"/>
  922. <Setter Property="Padding" Value="0"/>
  923. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  924. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  925. <Setter Property="Background" Value="Transparent"/>
  926. <Setter Property="BorderBrush" Value="Transparent"/>
  927. <Setter Property="BorderThickness" Value="1"/>
  928. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  929. <Setter Property="Template">
  930. <Setter.Value>
  931. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  932. <Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
  933. <ContentPresenter x:Name="hello" ContentStringFormat="{}{0:D2}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  934. </Border>
  935. </ControlTemplate>
  936. </Setter.Value>
  937. </Setter>
  938. <Style.Triggers>
  939. <Trigger Property="IsSelected" Value="True">
  940. <Setter Property="Foreground" Value="#4D75AC"/>
  941. </Trigger>
  942. <Trigger Property="IsMouseOver" Value="True">
  943. <Setter Property="Foreground" Value="#4D75AC"/>
  944. </Trigger>
  945. </Style.Triggers>
  946. </Style>
  947. </ResourceDictionary>
  948. </Application.Resources>
  949. </Application>