App.xaml 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  1. <Application x:Class="ivf_tl_Operate.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_Operate"
  5. xmlns:converter="clr-namespace:ivf_tl_Operate.Converts"
  6. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  7. StartupUri="MainWindow.xaml">
  8. <Application.Resources>
  9. <ResourceDictionary>
  10. <ResourceDictionary.MergedDictionaries>
  11. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/Colors.xaml"/>
  12. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/Effects.xaml"/>
  13. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/Brushes.xaml"/>
  14. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/Geometrys.xaml"/>
  15. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/ConstProperty.xaml"/>
  16. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/BaseStyleResource.xaml"/>
  17. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/Others/OtherResource.xaml"/>
  18. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/Blocks/BlocksResource.xaml"/>
  19. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/Buttons/ButtonResource.xaml"/>
  20. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/ScrollViewers/ScrollViewerResource.xaml"/>
  21. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/ListBoxs/ListBoxResource.xaml"/>
  22. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/ComboBoxs/ComboBoxResource.xaml"/>
  23. <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/DatePickers/DatePickerResource.xaml"/>
  24. <ResourceDictionary Source="pack://application:,,,/ivf_tl_Operate;component/Resources/Language/Chinese.xaml"/>
  25. <!--<ResourceDictionary Source="pack://application:,,,/ivf_tl_Operate;component/Resources/Language/English.xaml"/>-->
  26. <!-- M4-01-4:自适应竖屏改造规约(三段式根模板/星号比例/触控基准 TouchMinSize),供主页+13子页复用。 -->
  27. <ResourceDictionary Source="pack://application:,,,/ivf_tl_Operate;component/Resources/AdaptiveStyles.xaml"/>
  28. </ResourceDictionary.MergedDictionaries>
  29. <converter:HouseDoorStateConvert x:Key="HouseDoorStateConvert" />
  30. <converter:IntToBoolConverter x:Key="IntToBoolConverter" />
  31. <converter:HouseInfoBackgroundConvert1 x:Key="HouseInfoBackgroundConvert1" />
  32. <converter:HouseInfoBackgroundConvert x:Key="HouseInfoBackgroundConvert" />
  33. <converter:ConvertButtonIsEnable x:Key="ConvertButtonIsEnable" />
  34. <converter:PicImageSourceConverter x:Key="PicImageSourceConverter" />
  35. <converter:Int0ToCollapsedConvert x:Key="Int0ToCollapsedConvert" />
  36. <LinearGradientBrush x:Key="BannerTopFill" StartPoint="0.5,0" EndPoint="0.5,1">
  37. <GradientStop Color="#F8F9FA" Offset="0.95" />
  38. <GradientStop Color="#D5DBDC" Offset="1" />
  39. </LinearGradientBrush>
  40. <LinearGradientBrush x:Key="BorderStageFill" StartPoint="0.5,0" EndPoint="0.5,1">
  41. <GradientStop Color="#F5F6F8" Offset="0.995" />
  42. <GradientStop Color="#D5DBDC" Offset="1" />
  43. </LinearGradientBrush>
  44. <LinearGradientBrush x:Key="BorderMenuFill" StartPoint="0.5,0" EndPoint="0.5,1">
  45. <GradientStop Color="#F5F6F8" Offset="1" />
  46. <GradientStop Color="#D0D5D8" Offset="1" />
  47. </LinearGradientBrush>
  48. <LinearGradientBrush x:Key="BuleLinear" StartPoint="0.5,0" EndPoint="0.5,1">
  49. <GradientStop Color="#3A5F91" Offset="0" />
  50. <GradientStop Color="#6B93C9" Offset="1" />
  51. </LinearGradientBrush>
  52. <SolidColorBrush x:Key="VoiceOpenBrush" Color="#7278FB" />
  53. <!--VoiceOpen-->
  54. <PathFigureCollection x:Key="VoiceOpenPath">
  55. M901.546667 746.012444l-48.440889-25.6A409.799111 409.799111 0 0 0 910.222222 511.544889c0-79.445333-22.698667-153.315556-61.354666-215.950222l47.758222-26.595556a452.152889 452.152889 0 0 1 4.920889 476.984889z m-199.082667-105.244444A241.777778 241.777778 0 0 0 739.555556 511.544889a241.976889 241.976889 0 0 0-39.509334-133.12l47.445334-26.396445A282.936889 282.936889 0 0 1 796.444444 511.573333a282.794667 282.794667 0 0 1-45.880888 154.595556l-48.099556-25.429333z m-160.568889 253.582222L213.333333 653.852444H113.777778c-31.402667 0-56.888889-24.746667-56.888889-56.376888v-171.804445c0-31.630222 25.486222-56.405333 56.888889-56.405333h99.555555l328.561778-240.469334C572.16 103.310222 597.333333 106.467556 597.333333 167.936v687.274667c0 61.468444-25.173333 64.625778-55.438222 39.139555z
  56. </PathFigureCollection>
  57. <DrawingImage x:Key="VoiceOpenImage">
  58. <DrawingImage.Drawing>
  59. <GeometryDrawing Brush="{ StaticResource VoiceOpenBrush}">
  60. <GeometryDrawing.Geometry>
  61. <PathGeometry FillRule="EvenOdd" Figures="{StaticResource VoiceOpenPath}" />
  62. </GeometryDrawing.Geometry>
  63. </GeometryDrawing>
  64. </DrawingImage.Drawing>
  65. </DrawingImage>
  66. <!--Brush-->
  67. <SolidColorBrush x:Key="VoiceCloseBrush" Color="#7278FB" />
  68. <!--VoiceClose-->
  69. <PathFigureCollection x:Key="VoiceClosePath">
  70. M865.109333 511.573333l90.510223 90.510223a14.193778 14.193778 0 0 1 0 20.110222l-20.110223 20.110222a14.222222 14.222222 0 0 1-20.110222 0L824.888889 551.822222l-90.510222 90.510222a14.222222 14.222222 0 0 1-20.110223 0l-20.110222-20.110222a14.222222 14.222222 0 0 1 0-20.110222l90.510222-90.510222-90.510222-90.510222a14.222222 14.222222 0 0 1 0-20.110223l20.110222-20.110222a14.193778 14.193778 0 0 1 20.110223 0L824.888889 471.352889l90.510222-90.510222a14.193778 14.193778 0 0 1 20.110222 0l20.110223 20.110222a14.193778 14.193778 0 0 1 0 20.110222l-90.510223 90.510222zM541.895111 894.350222L213.333333 653.852444H113.777778c-31.431111 0-56.888889-24.746667-56.888889-56.376888v-171.804445a56.32 56.32 0 0 1 56.888889-56.405333h99.555555l328.561778-240.469334C572.16 103.310222 597.333333 106.467556 597.333333 167.936v687.274667c0 61.468444-25.173333 64.625778-55.438222 39.139555z
  71. </PathFigureCollection>
  72. <DrawingImage x:Key="VoiceCloseImage">
  73. <DrawingImage.Drawing>
  74. <GeometryDrawing Brush="{ StaticResource VoiceCloseBrush}">
  75. <GeometryDrawing.Geometry>
  76. <PathGeometry FillRule="EvenOdd" Figures="{StaticResource VoiceClosePath}" />
  77. </GeometryDrawing.Geometry>
  78. </GeometryDrawing>
  79. </DrawingImage.Drawing>
  80. </DrawingImage>
  81. <!--#region 滚动条 -->
  82. <Style x:Key="ScrollBarTrackButtonNew" TargetType="{x:Type RepeatButton}">
  83. <Setter Property="Background" Value="Transparent"></Setter>
  84. <Setter Property="Template">
  85. <Setter.Value>
  86. <ControlTemplate TargetType="{x:Type RepeatButton}">
  87. <Border Background="Transparent"/>
  88. </ControlTemplate>
  89. </Setter.Value>
  90. </Setter>
  91. </Style>
  92. <ControlTemplate x:Key="ThumbTemplateNew" TargetType="Thumb">
  93. <Grid>
  94. <Border x:Name="Bg" CornerRadius="10" Margin="1" SnapsToDevicePixels="True" Background="#C6C6C6"/>
  95. </Grid>
  96. <ControlTemplate.Triggers>
  97. <Trigger Property="IsMouseOver" Value="True">
  98. <Setter Property="Background" Value="#C6C6C6" TargetName="Bg"></Setter>
  99. </Trigger>
  100. <Trigger Property="IsEnabled" Value="False">
  101. <Setter Property="Opacity" Value="0.5" TargetName="Bg"></Setter>
  102. </Trigger>
  103. </ControlTemplate.Triggers>
  104. </ControlTemplate>
  105. <ControlTemplate x:Key="VerticalScrollBarNew" TargetType="{x:Type ScrollBar}">
  106. <Grid x:Name="VerticalRoot" Height="{TemplateBinding Height}">
  107. <Grid.RowDefinitions>
  108. <RowDefinition Height="Auto" />
  109. <RowDefinition Height="*" />
  110. <RowDefinition Height="Auto" />
  111. </Grid.RowDefinitions>
  112. <!--外部背景,好像不用更好看-->
  113. <!--<Border x:Name="Bg" Grid.Row="0" Grid.RowSpan="3" CornerRadius="0" Opacity="0" Background="#858585"/>-->
  114. <!--内部背景-->
  115. <Border x:Name="BgInner" Grid.Row="1" Margin="0" CornerRadius="3" SnapsToDevicePixels ="True" Opacity="0.3" Background="Transparent"/>
  116. <!--上按钮-->
  117. <!--<Border Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="VerticalSmallDecrease">
  118. <RepeatButton local:ControlAttachProperty.FIcon="&#xe65d;" Style="{StaticResource ScrollBarButton}"
  119. IsTabStop="False" Interval="50" Margin="0" Command="ScrollBar.LineUpCommand"/>
  120. </Border>-->
  121. <!--中间滑动区域-->
  122. <Track x:Name="PART_Track" IsDirectionReversed="True" Grid.Row="1">
  123. <Track.Resources>
  124. <sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">
  125. 100
  126. </sys:Double>
  127. </Track.Resources>
  128. <!--上滑块-->
  129. <Track.DecreaseRepeatButton>
  130. <RepeatButton x:Name="HorizontalLargeDecrease" Command="ScrollBar.PageUpCommand"
  131. IsTabStop="False" Interval="50" Style="{DynamicResource ScrollBarTrackButtonNew}" />
  132. </Track.DecreaseRepeatButton>
  133. <!--中间滑块-->
  134. <Track.Thumb>
  135. <Thumb Template="{StaticResource ThumbTemplateNew}" />
  136. </Track.Thumb>
  137. <!--下滑块-->
  138. <Track.IncreaseRepeatButton>
  139. <RepeatButton x:Name="HorizontalLargeIncrease" Command="ScrollBar.PageDownCommand" IsTabStop="False" Interval="50" Style="{DynamicResource ScrollBarTrackButton}" />
  140. </Track.IncreaseRepeatButton>
  141. </Track>
  142. <!--下按钮-->
  143. <!--<Border Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="VerticalSmallIncrease">
  144. <RepeatButton local:ControlAttachProperty.FIcon="&#xe64b;" Style="{StaticResource ScrollBarButton}"
  145. IsTabStop="False" Interval="50" Margin="0" Command="ScrollBar.LineDownCommand"/>
  146. </Border>-->
  147. </Grid>
  148. <ControlTemplate.Triggers>
  149. <Trigger Property="IsMouseOver" Value="true">
  150. <Setter TargetName="BgInner" Property="Opacity" Value="0.5"/>
  151. </Trigger>
  152. </ControlTemplate.Triggers>
  153. </ControlTemplate>
  154. <ControlTemplate x:Key="HorizontalScrollBarNew" TargetType="{x:Type ScrollBar}">
  155. <Grid x:Name="HorizontalRoot" Height="{TemplateBinding Height}">
  156. <Grid.ColumnDefinitions>
  157. <ColumnDefinition Width="Auto" />
  158. <ColumnDefinition Width="*" />
  159. <ColumnDefinition Width="Auto" />
  160. </Grid.ColumnDefinitions>
  161. <!--外部背景,好像不用更好看-->
  162. <!--<Border x:Name="Bg" Grid.Column="0" Grid.ColumnSpan="3" CornerRadius="0" Opacity="0" Background="#858585"/>-->
  163. <!--<Border x:Name="Bg" Grid.Column="0" Grid.ColumnSpan="3" CornerRadius="0" Opacity="1" Background="Red"/>-->
  164. <!--内部背景-->
  165. <!--<Border x:Name="BgInner" Grid.Column="1" Margin="0" SnapsToDevicePixels="True" Opacity="0" CornerRadius="6" Background="Red"/>-->
  166. <!--左按钮-->
  167. <!--<Border Visibility="Collapsed" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
  168. <RepeatButton Style="{StaticResource ScrollBarButton}" x:Name="HorizontalSmallDecrease"
  169. IsTabStop="False" Interval="50" Margin="0,1,0,0" Command="ScrollBar.LineLeftCommand"/>
  170. </Border>-->
  171. <!--中间滑动区域-->
  172. <Track x:Name="PART_Track" IsDirectionReversed="False" Grid.Column="1">
  173. <!--左滑块-->
  174. <Track.DecreaseRepeatButton>
  175. <RepeatButton x:Name="HorizontalLargeDecrease" Command="ScrollBar.PageLeftCommand"
  176. IsTabStop="False" Interval="50" Style="{DynamicResource ScrollBarTrackButtonNew}" />
  177. </Track.DecreaseRepeatButton>
  178. <!--中间滑块 Margin="1" VerticalAlignment="Center" VerticalContentAlignment="Center" -->
  179. <Track.Thumb>
  180. <Thumb Template="{StaticResource ThumbTemplateNew}" />
  181. </Track.Thumb>
  182. <!--右滑块-->
  183. <Track.IncreaseRepeatButton>
  184. <RepeatButton x:Name="HorizontalLargeIncrease" Command="ScrollBar.PageRightCommand"
  185. IsTabStop="False" Interval="50" Style="{DynamicResource ScrollBarTrackButtonNew}" />
  186. </Track.IncreaseRepeatButton>
  187. </Track>
  188. <!--右按钮-->
  189. <!--<Border Grid.Column="2" Visibility="Collapsed" VerticalAlignment="Center" HorizontalAlignment="Center">
  190. <RepeatButton Style="{StaticResource ScrollBarButton}"
  191. IsTabStop="False" Interval="50" Margin="0,1,0,0" Command="ScrollBar.LineRightCommand"/>
  192. </Border>-->
  193. </Grid>
  194. <!--<ControlTemplate.Triggers>
  195. <Trigger Property="IsMouseOver" Value="true">
  196. <Setter TargetName="BgInner" Property="Opacity" Value="0.5"/>
  197. </Trigger>
  198. </ControlTemplate.Triggers>-->
  199. </ControlTemplate>
  200. <Style x:Key="DefaultScrollBar1" TargetType="{x:Type ScrollBar}">
  201. <Setter Property="SnapsToDevicePixels" Value="True" />
  202. <Setter Property="OverridesDefaultStyle" Value="true" />
  203. <Style.Triggers>
  204. <Trigger Property="Orientation" Value="Horizontal">
  205. <Setter Property="Template" Value="{StaticResource HorizontalScrollBarNew}" />
  206. <Setter Property="Height" Value="6" />
  207. </Trigger>
  208. <Trigger Property="Orientation" Value="Vertical">
  209. <Setter Property="Template" Value="{StaticResource VerticalScrollBarNew}" />
  210. <Setter Property="Width" Value="40" />
  211. </Trigger>
  212. </Style.Triggers>
  213. </Style>
  214. <Style x:Key="DefaultScrollViewer1" TargetType="{x:Type ScrollViewer }" >
  215. <Setter Property="Template">
  216. <Setter.Value>
  217. <ControlTemplate TargetType="{x:Type ScrollViewer}">
  218. <Grid x:Name="Grid" Background="{TemplateBinding Background}">
  219. <Grid.ColumnDefinitions>
  220. <ColumnDefinition Width="*" x:Name="leftColumn" />
  221. <ColumnDefinition Width="Auto" x:Name="rightColumn" />
  222. </Grid.ColumnDefinitions>
  223. <Grid.RowDefinitions>
  224. <RowDefinition Height="*" />
  225. <RowDefinition Height="Auto" />
  226. </Grid.RowDefinitions>
  227. <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}"
  228. CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}"
  229. Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}"
  230. Grid.Row="0" Grid.Column="0" />
  231. <!--垂直滚动条 -->
  232. <ScrollBar Style="{StaticResource DefaultScrollBar1}" x:Name="PART_VerticalScrollBar"
  233. AutomationProperties.AutomationId="VerticalScrollBar"
  234. ViewportSize="{TemplateBinding ViewportHeight}"
  235. Cursor="Arrow" Minimum="0" Maximum="{TemplateBinding ScrollableHeight}"
  236. Orientation="Vertical" Grid.Row="0" Grid.Column="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
  237. Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"/>
  238. </Grid>
  239. </ControlTemplate>
  240. </Setter.Value>
  241. </Setter>
  242. </Style>
  243. <!--#endregion-->
  244. <Style x:Key="SettingWindowBorderStyle" TargetType="{x:Type Border}">
  245. <Style.Setters>
  246. <Setter Property="BorderThickness" Value="0 1 0 1" />
  247. <Setter Property="BorderBrush" Value="#D0CFD4" />
  248. <Setter Property="Height" Value="150" />
  249. </Style.Setters>
  250. <Style.Triggers>
  251. <Trigger Property="IsMouseOver" Value="True">
  252. <Setter Property="Background" Value="LightGray" />
  253. </Trigger>
  254. <Trigger Property="IsMouseOver" Value="False">
  255. <Setter Property="Background" Value="White" />
  256. </Trigger>
  257. <!--<EventTrigger RoutedEvent="Border.MouseDown">
  258. <BeginStoryboard>
  259. <Storyboard>
  260. <ColorAnimation From="LightGray" To="White" Duration="00:00:01" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" />
  261. </Storyboard>
  262. </BeginStoryboard>
  263. </EventTrigger>-->
  264. </Style.Triggers>
  265. </Style>
  266. <Style x:Key="FocusVisual">
  267. <Setter Property="Control.Template">
  268. <Setter.Value>
  269. <ControlTemplate>
  270. <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
  271. </ControlTemplate>
  272. </Setter.Value>
  273. </Setter>
  274. </Style>
  275. <LinearGradientBrush x:Key="ComboBox.Static.Background" EndPoint="0,1" StartPoint="0,0">
  276. <GradientStop Color="#FFF0F0F0" Offset="0.0"/>
  277. <GradientStop Color="#FFE5E5E5" Offset="1.0"/>
  278. </LinearGradientBrush>
  279. <VisualBrush x:Key="HelpBrush" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Left">
  280. <VisualBrush.Visual>
  281. <!--<TextBlock FontStyle="Italic" FontSize="30" Text="请输入密码" />-->
  282. <TextBlock FontStyle="Italic" FontSize="30" Text="{DynamicResource C0043}" />
  283. </VisualBrush.Visual>
  284. </VisualBrush>
  285. <VisualBrush x:Key="HelpBrush1" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Center">
  286. <VisualBrush.Visual>
  287. <TextBlock FontSize="24" Text="{DynamicResource C0290}" />
  288. </VisualBrush.Visual>
  289. </VisualBrush>
  290. <VisualBrush x:Key="HelpBrush2" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Left">
  291. <VisualBrush.Visual>
  292. <TextBlock FontStyle="Italic" FontSize="24" Text="{DynamicResource C0108}" />
  293. </VisualBrush.Visual>
  294. </VisualBrush>
  295. <VisualBrush x:Key="HelpBrush3" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Left">
  296. <VisualBrush.Visual>
  297. <TextBlock FontStyle="Italic" FontSize="24" Text="{DynamicResource C0109}" />
  298. </VisualBrush.Visual>
  299. </VisualBrush>
  300. <SolidColorBrush x:Key="TextBox.Static.Background" Color="#FFFFFFFF"/>
  301. <!--ToggleButton样式,可编辑与不可编辑通用-->
  302. <Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
  303. <Setter Property="OverridesDefaultStyle" Value="true"/>
  304. <Setter Property="IsTabStop" Value="false"/>
  305. <Setter Property="Focusable" Value="false"/>
  306. <Setter Property="ClickMode" Value="Press"/>
  307. <Setter Property="Template">
  308. <Setter.Value>
  309. <ControlTemplate TargetType="{x:Type ToggleButton}">
  310. <Border x:Name="templateRoot" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
  311. <Border x:Name="splitBorder" BorderThickness="0" HorizontalAlignment="Right" SnapsToDevicePixels="true" Width="54">
  312. <!--<Rectangle x:Name="rec1" HorizontalAlignment="Center" VerticalAlignment="Center" Width="40" Height="40" Fill="Black"/>-->
  313. <Image x:Name="image1" Width="44" Height="44" Source="pack://application:,,,/ivf_tl_Operate;component/Resources/Image/PullDownGrayIcon.png" HorizontalAlignment="Right" VerticalAlignment="Center"/>
  314. <!--<Path x:Name="arrow" Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z" Fill="{StaticResource ComboBox.Static.Glyph}" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center"/>-->
  315. </Border>
  316. </Border>
  317. <ControlTemplate.Triggers>
  318. <!--<Trigger Property="IsChecked" Value="True">
  319. <Setter TargetName="image1" Property="Source" Value="/Resources/Image/foldScore.png"/>
  320. <Setter TargetName="image1" Property="Width" Value="30"/>
  321. <Setter TargetName="image1" Property="Height" Value="14"/>
  322. </Trigger>-->
  323. <!--<MultiDataTrigger>
  324. <MultiDataTrigger.Conditions>
  325. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
  326. <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="false"/>
  327. <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="false"/>
  328. <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="true"/>
  329. </MultiDataTrigger.Conditions>
  330. <Setter Property="Background" TargetName="templateRoot" Value="red"/>
  331. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Static.Editable.Border}"/>
  332. <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Background}"/>
  333. <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Border}"/>
  334. </MultiDataTrigger>-->
  335. <!--<Trigger Property="IsMouseOver" Value="true">
  336. <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.MouseOver.Glyph}"/>
  337. </Trigger>-->
  338. <!--<MultiDataTrigger>
  339. <MultiDataTrigger.Conditions>
  340. <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
  341. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
  342. </MultiDataTrigger.Conditions>
  343. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Background}"/>
  344. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Border}"/>
  345. </MultiDataTrigger>
  346. <MultiDataTrigger>
  347. <MultiDataTrigger.Conditions>
  348. <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
  349. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
  350. </MultiDataTrigger.Conditions>
  351. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Background}"/>
  352. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Border}"/>
  353. <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Background}"/>
  354. <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Border}"/>
  355. </MultiDataTrigger>-->
  356. <!--<Trigger Property="IsPressed" Value="true">
  357. <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Pressed.Glyph}"/>
  358. </Trigger>-->
  359. <!--<MultiDataTrigger>
  360. <MultiDataTrigger.Conditions>
  361. <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
  362. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
  363. </MultiDataTrigger.Conditions>
  364. <Setter Property="Background" TargetName="templateRoot" Value="blue"/>
  365. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Border}"/>
  366. </MultiDataTrigger>
  367. <MultiDataTrigger>
  368. <MultiDataTrigger.Conditions>
  369. <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
  370. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
  371. </MultiDataTrigger.Conditions>
  372. <Setter Property="Background" TargetName="templateRoot" Value="red"/>
  373. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Editable.Border}"/>
  374. <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Background}"/>
  375. <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Border}"/>
  376. </MultiDataTrigger>
  377. -->
  378. <!--<Trigger Property="IsEnabled" Value="false">
  379. <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Disabled.Glyph}"/>
  380. </Trigger>-->
  381. <!--
  382. <MultiDataTrigger>
  383. <MultiDataTrigger.Conditions>
  384. <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
  385. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
  386. </MultiDataTrigger.Conditions>
  387. <Setter Property="Background" TargetName="templateRoot" Value="red"/>
  388. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Border}"/>
  389. </MultiDataTrigger>
  390. <MultiDataTrigger>
  391. <MultiDataTrigger.Conditions>
  392. <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
  393. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
  394. </MultiDataTrigger.Conditions>
  395. <Setter Property="Background" TargetName="templateRoot" Value="red"/>
  396. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Editable.Border}"/>
  397. <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Disabled.Editable.Button.Background}"/>
  398. <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Disabled.Editable.Button.Border}"/>
  399. </MultiDataTrigger>-->
  400. </ControlTemplate.Triggers>
  401. </ControlTemplate>
  402. </Setter.Value>
  403. </Setter>
  404. </Style>
  405. <!--不可编辑时Combox控件样式-->
  406. <ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
  407. <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
  408. <Popup x:Name="PART_Popup" AllowsTransparency="true" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" VerticalOffset="1" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
  409. <Border >
  410. <ScrollViewer
  411. PanningMode="Both" Width="{Binding Path=ActualWidth, ElementName=templateRoot}" Background="{TemplateBinding Background}" x:Name="DropDownScrollViewer" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden">
  412. <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  413. </ScrollViewer>
  414. </Border>
  415. </Popup>
  416. <ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
  417. <ContentPresenter x:Name="contentPresenter" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" Content="{TemplateBinding SelectionBoxItem}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  418. </Grid>
  419. <ControlTemplate.Triggers>
  420. <!--<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
  421. <Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
  422. <Setter Property="Color" TargetName="shadow" Value="#71000000"/>
  423. </Trigger>-->
  424. <Trigger Property="HasItems" Value="false">
  425. <Setter Property="MaxHeight" TargetName="PART_Popup" Value="60"/>
  426. </Trigger>
  427. <Trigger Property="HasItems" Value="true">
  428. <Setter Property="MaxHeight" TargetName="PART_Popup" Value="330"/>
  429. </Trigger>
  430. <MultiTrigger>
  431. <MultiTrigger.Conditions>
  432. <Condition Property="IsGrouping" Value="true"/>
  433. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
  434. </MultiTrigger.Conditions>
  435. <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
  436. </MultiTrigger>
  437. <!--<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
  438. <Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
  439. <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
  440. </Trigger>-->
  441. </ControlTemplate.Triggers>
  442. </ControlTemplate>
  443. <!--可编辑时Combox控件样式-->
  444. <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
  445. <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
  446. <Grid.ColumnDefinitions>
  447. <ColumnDefinition Width="*"/>
  448. <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
  449. </Grid.ColumnDefinitions>
  450. <Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  451. <Border x:Name="dropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1">
  452. <ScrollViewer x:Name="DropDownScrollViewer">
  453. <Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
  454. <Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
  455. <Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
  456. </Canvas>
  457. <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  458. </Grid>
  459. </ScrollViewer>
  460. </Border>
  461. <!--<theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
  462. </theme:SystemDropShadowChrome>-->
  463. </Popup>
  464. <ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
  465. <Border x:Name="border" Background="{StaticResource TextBox.Static.Background}" Margin="{TemplateBinding BorderThickness}">
  466. <TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
  467. </Border>
  468. </Grid>
  469. <ControlTemplate.Triggers>
  470. <Trigger Property="IsEnabled" Value="false">
  471. <Setter Property="Opacity" TargetName="border" Value="0.56"/>
  472. </Trigger>
  473. <Trigger Property="IsKeyboardFocusWithin" Value="true">
  474. <Setter Property="Foreground" Value="Black"/>
  475. </Trigger>
  476. <!--<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
  477. <Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
  478. <Setter Property="Color" TargetName="shadow" Value="#71000000"/>
  479. </Trigger>-->
  480. <Trigger Property="HasItems" Value="false">
  481. <Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
  482. </Trigger>
  483. <MultiTrigger>
  484. <MultiTrigger.Conditions>
  485. <Condition Property="IsGrouping" Value="true"/>
  486. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
  487. </MultiTrigger.Conditions>
  488. <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
  489. </MultiTrigger>
  490. <Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
  491. <Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
  492. <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
  493. </Trigger>
  494. </ControlTemplate.Triggers>
  495. </ControlTemplate>
  496. <Style x:Key="ComboBoxStyle1" TargetType="{x:Type ComboBox}">
  497. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  498. <Setter Property="Background" Value="{StaticResource ComboBox.Static.Background}"/>
  499. <Setter Property="BorderBrush" Value="Red"/>
  500. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
  501. <Setter Property="BorderThickness" Value="10"/>
  502. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
  503. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
  504. <Setter Property="Padding" Value="10 0 3 0"/>
  505. <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
  506. <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
  507. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  508. <Setter Property="Template" Value="{StaticResource ComboBoxTemplate}"/>
  509. <!--<Style.Triggers>
  510. <Trigger Property="IsEditable" Value="true">
  511. <Setter Property="IsTabStop" Value="false"/>
  512. <Setter Property="Padding" Value="2"/>
  513. <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
  514. </Trigger>
  515. </Style.Triggers>-->
  516. </Style>
  517. <Style x:Key="ComboBoxItemContainerStyle1" TargetType="{x:Type ComboBoxItem}">
  518. <Setter Property="Template">
  519. <Setter.Value>
  520. <ControlTemplate TargetType="{x:Type ComboBoxItem}">
  521. <Border Height="66" Background="Transparent" x:Name="Bd" SnapsToDevicePixels="true" BorderBrush="#707070" BorderThickness="1 1 1 1">
  522. <ContentPresenter Margin="10 0 0 0" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  523. </Border>
  524. <ControlTemplate.Triggers>
  525. <Trigger Property="IsSelected" Value="True">
  526. <Setter TargetName="Bd" Property="Background" Value="#CECECE"/>
  527. </Trigger>
  528. <!--<Trigger Property="IsTouchCapturedWithin" Value="True">
  529. <Setter Property="IsSelected" Value="False"/>
  530. </Trigger>-->
  531. <!--<Trigger Property="IsMouseOver" Value="True">
  532. <Setter TargetName="Bd" Property="Background" Value="Blue"/>
  533. </Trigger>-->
  534. </ControlTemplate.Triggers>
  535. </ControlTemplate>
  536. </Setter.Value>
  537. </Setter>
  538. </Style>
  539. </ResourceDictionary>
  540. </Application.Resources>
  541. </Application>