终端一体化运控平台
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

2 роки тому
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
  4. xmlns:Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
  5. xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
  6. xmlns:hc="https://handyorg.github.io/handycontrol"
  7. xmlns:local="clr-namespace:BPASmartClient.CustomResource.UserControls"
  8. >
  9. <!--<ResourceDictionary.MergedDictionaries>
  10. <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
  11. <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
  12. </ResourceDictionary.MergedDictionaries>-->
  13. <!--#region Color-->
  14. <SolidColorBrush x:Key="foreground" Color="#FFA2C2E8"/>
  15. <!--#endregion-->
  16. <!--#region ScrollBar -->
  17. <LinearGradientBrush x:Key="VerticalScrollBarBackground" EndPoint="1,0" StartPoint="0,0">
  18. <GradientStop Color="#E1E1E1" Offset="0"/>
  19. <GradientStop Color="#EDEDED" Offset="0.20"/>
  20. <GradientStop Color="#EDEDED" Offset="0.80"/>
  21. <GradientStop Color="#E3E3E3" Offset="1"/>
  22. </LinearGradientBrush>
  23. <Style TargetType="{x:Type DatePickerTextBox}">
  24. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
  25. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
  26. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  27. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  28. <Setter Property="Template">
  29. <Setter.Value>
  30. <ControlTemplate TargetType="{x:Type DatePickerTextBox}">
  31. <Grid>
  32. <Grid.Resources>
  33. <SolidColorBrush x:Key="WatermarkBrush" Color="#FFAAAAAA"/>
  34. </Grid.Resources>
  35. <VisualStateManager.VisualStateGroups>
  36. <VisualStateGroup x:Name="CommonStates">
  37. <VisualStateGroup.Transitions>
  38. <VisualTransition GeneratedDuration="0"/>
  39. <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver"/>
  40. </VisualStateGroup.Transitions>
  41. <VisualState x:Name="Normal"/>
  42. <VisualState x:Name="MouseOver"/>
  43. </VisualStateGroup>
  44. <VisualStateGroup x:Name="WatermarkStates">
  45. <VisualStateGroup.Transitions>
  46. <VisualTransition GeneratedDuration="0"/>
  47. </VisualStateGroup.Transitions>
  48. <VisualState x:Name="Unwatermarked"/>
  49. <VisualState x:Name="Watermarked">
  50. <Storyboard>
  51. <DoubleAnimation Duration="0" Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Opacity" To="0"/>
  52. <DoubleAnimation Duration="0" Storyboard.TargetName="PART_Watermark" Storyboard.TargetProperty="Opacity" To="1"/>
  53. </Storyboard>
  54. </VisualState>
  55. </VisualStateGroup>
  56. <VisualStateGroup x:Name="FocusStates">
  57. <VisualStateGroup.Transitions>
  58. <VisualTransition GeneratedDuration="0"/>
  59. </VisualStateGroup.Transitions>
  60. <VisualState x:Name="Unfocused"/>
  61. <VisualState x:Name="Focused">
  62. <Storyboard>
  63. <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="1"/>
  64. </Storyboard>
  65. </VisualState>
  66. </VisualStateGroup>
  67. </VisualStateManager.VisualStateGroups>
  68. <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="1" Opacity="1" Padding="{TemplateBinding Padding}" HorizontalAlignment="Center" VerticalAlignment="Center">
  69. <Grid x:Name="WatermarkContent" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
  70. <Border x:Name="ContentElement" BorderThickness="1"/>
  71. <Border x:Name="watermark_decorator" BorderThickness="1">
  72. <ContentControl x:Name="PART_Watermark" Focusable="False" IsHitTestVisible="False" Opacity="0" Padding="2"/>
  73. </Border>
  74. <ScrollViewer x:Name="PART_ContentHost" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
  75. <Border x:Name="FocusVisual" BorderBrush="#FF45D6FA" CornerRadius="1" IsHitTestVisible="False" Opacity="0"/>
  76. </Grid>
  77. </Border>
  78. </Grid>
  79. </ControlTemplate>
  80. </Setter.Value>
  81. </Setter>
  82. </Style>
  83. <Style TargetType="{x:Type DatePicker}">
  84. <Setter Property="Foreground" Value="#a2c2e8 "/>
  85. <Setter Property="IsTodayHighlighted" Value="True"/>
  86. <Setter Property="SelectedDateFormat" Value="Short"/>
  87. <Setter Property="Background" Value="Transparent"/>
  88. <Setter Property="Padding" Value="2"/>
  89. <Setter Property="BorderBrush" Value="#08335f"/>
  90. <Setter Property="BorderThickness" Value="1"/>
  91. <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
  92. <Setter Property="Template">
  93. <Setter.Value>
  94. <ControlTemplate TargetType="{x:Type DatePicker}">
  95. <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Padding="{TemplateBinding Padding}">
  96. <VisualStateManager.VisualStateGroups>
  97. <VisualStateGroup x:Name="CommonStates">
  98. <VisualState x:Name="Normal"/>
  99. <VisualState x:Name="Disabled">
  100. <Storyboard>
  101. <DoubleAnimation Duration="0" Storyboard.TargetName="PART_DisabledVisual" Storyboard.TargetProperty="Opacity" To="1"/>
  102. </Storyboard>
  103. </VisualState>
  104. </VisualStateGroup>
  105. </VisualStateManager.VisualStateGroups>
  106. <Grid x:Name="PART_Root" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
  107. <Grid.Resources>
  108. <SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF"/>
  109. <ControlTemplate x:Key="DropDownButtonTemplate" TargetType="{x:Type Button}">
  110. <Grid>
  111. <VisualStateManager.VisualStateGroups>
  112. <VisualStateGroup x:Name="CommonStates">
  113. <VisualStateGroup.Transitions>
  114. <VisualTransition GeneratedDuration="0"/>
  115. <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver"/>
  116. <VisualTransition GeneratedDuration="0:0:0.1" To="Pressed"/>
  117. </VisualStateGroup.Transitions>
  118. <VisualState x:Name="Normal"/>
  119. <VisualState x:Name="MouseOver">
  120. <Storyboard>
  121. <ColorAnimation Duration="0" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="#FF448DCA"/>
  122. <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
  123. <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
  124. </ColorAnimationUsingKeyFrames>
  125. <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
  126. <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
  127. </ColorAnimationUsingKeyFrames>
  128. <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
  129. <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
  130. </ColorAnimationUsingKeyFrames>
  131. </Storyboard>
  132. </VisualState>
  133. <VisualState x:Name="Pressed">
  134. <Storyboard>
  135. <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
  136. <SplineColorKeyFrame KeyTime="0" Value="#FF448DCA"/>
  137. </ColorAnimationUsingKeyFrames>
  138. <DoubleAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
  139. <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
  140. </DoubleAnimationUsingKeyFrames>
  141. <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
  142. <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF"/>
  143. </ColorAnimationUsingKeyFrames>
  144. <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
  145. <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
  146. </ColorAnimationUsingKeyFrames>
  147. <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
  148. <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF"/>
  149. </ColorAnimationUsingKeyFrames>
  150. <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
  151. <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF"/>
  152. </ColorAnimationUsingKeyFrames>
  153. </Storyboard>
  154. </VisualState>
  155. <VisualState x:Name="Disabled"/>
  156. </VisualStateGroup>
  157. </VisualStateManager.VisualStateGroups>
  158. <Grid Background="#11FFFFFF" FlowDirection="LeftToRight" HorizontalAlignment="Center" Height="18" Margin="0" VerticalAlignment="Center" Width="19">
  159. <Grid.ColumnDefinitions>
  160. <ColumnDefinition Width="20*"/>
  161. <ColumnDefinition Width="20*"/>
  162. <ColumnDefinition Width="20*"/>
  163. <ColumnDefinition Width="20*"/>
  164. </Grid.ColumnDefinitions>
  165. <Grid.RowDefinitions>
  166. <RowDefinition Height="23*"/>
  167. <RowDefinition Height="19*"/>
  168. <RowDefinition Height="19*"/>
  169. <RowDefinition Height="19*"/>
  170. </Grid.RowDefinitions>
  171. <Border Visibility="Hidden" x:Name="Highlight" BorderThickness="1" BorderBrush="#FF45D6FA" CornerRadius="0,0,1,1" Grid.ColumnSpan="4" Margin="-1" Opacity="0" Grid.RowSpan="4" Grid.Row="0"/>
  172. <Border Visibility="Hidden" x:Name="Background" Background="#FF1F3B53" BorderThickness="1" BorderBrush="#FFFFFFFF" CornerRadius=".5" Grid.ColumnSpan="4" Margin="0,-1,0,0" Opacity="1" Grid.RowSpan="3" Grid.Row="1"/>
  173. <Border Visibility="Hidden" x:Name="BackgroundGradient" BorderThickness="1" BorderBrush="#BF000000" CornerRadius=".5" Grid.ColumnSpan="4" Margin="0,-1,0,0" Opacity="1" Grid.RowSpan="3" Grid.Row="1">
  174. <Border.Background>
  175. <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
  176. <GradientStop Color="#FFFFFFFF" Offset="0"/>
  177. <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
  178. <GradientStop Color="#E5FFFFFF" Offset="0.625"/>
  179. <GradientStop Color="#C6FFFFFF" Offset="1"/>
  180. </LinearGradientBrush>
  181. </Border.Background>
  182. </Border>
  183. <Rectangle Visibility="Hidden" Grid.ColumnSpan="4" Grid.RowSpan="1" StrokeThickness="1">
  184. <Rectangle.Fill>
  185. <LinearGradientBrush EndPoint="0.3,-1.1" StartPoint="0.46,1.6">
  186. <GradientStop Color="#FF4084BD"/>
  187. <GradientStop Color="#FFAFCFEA" Offset="1"/>
  188. </LinearGradientBrush>
  189. </Rectangle.Fill>
  190. <Rectangle.Stroke>
  191. <LinearGradientBrush EndPoint="0.48,-1" StartPoint="0.48,1.25">
  192. <GradientStop Color="#FF494949"/>
  193. <GradientStop Color="#FF9F9F9F" Offset="1"/>
  194. </LinearGradientBrush>
  195. </Rectangle.Stroke>
  196. </Rectangle>
  197. <Path Visibility="Hidden" Grid.ColumnSpan="4" Grid.Column="0" Data="M11.426758,8.4305077 L11.749023,8.4305077 L11.749023,16.331387 L10.674805,16.331387 L10.674805,10.299648 L9.0742188,11.298672 L9.0742188,10.294277 C9.4788408,10.090176 9.9094238,9.8090878 10.365967,9.4510155 C10.82251,9.0929432 11.176106,8.7527733 11.426758,8.4305077 z M14.65086,8.4305077 L18.566387,8.4305077 L18.566387,9.3435936 L15.671368,9.3435936 L15.671368,11.255703 C15.936341,11.058764 16.27293,10.960293 16.681133,10.960293 C17.411602,10.960293 17.969301,11.178717 18.354229,11.615566 C18.739157,12.052416 18.931622,12.673672 18.931622,13.479336 C18.931622,15.452317 18.052553,16.438808 16.294415,16.438808 C15.560365,16.438808 14.951641,16.234707 14.468243,15.826504 L14.881817,14.929531 C15.368796,15.326992 15.837872,15.525723 16.289043,15.525723 C17.298809,15.525723 17.803692,14.895514 17.803692,13.635098 C17.803692,12.460618 17.305971,11.873379 16.310528,11.873379 C15.83071,11.873379 15.399232,12.079271 15.016094,12.491055 L14.65086,12.238613 z" Fill="#FF2F2F2F" HorizontalAlignment="Center" Margin="4,3,4,3" RenderTransformOrigin="0.5,0.5" Grid.RowSpan="3" Grid.Row="1" Stretch="Fill" VerticalAlignment="Center"/>
  198. <Ellipse Visibility="Hidden" Grid.ColumnSpan="4" Fill="#FFFFFFFF" HorizontalAlignment="Center" Height="3" StrokeThickness="0" VerticalAlignment="Center" Width="3"/>
  199. <Border Visibility="Hidden" x:Name="DisabledVisual" BorderThickness="1" BorderBrush="#B2FFFFFF" CornerRadius="0,0,.5,.5" Grid.ColumnSpan="4" Opacity="0" Grid.RowSpan="4" Grid.Row="0"/>
  200. <Image Source="/BPASmartClient.CustomResource;component/Image/日历.png" Grid.Column="0" Grid.ColumnSpan="10" Grid.RowSpan="10"></Image>
  201. </Grid>
  202. </Grid>
  203. </ControlTemplate>
  204. </Grid.Resources>
  205. <Grid.ColumnDefinitions>
  206. <ColumnDefinition Width="*"/>
  207. <ColumnDefinition Width="Auto"/>
  208. </Grid.ColumnDefinitions>
  209. <Button x:Name="PART_Button" Grid.Column="1" Focusable="False" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="Left" Margin="3,0,3,0" Grid.Row="0" Template="{StaticResource DropDownButtonTemplate}" VerticalAlignment="Top" Width="20"/>
  210. <DatePickerTextBox x:Name="PART_TextBox" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="Stretch" Grid.Row="0" VerticalContentAlignment="Stretch"/>
  211. <Grid x:Name="PART_DisabledVisual" Grid.ColumnSpan="2" Grid.Column="0" IsHitTestVisible="False" Opacity="0" Grid.Row="0">
  212. <Grid.ColumnDefinitions>
  213. <ColumnDefinition Width="*"/>
  214. <ColumnDefinition Width="Auto"/>
  215. </Grid.ColumnDefinitions>
  216. <Rectangle Grid.Column="0" RadiusX="1" RadiusY="1" Grid.Row="0"/>
  217. <Rectangle Grid.Column="1" Fill="#A5FFFFFF" Height="18" Margin="3,0,3,0" RadiusX="1" RadiusY="1" Grid.Row="0" Width="19"/>
  218. <Popup x:Name="PART_Popup" AllowsTransparency="True" Placement="Bottom" PlacementTarget="{Binding ElementName=PART_TextBox}" StaysOpen="False"/>
  219. </Grid>
  220. </Grid>
  221. </Border>
  222. <ControlTemplate.Triggers>
  223. <DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="false">
  224. <Setter Property="Foreground" TargetName="PART_TextBox" Value="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}}"/>
  225. </DataTrigger>
  226. </ControlTemplate.Triggers>
  227. </ControlTemplate>
  228. </Setter.Value>
  229. </Setter>
  230. </Style>
  231. <Style x:Key="arrowPath" TargetType="Path">
  232. <Setter Property="Data" Value="M5.5555,8.4319998 L0.5,0.5 L10.611,0.5 z"></Setter>
  233. <Setter Property="Fill" Value="Gray"></Setter>
  234. <Setter Property="Stretch" Value="Fill"></Setter>
  235. <Setter Property="StrokeThickness" Value="1"></Setter>
  236. <Setter Property="Stroke" Value="Black"></Setter>
  237. <Setter Property="Width" Value="8"></Setter>
  238. <Setter Property="Height" Value="5"></Setter>
  239. <Setter Property="SnapsToDevicePixels" Value="True"></Setter>
  240. <Setter Property="Cursor" Value="Hand"></Setter>
  241. </Style>
  242. <Style x:Key="UpScrollBarButton" TargetType="{x:Type RepeatButton}">
  243. <Setter Property="OverridesDefaultStyle" Value="true"/>
  244. <Setter Property="Cursor" Value="Hand"/>
  245. <Setter Property="Focusable" Value="false"/>
  246. <Setter Property="IsTabStop" Value="false"/>
  247. <Setter Property="Template">
  248. <Setter.Value>
  249. <ControlTemplate TargetType="{x:Type RepeatButton}">
  250. <Image Source="Image/Scroll_↑.png" Width="8" Height="5" ></Image>
  251. </ControlTemplate>
  252. </Setter.Value>
  253. </Setter>
  254. </Style>
  255. <Style x:Key="DownScrollBarButton" TargetType="{x:Type RepeatButton}">
  256. <Setter Property="OverridesDefaultStyle" Value="true"/>
  257. <Setter Property="Cursor" Value="Hand"/>
  258. <Setter Property="Focusable" Value="false"/>
  259. <Setter Property="IsTabStop" Value="false"/>
  260. <Setter Property="Template">
  261. <Setter.Value>
  262. <ControlTemplate TargetType="{x:Type RepeatButton}">
  263. <Image Source="Image/Scroll_↓.png" Width="8" Height="5"></Image>
  264. </ControlTemplate>
  265. </Setter.Value>
  266. </Setter>
  267. </Style>
  268. <Style x:Key="LeftScrollBarButton" TargetType="{x:Type RepeatButton}">
  269. <Setter Property="OverridesDefaultStyle" Value="true"/>
  270. <Setter Property="Cursor" Value="Hand"/>
  271. <Setter Property="Focusable" Value="false"/>
  272. <Setter Property="IsTabStop" Value="false"/>
  273. <Setter Property="Template">
  274. <Setter.Value>
  275. <ControlTemplate TargetType="{x:Type RepeatButton}">
  276. <Image Source="Image/Scroll_←.png" Width="5" Height="8"></Image>
  277. </ControlTemplate>
  278. </Setter.Value>
  279. </Setter>
  280. </Style>
  281. <Style x:Key="RightScrollBarButton" TargetType="{x:Type RepeatButton}">
  282. <Setter Property="OverridesDefaultStyle" Value="true"/>
  283. <Setter Property="Cursor" Value="Hand"/>
  284. <Setter Property="Focusable" Value="false"/>
  285. <Setter Property="IsTabStop" Value="false"/>
  286. <Setter Property="Template">
  287. <Setter.Value>
  288. <ControlTemplate TargetType="{x:Type RepeatButton}">
  289. <Image Source="Image/Scroll_→.png" Width="5" Height="8"></Image>
  290. </ControlTemplate>
  291. </Setter.Value>
  292. </Setter>
  293. </Style>
  294. <Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
  295. <Setter Property="OverridesDefaultStyle" Value="true"/>
  296. <Setter Property="Background" Value="Transparent"/>
  297. <Setter Property="Focusable" Value="false"/>
  298. <Setter Property="IsTabStop" Value="false"/>
  299. <Setter Property="Template">
  300. <Setter.Value>
  301. <ControlTemplate TargetType="{x:Type RepeatButton}">
  302. <Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
  303. </ControlTemplate>
  304. </Setter.Value>
  305. </Setter>
  306. </Style>
  307. <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
  308. <Setter Property="OverridesDefaultStyle" Value="true"/>
  309. <Setter Property="IsTabStop" Value="false"/>
  310. <Setter Property="Template">
  311. <Setter.Value>
  312. <ControlTemplate TargetType="{x:Type Thumb}">
  313. <Border x:Name="bd1" Background="#00c2f4" SnapsToDevicePixels="true" Opacity="1" Cursor="Hand" CornerRadius="3" Margin="2,2,2,2"></Border>
  314. <ControlTemplate.Triggers>
  315. <Trigger Property="IsMouseOver" Value="true">
  316. <Setter TargetName="bd1" Property="Margin" Value="-1,-1,-1,-1"></Setter>
  317. </Trigger>
  318. </ControlTemplate.Triggers>
  319. </ControlTemplate>
  320. </Setter.Value>
  321. </Setter>
  322. </Style>
  323. <LinearGradientBrush x:Key="HorizontalScrollBarBackground" EndPoint="0,1" StartPoint="0,0">
  324. <GradientStop Color="#E1E1E1" Offset="0"/>
  325. <GradientStop Color="#EDEDED" Offset="0.20"/>
  326. <GradientStop Color="#EDEDED" Offset="0.80"/>
  327. <GradientStop Color="#E3E3E3" Offset="1"/>
  328. </LinearGradientBrush>
  329. <Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
  330. <Setter Property="OverridesDefaultStyle" Value="true"/>
  331. <Setter Property="Background" Value="Transparent"/>
  332. <Setter Property="Focusable" Value="false"/>
  333. <Setter Property="IsTabStop" Value="false"/>
  334. <Setter Property="Template">
  335. <Setter.Value>
  336. <ControlTemplate TargetType="{x:Type RepeatButton}">
  337. <Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
  338. </ControlTemplate>
  339. </Setter.Value>
  340. </Setter>
  341. </Style>
  342. <Style TargetType="{x:Type ScrollBar}">
  343. <Setter Property="Background">
  344. <Setter.Value>
  345. <ImageBrush Opacity="0.2" ImageSource="/BPASmartClient.CustomResource;component/Image/表格标题背景2.png"></ImageBrush>
  346. </Setter.Value>
  347. </Setter>
  348. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
  349. <Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
  350. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  351. <Setter Property="Opacity" Value="1"/>
  352. <Setter Property="MinWidth" Value="3"/>
  353. <Setter Property="Template">
  354. <Setter.Value>
  355. <ControlTemplate TargetType="{x:Type ScrollBar}">
  356. <Border CornerRadius="2" Background="{TemplateBinding Background}" Opacity="{TemplateBinding Opacity}" Width="10" Margin="0,0,0,0">
  357. <Grid x:Name="Bg" SnapsToDevicePixels="true" >
  358. <Grid.RowDefinitions>
  359. <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"/>
  360. <RowDefinition Height="*"/>
  361. <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"/>
  362. </Grid.RowDefinitions>
  363. <RepeatButton Command="{x:Static ScrollBar.LineUpCommand}" IsEnabled="{TemplateBinding IsMouseOver}" Style="{StaticResource UpScrollBarButton}" Themes:ScrollChrome.ScrollGlyph="UpArrow"/>
  364. <Track x:Name="PART_Track" IsDirectionReversed="true" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="1">
  365. <Track.DecreaseRepeatButton>
  366. <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
  367. </Track.DecreaseRepeatButton>
  368. <Track.IncreaseRepeatButton>
  369. <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
  370. </Track.IncreaseRepeatButton>
  371. <Track.Thumb>
  372. <Thumb Style="{StaticResource ScrollBarThumb}" Themes:ScrollChrome.ScrollGlyph="VerticalGripper"/>
  373. </Track.Thumb>
  374. </Track>
  375. <RepeatButton Command="{x:Static ScrollBar.LineDownCommand}" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="2" Style="{StaticResource DownScrollBarButton}" Themes:ScrollChrome.ScrollGlyph="DownArrow"/>
  376. </Grid>
  377. </Border>
  378. </ControlTemplate>
  379. </Setter.Value>
  380. </Setter>
  381. <Style.Triggers>
  382. <Trigger Property="Orientation" Value="Horizontal">
  383. <Setter Property="Template">
  384. <Setter.Value>
  385. <ControlTemplate TargetType="{x:Type ScrollBar}">
  386. <Border CornerRadius="2" Background="{TemplateBinding Background}" Opacity="{TemplateBinding Opacity}" Height="10" Margin="0,0,0,0">
  387. <Grid x:Name="Bg" Background="{TemplateBinding Background}" SnapsToDevicePixels="true" >
  388. <Grid.ColumnDefinitions>
  389. <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
  390. <ColumnDefinition Width="*"/>
  391. <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
  392. </Grid.ColumnDefinitions>
  393. <RepeatButton Command="{x:Static ScrollBar.LineLeftCommand}" IsEnabled="{TemplateBinding IsMouseOver}" Style="{StaticResource LeftScrollBarButton}" Themes:ScrollChrome.ScrollGlyph="LeftArrow"/>
  394. <Track x:Name="PART_Track" Grid.Column="1" IsEnabled="{TemplateBinding IsMouseOver}">
  395. <Track.DecreaseRepeatButton>
  396. <RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource HorizontalScrollBarPageButton}"/>
  397. </Track.DecreaseRepeatButton>
  398. <Track.IncreaseRepeatButton>
  399. <RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource HorizontalScrollBarPageButton}"/>
  400. </Track.IncreaseRepeatButton>
  401. <Track.Thumb>
  402. <Thumb Style="{StaticResource ScrollBarThumb}" Themes:ScrollChrome.ScrollGlyph="HorizontalGripper"/>
  403. </Track.Thumb>
  404. </Track>
  405. <RepeatButton Grid.Column="2" Command="{x:Static ScrollBar.LineRightCommand}" IsEnabled="{TemplateBinding IsMouseOver}" Style="{StaticResource RightScrollBarButton}" Themes:ScrollChrome.ScrollGlyph="RightArrow"/>
  406. </Grid>
  407. </Border>
  408. </ControlTemplate>
  409. </Setter.Value>
  410. </Setter>
  411. </Trigger>
  412. </Style.Triggers>
  413. </Style>
  414. <!--#endregion-->
  415. <!--#region DataGrid-->
  416. <Style x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">
  417. <Setter Property="Width" Value="1"/>
  418. <Setter Property="Background" Value="#175c86"/>
  419. <Setter Property="Cursor" Value="SizeWE"/>
  420. <Setter Property="Margin" Value="0,0,0,0"/>
  421. <Setter Property="Template">
  422. <Setter.Value>
  423. <ControlTemplate TargetType="{x:Type Thumb}">
  424. <Border Width="{TemplateBinding Width}" Margin="{TemplateBinding Margin}" Background="{TemplateBinding Background}" Opacity="0.4"/>
  425. </ControlTemplate>
  426. </Setter.Value>
  427. </Setter>
  428. </Style>
  429. <Style TargetType="{x:Type DataGridColumnHeader}">
  430. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  431. <Setter Property="VerticalContentAlignment" Value="Center"/>
  432. <Setter Property="Height" Value="40"/>
  433. <Setter Property="Background" >
  434. <Setter.Value>
  435. <ImageBrush Opacity="0.2" ImageSource="/BPASmartClient.CustomResource;component/Image/表格标题背景2.png"></ImageBrush>
  436. </Setter.Value>
  437. </Setter>
  438. <Setter Property="BorderThickness" Value="0"></Setter>
  439. <Setter Property="Foreground" Value="#00c2f4"></Setter>
  440. <Setter Property="FontSize" Value="20"></Setter>
  441. <Setter Property="Template">
  442. <Setter.Value>
  443. <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
  444. <Grid>
  445. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
  446. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  447. </Border>
  448. <GridSplitter Background="#FF0BAE3F" HorizontalAlignment="Right" BorderBrush="#FFBD2A2A" ></GridSplitter>
  449. <Thumb x:Name="PART_RightHeaderGripper" HorizontalAlignment="Right" Style="{StaticResource ColumnHeaderGripperStyle}" Background="#FF175C86"/>
  450. </Grid>
  451. </ControlTemplate>
  452. </Setter.Value>
  453. </Setter>
  454. </Style>
  455. <Style x:Key="DataGridColumnHeader" TargetType="{x:Type DataGridColumnHeader}">
  456. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  457. <Setter Property="VerticalContentAlignment" Value="Center"/>
  458. <Setter Property="Height" Value="30"/>
  459. <Setter Property="Background" >
  460. <Setter.Value>
  461. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/表头背景.png"></ImageBrush>
  462. </Setter.Value>
  463. </Setter>
  464. <Setter Property="BorderThickness" Value="0"></Setter>
  465. <Setter Property="Foreground" Value="White"></Setter>
  466. <Setter Property="FontSize" Value="10"></Setter>
  467. <Setter Property="Template">
  468. <Setter.Value>
  469. <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
  470. <Grid>
  471. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
  472. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  473. </Border>
  474. <Thumb x:Name="PART_RightHeaderGripper" HorizontalAlignment="Right" Style="{StaticResource ColumnHeaderGripperStyle}"/>
  475. </Grid>
  476. </ControlTemplate>
  477. </Setter.Value>
  478. </Setter>
  479. </Style>
  480. <Style TargetType="{x:Type DataGridRow}">
  481. <Setter Property="Background" Value="Transparent"/>
  482. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  483. <Setter Property="SnapsToDevicePixels" Value="true"/>
  484. <Setter Property="Foreground" Value="#abf4ff"></Setter>
  485. <Setter Property="FontSize" Value="12"></Setter>
  486. <Setter Property="Template">
  487. <Setter.Value>
  488. <ControlTemplate TargetType="{x:Type DataGridRow}">
  489. <Border x:Name="DGR_Border" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
  490. <VisualStateManager.VisualStateGroups>
  491. <VisualStateGroup x:Name="CommonStates">
  492. <VisualState x:Name="Normal"/>
  493. <VisualState x:Name="MouseOver">
  494. <Storyboard>
  495. <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background)" Storyboard.TargetName="DGR_Border">
  496. <DiscreteObjectKeyFrame KeyTime="0">
  497. <DiscreteObjectKeyFrame.Value>
  498. <SolidColorBrush Color="#230077BC"/>
  499. </DiscreteObjectKeyFrame.Value>
  500. </DiscreteObjectKeyFrame>
  501. </ObjectAnimationUsingKeyFrames>
  502. </Storyboard>
  503. </VisualState>
  504. <VisualState x:Name="Normal_Selected">
  505. <Storyboard>
  506. <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background)" Storyboard.TargetName="DGR_Border">
  507. <DiscreteObjectKeyFrame KeyTime="0">
  508. <DiscreteObjectKeyFrame.Value>
  509. <SolidColorBrush Color="#3D0077BC"/>
  510. </DiscreteObjectKeyFrame.Value>
  511. </DiscreteObjectKeyFrame>
  512. </ObjectAnimationUsingKeyFrames>
  513. </Storyboard>
  514. </VisualState>
  515. </VisualStateGroup>
  516. <VisualStateGroup x:Name="ValidationStates">
  517. <VisualState x:Name="Valid"/>
  518. <VisualState x:Name="InvalidFocused"/>
  519. <VisualState x:Name="InvalidUnfocused"/>
  520. </VisualStateGroup>
  521. </VisualStateManager.VisualStateGroups>
  522. <SelectiveScrollingGrid x:Name="selectiveScrollingGrid">
  523. <SelectiveScrollingGrid.ColumnDefinitions>
  524. <ColumnDefinition Width="Auto"/>
  525. <ColumnDefinition Width="*"/>
  526. </SelectiveScrollingGrid.ColumnDefinitions>
  527. <SelectiveScrollingGrid.RowDefinitions>
  528. <RowDefinition Height="*"/>
  529. <RowDefinition Height="Auto"/>
  530. </SelectiveScrollingGrid.RowDefinitions>
  531. <DataGridCellsPresenter Grid.Column="1" ItemsPanel="{TemplateBinding ItemsPanel}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  532. <DataGridDetailsPresenter Grid.Column="1" Grid.Row="1" SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Visibility="{TemplateBinding DetailsVisibility}"/>
  533. <DataGridRowHeader Grid.RowSpan="2" SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
  534. </SelectiveScrollingGrid>
  535. </Border>
  536. </ControlTemplate>
  537. </Setter.Value>
  538. </Setter>
  539. </Style>
  540. <Style TargetType="{x:Type DataGridCell}">
  541. <Setter Property="Background" Value="Transparent"/>
  542. <Setter Property="BorderBrush" Value="Transparent"/>
  543. <Setter Property="BorderThickness" Value="1"/>
  544. <Setter Property="Template">
  545. <Setter.Value>
  546. <ControlTemplate TargetType="{x:Type DataGridCell}">
  547. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
  548. <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  549. </Border>
  550. </ControlTemplate>
  551. </Setter.Value>
  552. </Setter>
  553. <Style.Triggers>
  554. <Trigger Property="IsSelected" Value="True">
  555. <!--<Setter Property="Background" Value="#FF2281EC"/>-->
  556. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
  557. <!--<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>-->
  558. </Trigger>
  559. <!--<Trigger Property="IsKeyboardFocusWithin" Value="True">
  560. <Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
  561. </Trigger>-->
  562. <Trigger Property="IsEnabled" Value="false">
  563. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  564. </Trigger>
  565. </Style.Triggers>
  566. </Style>
  567. <Style TargetType="{x:Type DataGrid}">
  568. <Setter Property="AutoGenerateColumns" Value="False"/>
  569. <Setter Property="Background" Value="Transparent"></Setter>
  570. <Setter Property="CanUserAddRows" Value="False"/>
  571. <Setter Property="CanUserDeleteRows" Value="False"/>
  572. <Setter Property="BorderThickness" Value="0"/>
  573. <Setter Property="HeadersVisibility" Value="Column"/>
  574. <Setter Property="GridLinesVisibility" Value="None"/>
  575. <Setter Property="SelectionMode" Value="Single"/>
  576. <!--<Setter Property="Template">
  577. <Setter.Value>
  578. <ControlTemplate TargetType="DataGrid">
  579. <Border BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
  580. <ScrollViewer x:Name="DG_ScrollViewer" Focusable="False">
  581. <ScrollViewer.Template>
  582. <ControlTemplate TargetType="{x:Type ScrollViewer}">
  583. <Grid>
  584. <Grid.ColumnDefinitions>
  585. <ColumnDefinition Width="Auto"/>
  586. <ColumnDefinition Width="*"/>
  587. <ColumnDefinition Width="Auto"/>
  588. </Grid.ColumnDefinitions>
  589. <Grid.RowDefinitions>
  590. <RowDefinition Height="Auto"/>
  591. <RowDefinition Height="*"/>
  592. <RowDefinition Height="Auto"/>
  593. </Grid.RowDefinitions>
  594. <Button Command="ApplicationCommands.SelectAll" Focusable="False" Style="{DynamicResource {ComponentResourceKey ResourceId=DataGridSelectAllButtonStyle, TypeInTargetAssembly={x:Type DataGrid}}}" Width="{Binding CellsPanelHorizontalOffset, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}}">
  595. <Button.Visibility>
  596. <Binding Path="HeadersVisibility" RelativeSource="{RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}">
  597. <Binding.ConverterParameter>
  598. <DataGridHeadersVisibility>All</DataGridHeadersVisibility>
  599. </Binding.ConverterParameter>
  600. </Binding>
  601. </Button.Visibility>
  602. </Button>
  603. <DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter" Grid.Column="1">
  604. <DataGridColumnHeadersPresenter.Visibility>
  605. <Binding Path="HeadersVisibility" RelativeSource="{RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}">
  606. <Binding.ConverterParameter>
  607. <DataGridHeadersVisibility>Column</DataGridHeadersVisibility>
  608. </Binding.ConverterParameter>
  609. </Binding>
  610. </DataGridColumnHeadersPresenter.Visibility>
  611. </DataGridColumnHeadersPresenter>
  612. <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" Grid.ColumnSpan="2" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Grid.Row="1"/>
  613. <ScrollBar x:Name="PART_VerticalScrollBar" Grid.Column="2" Maximum="{TemplateBinding ScrollableHeight}" Orientation="Vertical" Grid.Row="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
  614. <Grid Grid.Column="1" Grid.Row="2" >
  615. <Grid.ColumnDefinitions>
  616. <ColumnDefinition Width="{Binding NonFrozenColumnsViewportHorizontalOffset, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}}"/>
  617. <ColumnDefinition Width="*"/>
  618. </Grid.ColumnDefinitions>
  619. <ScrollBar x:Name="PART_HorizontalScrollBar" Grid.Column="1" Maximum="{TemplateBinding ScrollableWidth}" Orientation="Horizontal" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
  620. </Grid>
  621. </Grid>
  622. </ControlTemplate>
  623. </ScrollViewer.Template>
  624. <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  625. </ScrollViewer>
  626. </Border>
  627. </ControlTemplate>
  628. </Setter.Value>
  629. </Setter>-->
  630. <!--<Style.Triggers>
  631. <DataTrigger Binding="{Binding PZItems.Count}" Value="0">
  632. <Setter Property="Visibility" Value="Collapsed"></Setter>
  633. </DataTrigger>
  634. </Style.Triggers>-->
  635. </Style>
  636. <!--#endregion-->
  637. <!--#region ListBox -->
  638. <SolidColorBrush x:Key="ListBorder" Color="#828790"/>
  639. <Style TargetType="{x:Type ListBox}">
  640. <!--<Setter Property="Background" >
  641. <Setter.Value>
  642. <ImageBrush ImageSource="Images/Pop_bg.png" Stretch="Fill" />
  643. </Setter.Value>
  644. </Setter>-->
  645. <Setter Property="Background" Value="Transparent"/>
  646. <Setter Property="BorderBrush" Value="{StaticResource ListBorder}"/>
  647. <Setter Property="BorderThickness" Value="0"/>
  648. <Setter Property="Padding" Value="10"/>
  649. <Setter Property="Foreground" Value="White"/>
  650. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  651. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
  652. <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
  653. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  654. <Setter Property="VerticalContentAlignment" Value="Center"/>
  655. </Style>
  656. <!--#endregion-->
  657. <!--#region ListBoxItem -->
  658. <Style x:Key="baseListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
  659. <Setter Property="Background" Value="Transparent"/>
  660. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  661. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  662. <Setter Property="Padding" Value="2,0,0,0"/>
  663. <Setter Property="Foreground" Value="#FF90C390"></Setter>
  664. <Setter Property="Template">
  665. <Setter.Value>
  666. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  667. <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
  668. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  669. </Border>
  670. <ControlTemplate.Triggers>
  671. <Trigger Property="IsSelected" Value="true">
  672. <Setter Property="Background" TargetName="Bd" Value="#230077BC"/>
  673. <Setter Property="Opacity" TargetName="Bd" Value="0.8"/>
  674. <Setter Property="Foreground" Value="Snow"/>
  675. </Trigger>
  676. <!--<MultiTrigger>
  677. <MultiTrigger.Conditions>
  678. <Condition Property="IsSelected" Value="True"/>
  679. <Condition Property="Selector.IsSelectionActive" Value="False"/>
  680. </MultiTrigger.Conditions>
  681. <Setter Property="Background" TargetName="Bd" Value="#FFA7BB24"/>
  682. <Setter Property="Foreground" Value="Snow"/>
  683. </MultiTrigger>-->
  684. <!--<MultiTrigger>
  685. <MultiTrigger.Conditions>
  686. <Condition Binding="{Binding }" Value="true"/>
  687. <Condition Property="Selector.IsSelectionActive" Value="false"/>
  688. </MultiTrigger.Conditions>
  689. <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.InactiveCaptionTextColor}}"/>
  690. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}}"/>
  691. </MultiTrigger>
  692. <Trigger Property="IsEnabled" Value="true">
  693. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  694. </Trigger>-->
  695. </ControlTemplate.Triggers>
  696. </ControlTemplate>
  697. </Setter.Value>
  698. </Setter>
  699. </Style>
  700. <Style x:Key="baseListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
  701. <Setter Property="Background" Value="Transparent"/>
  702. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  703. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  704. <Setter Property="Padding" Value="2,0,0,0"/>
  705. <Setter Property="Foreground" Value="#FF90C390"></Setter>
  706. <Setter Property="Template">
  707. <Setter.Value>
  708. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  709. <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
  710. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  711. </Border>
  712. <ControlTemplate.Triggers>
  713. <MultiTrigger>
  714. <MultiTrigger.Conditions>
  715. <Condition Property="IsSelected" Value="True"/>
  716. <Condition Property="Selector.IsSelectionActive" Value="True"/>
  717. </MultiTrigger.Conditions>
  718. <Setter Property="Opacity" TargetName="Bd" Value="0.6"/>
  719. </MultiTrigger>
  720. </ControlTemplate.Triggers>
  721. </ControlTemplate>
  722. </Setter.Value>
  723. </Setter>
  724. </Style>
  725. <Style BasedOn="{StaticResource baseListBoxItemStyle}" TargetType="{x:Type ListBoxItem}">
  726. </Style>
  727. <Style x:Key="ListBoxItemStyle1" BasedOn="{StaticResource baseListBoxItemStyle}" TargetType="{x:Type ListBoxItem}" >
  728. <Style.Triggers>
  729. <MultiDataTrigger>
  730. <MultiDataTrigger.Conditions>
  731. <Condition Binding="{Binding DataContext.IsNotDeal,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ListBox}}" Value="false"/>
  732. <Condition Binding="{Binding IsDeal}" Value="0"/>
  733. </MultiDataTrigger.Conditions>
  734. <Setter Property="Visibility" Value="Collapsed"/>
  735. </MultiDataTrigger>
  736. <MultiDataTrigger>
  737. <MultiDataTrigger.Conditions>
  738. <Condition Binding="{Binding DataContext.IsRecive,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ListBox}}" Value="false"/>
  739. <Condition Binding="{Binding IsDeal}" Value="1"/>
  740. </MultiDataTrigger.Conditions>
  741. <Setter Property="Visibility" Value="Collapsed"/>
  742. </MultiDataTrigger>
  743. <MultiDataTrigger>
  744. <MultiDataTrigger.Conditions>
  745. <Condition Binding="{Binding DataContext.IsRefuse,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ListBox}}" Value="false"/>
  746. <Condition Binding="{Binding IsDeal}" Value="2"/>
  747. </MultiDataTrigger.Conditions>
  748. <Setter Property="Visibility" Value="Collapsed"/>
  749. </MultiDataTrigger>
  750. </Style.Triggers>
  751. </Style>
  752. <!--#endregion-->
  753. <!--#region TabControl -->
  754. <Style x:Key="borderTab4_No" TargetType="Border">
  755. <Style.Setters>
  756. <Setter Property="Background">
  757. <Setter.Value>
  758. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png"/>
  759. </Setter.Value>
  760. </Setter>
  761. </Style.Setters>
  762. </Style>
  763. <Style x:Key="borderTab4_Select" TargetType="Border">
  764. <Style.Setters>
  765. <Setter Property="Background">
  766. <Setter.Value>
  767. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  768. </Setter.Value>
  769. </Setter>
  770. </Style.Setters>
  771. </Style>
  772. <Style x:Key="TabItemFocusVisual">
  773. <Setter Property="Control.Template">
  774. <Setter.Value>
  775. <ControlTemplate>
  776. <Rectangle StrokeDashArray="1 2" StrokeThickness="1" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" Margin="4,4,4,2"/>
  777. </ControlTemplate>
  778. </Setter.Value>
  779. </Setter>
  780. </Style>
  781. <Style TargetType="{x:Type TabControl}">
  782. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  783. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  784. <Setter Property="VerticalContentAlignment" Value="Center"/>
  785. <Setter Property="Template">
  786. <Setter.Value>
  787. <ControlTemplate TargetType="{x:Type TabControl}">
  788. <Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
  789. <Grid.ColumnDefinitions>
  790. <ColumnDefinition x:Name="ColumnDefinition0"/>
  791. <ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
  792. </Grid.ColumnDefinitions>
  793. <Grid.RowDefinitions>
  794. <RowDefinition x:Name="RowDefinition0" Height="Auto"/>
  795. <RowDefinition x:Name="RowDefinition1" Height="*"/>
  796. </Grid.RowDefinitions>
  797. <TabPanel x:Name="HeaderPanel" Grid.Column="0" IsItemsHost="true" Margin="2,2,2,0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1" />
  798. <Border x:Name="ContentPanel" BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local" BorderBrush="{x:Null}">
  799. <ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  800. </Border>
  801. </Grid>
  802. <ControlTemplate.Triggers>
  803. <Trigger Property="TabStripPlacement" Value="Bottom">
  804. <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="1"/>
  805. <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
  806. <Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
  807. <Setter Property="Height" TargetName="RowDefinition1" Value="Auto"/>
  808. <Setter Property="Margin" TargetName="HeaderPanel" Value="2,0,2,2"/>
  809. </Trigger>
  810. <Trigger Property="TabStripPlacement" Value="Left">
  811. <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0"/>
  812. <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
  813. <Setter Property="Grid.Column" TargetName="HeaderPanel" Value="0"/>
  814. <Setter Property="Grid.Column" TargetName="ContentPanel" Value="1"/>
  815. <Setter Property="Width" TargetName="ColumnDefinition0" Value="Auto"/>
  816. <Setter Property="Width" TargetName="ColumnDefinition1" Value="*"/>
  817. <Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
  818. <Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
  819. <Setter Property="Margin" TargetName="HeaderPanel" Value="2,2,0,2"/>
  820. </Trigger>
  821. <Trigger Property="TabStripPlacement" Value="Right">
  822. <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0"/>
  823. <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
  824. <Setter Property="Grid.Column" TargetName="HeaderPanel" Value="1"/>
  825. <Setter Property="Grid.Column" TargetName="ContentPanel" Value="0"/>
  826. <Setter Property="Width" TargetName="ColumnDefinition0" Value="*"/>
  827. <Setter Property="Width" TargetName="ColumnDefinition1" Value="Auto"/>
  828. <Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
  829. <Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
  830. <Setter Property="Margin" TargetName="HeaderPanel" Value="0,2,2,2"/>
  831. </Trigger>
  832. <Trigger Property="IsEnabled" Value="false">
  833. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  834. </Trigger>
  835. </ControlTemplate.Triggers>
  836. </ControlTemplate>
  837. </Setter.Value>
  838. </Setter>
  839. </Style>
  840. <Style TargetType="{x:Type TabItem}">
  841. <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}"/>
  842. <Setter Property="Foreground">
  843. <Setter.Value>
  844. #A5FFFFFF
  845. </Setter.Value>
  846. </Setter>
  847. <Setter Property="Padding" Value="6,1,6,1"/>
  848. <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
  849. <Setter Property="VerticalContentAlignment" Value="Stretch"/>
  850. <Setter Property="Template">
  851. <Setter.Value>
  852. <ControlTemplate TargetType="{x:Type TabItem}">
  853. <Border x:Name="Bd" BorderThickness="1" Padding="{TemplateBinding Padding}" Height="24" Margin="2" CornerRadius="2">
  854. <ContentPresenter x:Name="Content" Cursor="Hand" ContentSource="Header" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  855. </Border>
  856. <ControlTemplate.Triggers>
  857. <Trigger Property="IsSelected" Value="true">
  858. <Setter Property="Foreground" Value="#8f723c"/>
  859. <Setter Property="Background" TargetName="Bd">
  860. <Setter.Value>
  861. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  862. </Setter.Value>
  863. </Setter>
  864. </Trigger>
  865. <Trigger Property="IsSelected" Value="False">
  866. <Setter Property="Foreground" Value="#134278"/>
  867. <Setter Property="Background" TargetName="Bd">
  868. <Setter.Value>
  869. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
  870. </Setter.Value>
  871. </Setter>
  872. </Trigger>
  873. </ControlTemplate.Triggers>
  874. </ControlTemplate>
  875. </Setter.Value>
  876. </Setter>
  877. </Style>
  878. <Style TargetType="{x:Type TabItem}" x:Key="TabItem样式1">
  879. <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}"/>
  880. <Setter Property="Foreground" Value="#A5FFFFFF"/>
  881. <Setter Property="Padding" Value="6,1,6,1"/>
  882. <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
  883. <Setter Property="VerticalContentAlignment" Value="Stretch"/>
  884. <Setter Property="Template">
  885. <Setter.Value>
  886. <ControlTemplate TargetType="{x:Type TabItem}">
  887. <Border x:Name="Bd" BorderThickness="1" Padding="{TemplateBinding Padding}" Height="60" Margin="2" CornerRadius="2">
  888. <ContentPresenter x:Name="Content" Cursor="Hand" ContentSource="Header" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  889. </Border>
  890. <ControlTemplate.Triggers>
  891. <Trigger Property="IsSelected" Value="true">
  892. <Setter Property="Foreground" Value="#8f723c"/>
  893. <Setter Property="Background" TargetName="Bd">
  894. <Setter.Value>
  895. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab3_Select.png" />
  896. </Setter.Value>
  897. </Setter>
  898. </Trigger>
  899. <Trigger Property="IsSelected" Value="False">
  900. <Setter Property="Foreground" Value="#134278"/>
  901. <Setter Property="Background" TargetName="Bd">
  902. <Setter.Value>
  903. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab3_No.png" />
  904. </Setter.Value>
  905. </Setter>
  906. </Trigger>
  907. </ControlTemplate.Triggers>
  908. </ControlTemplate>
  909. </Setter.Value>
  910. </Setter>
  911. </Style>
  912. <Style TargetType="{x:Type TabItem}" x:Key="TabItem样式2">
  913. <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}"/>
  914. <Setter Property="Foreground">
  915. <Setter.Value>
  916. #A5FFFFFF
  917. </Setter.Value>
  918. </Setter>
  919. <Setter Property="Padding" Value="6,1,6,1"/>
  920. <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
  921. <Setter Property="VerticalContentAlignment" Value="Stretch"/>
  922. <Setter Property="Template">
  923. <Setter.Value>
  924. <ControlTemplate TargetType="{x:Type TabItem}">
  925. <Border x:Name="Bd" BorderThickness="1" Padding="{TemplateBinding Padding}" Height="60" Margin="2" CornerRadius="2">
  926. <ContentPresenter x:Name="Content" Cursor="Hand" ContentSource="Header" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  927. </Border>
  928. <ControlTemplate.Triggers>
  929. <Trigger Property="IsSelected" Value="true">
  930. <Setter Property="Foreground" Value="#8f723c"/>
  931. <Setter Property="Background" TargetName="Bd">
  932. <Setter.Value>
  933. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab_SelectBJ.png" />
  934. </Setter.Value>
  935. </Setter>
  936. </Trigger>
  937. <Trigger Property="IsSelected" Value="False">
  938. <Setter Property="Foreground" Value="#134278"/>
  939. <Setter Property="Background" TargetName="Bd">
  940. <Setter.Value>
  941. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab_NoBJ.png" />
  942. </Setter.Value>
  943. </Setter>
  944. </Trigger>
  945. </ControlTemplate.Triggers>
  946. </ControlTemplate>
  947. </Setter.Value>
  948. </Setter>
  949. </Style>
  950. <!--#endregion-->
  951. <!--#region ProgressBar圆形统计图-->
  952. <local:Style3DashConverter x:Key="Style3Dash"/>
  953. <local:Style3ArcConverter x:Key="Style3Arc" />
  954. <Style x:Key="CircleProgressBar3" TargetType="{x:Type ProgressBar}">
  955. <Setter Property="Width" Value="100" />
  956. <Setter Property="Height" Value="100" />
  957. <Setter Property="Template">
  958. <Setter.Value>
  959. <ControlTemplate TargetType="{x:Type ProgressBar}">
  960. <Grid>
  961. <Rectangle Fill="#ef426f" Visibility="Collapsed" RadiusX="5" RadiusY="5"/>
  962. <Ellipse Stroke="#FF2470FF"
  963. StrokeThickness="10"
  964. Width="80"
  965. Height="80"/>
  966. <Ellipse Width="80" Height="80" StrokeThickness="10" Stroke="#FF0198FF"
  967. RenderTransformOrigin="0.5,0.5"
  968. StrokeDashCap="{Binding Value, Converter={StaticResource Style3Dash}, RelativeSource={RelativeSource TemplatedParent}}">
  969. <Ellipse.RenderTransform>
  970. <RotateTransform Angle="-90" />
  971. </Ellipse.RenderTransform>
  972. <Ellipse.StrokeDashArray>
  973. <MultiBinding Converter="{StaticResource Style3Arc}">
  974. <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Value" />
  975. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  976. </MultiBinding>
  977. </Ellipse.StrokeDashArray>
  978. </Ellipse>
  979. <TextBlock HorizontalAlignment="Center"
  980. FontSize="20"
  981. VerticalAlignment="Center"
  982. Foreground="#01acff"
  983. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}"/>
  984. </Grid>
  985. </ControlTemplate>
  986. </Setter.Value>
  987. </Setter>
  988. </Style>
  989. <Style x:Key="CircleProgressBar5" TargetType="{x:Type ProgressBar}">
  990. <Setter Property="Width" Value="100" />
  991. <Setter Property="Height" Value="100" />
  992. <Setter Property="Template">
  993. <Setter.Value>
  994. <ControlTemplate TargetType="{x:Type ProgressBar}">
  995. <Grid>
  996. <Rectangle Fill="#ef426f" Visibility="Collapsed" RadiusX="5" RadiusY="5"/>
  997. <Ellipse Stroke="#7F15806C"
  998. StrokeThickness="10"
  999. Width="80"
  1000. Height="80"/>
  1001. <Ellipse Width="80" Height="80" StrokeThickness="10" Stroke="#CC19910D"
  1002. RenderTransformOrigin="0.5,0.5"
  1003. StrokeDashCap="{Binding Value, Converter={StaticResource Style3Dash}, RelativeSource={RelativeSource TemplatedParent}}">
  1004. <Ellipse.RenderTransform>
  1005. <RotateTransform Angle="-90" />
  1006. </Ellipse.RenderTransform>
  1007. <Ellipse.StrokeDashArray>
  1008. <MultiBinding Converter="{StaticResource Style3Arc}">
  1009. <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Value" />
  1010. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1011. </MultiBinding>
  1012. </Ellipse.StrokeDashArray>
  1013. </Ellipse>
  1014. <TextBlock HorizontalAlignment="Center"
  1015. FontSize="20"
  1016. VerticalAlignment="Center"
  1017. Foreground="#CC19910D"
  1018. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}"/>
  1019. </Grid>
  1020. </ControlTemplate>
  1021. </Setter.Value>
  1022. </Setter>
  1023. </Style>
  1024. <Style x:Key="CircleProgressBar4" TargetType="{x:Type ProgressBar}">
  1025. <Setter Property="Width" Value="100" />
  1026. <Setter Property="Height" Value="100" />
  1027. <Setter Property="Template">
  1028. <Setter.Value>
  1029. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1030. <Grid>
  1031. <Rectangle Fill="#ef426f" Visibility="Collapsed" RadiusX="5" RadiusY="5"/>
  1032. <Ellipse Stroke="#CC3E0B0B"
  1033. StrokeThickness="10"
  1034. Width="80"
  1035. Height="80"/>
  1036. <Ellipse Width="80" Height="80" StrokeThickness="10" Stroke="#CCAC1919"
  1037. RenderTransformOrigin="0.5,0.5"
  1038. StrokeDashCap="{Binding Value, Converter={StaticResource Style3Dash}, RelativeSource={RelativeSource TemplatedParent}}">
  1039. <Ellipse.RenderTransform>
  1040. <RotateTransform Angle="-90" />
  1041. </Ellipse.RenderTransform>
  1042. <Ellipse.StrokeDashArray>
  1043. <MultiBinding Converter="{StaticResource Style3Arc}">
  1044. <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Value" />
  1045. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1046. </MultiBinding>
  1047. </Ellipse.StrokeDashArray>
  1048. </Ellipse>
  1049. <TextBlock HorizontalAlignment="Center"
  1050. FontSize="20"
  1051. VerticalAlignment="Center"
  1052. Foreground="#CCAC1919"
  1053. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}"/>
  1054. </Grid>
  1055. </ControlTemplate>
  1056. </Setter.Value>
  1057. </Setter>
  1058. </Style>
  1059. <!--#endregion-->
  1060. <!--#region Expander-->
  1061. <ImageBrush x:Key="leftImage" ImageSource="/BPASmartClient.CustomResource;component/Image/leftImage.png" />
  1062. <ImageBrush x:Key="leftImageSub" ImageSource="/BPASmartClient.CustomResource;component/Image/leftImageSub.png" />
  1063. <ImageBrush x:Key="topImage" ImageSource="/BPASmartClient.CustomResource;component/Image/topImage.png" />
  1064. <Style x:Key="ToggleButtonStyle" TargetType="{x:Type ToggleButton}">
  1065. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  1066. <Setter Property="Height" Value="80" />
  1067. <Setter Property="HorizontalContentAlignment" Value="Right" />
  1068. <Setter Property="VerticalContentAlignment" Value="Center" />
  1069. <Setter Property="Padding" Value="10,10" />
  1070. <Setter Property="Template">
  1071. <Setter.Value>
  1072. <ControlTemplate TargetType="{x:Type ToggleButton}">
  1073. <Grid>
  1074. <Border
  1075. x:Name="border2"
  1076. Margin="{TemplateBinding Padding}"
  1077. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1078. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1079. Background="{TemplateBinding Background}">
  1080. <ContentPresenter
  1081. Margin="{TemplateBinding Padding}"
  1082. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1083. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1084. RecognizesAccessKey="True"
  1085. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1086. </Border>
  1087. </Grid>
  1088. <ControlTemplate.Triggers>
  1089. <Trigger Property="IsPressed" Value="true">
  1090. <Setter Property="Background" Value="#FFd2e7f4" />
  1091. </Trigger>
  1092. <Trigger Property="IsChecked" Value="true">
  1093. <Setter TargetName="border2" Property="Background" Value="{StaticResource ResourceKey=leftImage}" />
  1094. </Trigger>
  1095. <Trigger Property="IsChecked" Value="false">
  1096. <Setter TargetName="border2" Property="Background" >
  1097. <Setter.Value>
  1098. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/矩形样式.png" />
  1099. </Setter.Value>
  1100. </Setter>
  1101. </Trigger>
  1102. <Trigger Property="IsEnabled" Value="false">
  1103. <Setter Property="Foreground" Value="White" />
  1104. </Trigger>
  1105. <MultiTrigger>
  1106. <MultiTrigger.Conditions>
  1107. <Condition Property="IsChecked" Value="false" />
  1108. <Condition Property="IsMouseOver" Value="True" />
  1109. </MultiTrigger.Conditions>
  1110. <MultiTrigger.Setters>
  1111. <Setter TargetName="border2" Property="Background" >
  1112. <Setter.Value>
  1113. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/leftImage.png" />
  1114. </Setter.Value>
  1115. </Setter>
  1116. </MultiTrigger.Setters>
  1117. </MultiTrigger>
  1118. </ControlTemplate.Triggers>
  1119. </ControlTemplate>
  1120. </Setter.Value>
  1121. </Setter>
  1122. </Style>
  1123. <Style x:Key="ExpanderStyle" TargetType="{x:Type Expander}">
  1124. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  1125. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  1126. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  1127. <Setter Property="BorderBrush" Value="Transparent" />
  1128. <Setter Property="BorderThickness" Value="1" />
  1129. <Setter Property="Template">
  1130. <Setter.Value>
  1131. <ControlTemplate TargetType="{x:Type Expander}">
  1132. <DockPanel Cursor="Hand">
  1133. <ToggleButton
  1134. x:Name="HeaderSite"
  1135. Height="60"
  1136. MinWidth="0"
  1137. MinHeight="0"
  1138. Margin="1"
  1139. Padding="{TemplateBinding Padding}"
  1140. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  1141. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  1142. Content="{TemplateBinding Header}"
  1143. ContentTemplate="{TemplateBinding HeaderTemplate}"
  1144. ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
  1145. DockPanel.Dock="Top"
  1146. FontFamily="{TemplateBinding FontFamily}"
  1147. FontSize="{TemplateBinding FontSize}"
  1148. FontStretch="{TemplateBinding FontStretch}"
  1149. FontStyle="{TemplateBinding FontStyle}"
  1150. FontWeight="{TemplateBinding FontWeight}"
  1151. Foreground="{TemplateBinding Foreground}"
  1152. IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  1153. Style="{StaticResource ToggleButtonStyle}" />
  1154. <ContentPresenter
  1155. x:Name="ExpandSite"
  1156. Margin="{TemplateBinding Padding}"
  1157. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1158. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1159. DockPanel.Dock="Left"
  1160. Focusable="false"
  1161. Visibility="Collapsed" />
  1162. </DockPanel>
  1163. <ControlTemplate.Triggers>
  1164. <Trigger Property="IsExpanded" Value="true">
  1165. <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
  1166. </Trigger>
  1167. </ControlTemplate.Triggers>
  1168. </ControlTemplate>
  1169. </Setter.Value>
  1170. </Setter>
  1171. </Style>
  1172. <!--#endregion-->
  1173. <!--#region RadioButton-->
  1174. <Style x:Key="RadioMiniButtonStyle" TargetType="{x:Type RadioButton}">
  1175. <Setter Property="Margin" Value="5,10,1,0" />
  1176. <Setter Property="Width" Value="160" />
  1177. <Setter Property="Height" Value="30" />
  1178. <Setter Property="Cursor" Value="Hand"/>
  1179. <Setter Property="FontSize" Value="14" />
  1180. <Setter Property="FontFamily" Value="粗体" />
  1181. <Setter Property="Foreground" Value="#DDD" />
  1182. <Setter Property="VerticalContentAlignment" Value="Center" />
  1183. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1184. <Setter Property="BorderBrush" Value="Transparent" />
  1185. <Setter Property="BorderThickness" Value="0" />
  1186. <Setter Property="Background" Value="#DDD" />
  1187. <Setter Property="HorizontalAlignment" Value="Right" />
  1188. <Setter Property="Template">
  1189. <Setter.Value>
  1190. <ControlTemplate TargetType="{x:Type RadioButton}">
  1191. <Grid
  1192. x:Name="templateRoot"
  1193. Background="Transparent"
  1194. SnapsToDevicePixels="True">
  1195. <Border x:Name="border2" />
  1196. <ContentPresenter
  1197. x:Name="contentPresenter"
  1198. Margin="{TemplateBinding Padding}"
  1199. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1200. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1201. Content="{TemplateBinding Content}"
  1202. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  1203. ContentTemplate="{TemplateBinding ContentTemplate}"
  1204. Focusable="False"
  1205. RecognizesAccessKey="True"
  1206. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1207. </Grid>
  1208. <ControlTemplate.Triggers>
  1209. <Trigger Property="HasContent" Value="True">
  1210. <Setter Property="FocusVisualStyle">
  1211. <Setter.Value>
  1212. <Style>
  1213. <Setter Property="Control.Template">
  1214. <Setter.Value>
  1215. <ControlTemplate>
  1216. <Rectangle
  1217. Margin="14,0,0,0"
  1218. SnapsToDevicePixels="True"
  1219. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  1220. StrokeDashArray="1 2"
  1221. StrokeThickness="1" />
  1222. </ControlTemplate>
  1223. </Setter.Value>
  1224. </Setter>
  1225. </Style>
  1226. </Setter.Value>
  1227. </Setter>
  1228. <Setter Property="Padding" Value="4,-1,0,0" />
  1229. </Trigger>
  1230. <Trigger Property="IsChecked" Value="{x:Null}" />
  1231. <Trigger Property="IsChecked" Value="true">
  1232. <Setter Property="Foreground" Value="White" />
  1233. <Setter TargetName="border2" Property="Background" Value="{StaticResource ResourceKey=leftImageSub}">
  1234. </Setter>
  1235. </Trigger>
  1236. <Trigger Property="IsChecked" Value="false">
  1237. <Setter TargetName="border2" Property="Background">
  1238. <Setter.Value>
  1239. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/矩形样式.png" />
  1240. </Setter.Value>
  1241. </Setter>
  1242. <Setter Property="Foreground" Value="#4B8EC4" />
  1243. </Trigger>
  1244. <MultiTrigger>
  1245. <MultiTrigger.Conditions>
  1246. <Condition Property="IsChecked" Value="false" />
  1247. <Condition Property="IsMouseOver" Value="True" />
  1248. </MultiTrigger.Conditions>
  1249. <MultiTrigger.Setters>
  1250. <Setter TargetName="border2" Property="Background" >
  1251. <Setter.Value>
  1252. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/leftImageSub.png" />
  1253. </Setter.Value>
  1254. </Setter>
  1255. </MultiTrigger.Setters>
  1256. </MultiTrigger>
  1257. </ControlTemplate.Triggers>
  1258. </ControlTemplate>
  1259. </Setter.Value>
  1260. </Setter>
  1261. </Style>
  1262. <!--#endregion-->
  1263. <!--#region ContextMenu-->
  1264. <!--自定义ContextMenu的外观样式-->
  1265. <Style TargetType="{x:Type ContextMenu}">
  1266. <Setter Property="SnapsToDevicePixels" Value="True"/>
  1267. <Setter Property="OverridesDefaultStyle" Value="True"/>
  1268. <Setter Property="Grid.IsSharedSizeScope" Value="True"/>
  1269. <Setter Property ="Focusable" Value="False"/>
  1270. <Setter Property="HasDropShadow" Value="True"/>
  1271. <Setter Property="Template">
  1272. <Setter.Value>
  1273. <ControlTemplate TargetType="{x:Type ContextMenu}">
  1274. <Border
  1275. Name="Border"
  1276. Background="#6EA0B0"
  1277. BorderBrush="#888888"
  1278. BorderThickness="1" >
  1279. <StackPanel IsItemsHost="True"
  1280. KeyboardNavigation.DirectionalNavigation="Cycle"/>
  1281. </Border>
  1282. <ControlTemplate.Triggers>
  1283. <Trigger Property="HasDropShadow" Value="true">
  1284. <Setter TargetName="Border" Property="Padding" Value="0,3,0,3"/>
  1285. <Setter TargetName="Border" Property="CornerRadius" Value="4"/>
  1286. </Trigger>
  1287. </ControlTemplate.Triggers>
  1288. </ControlTemplate>
  1289. </Setter.Value>
  1290. </Setter>
  1291. </Style>
  1292. <!--自定义菜单项之间的分隔符的样式-->
  1293. <Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="{x:Type Separator}">
  1294. <Setter Property="Height" Value="1"/>
  1295. <Setter Property="Margin" Value="0,4,0,4"/>
  1296. <Setter Property="Template">
  1297. <Setter.Value>
  1298. <ControlTemplate TargetType="{x:Type Separator}">
  1299. <Border BorderBrush="#331068A3" BorderThickness="1"/>
  1300. </ControlTemplate>
  1301. </Setter.Value>
  1302. </Setter>
  1303. </Style>
  1304. <!-- TopLevelHeader -->
  1305. <ControlTemplate x:Key="{x:Static MenuItem.TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
  1306. <Border Name="Border" Margin="30,0,0,0" >
  1307. <Grid>
  1308. <ContentPresenter
  1309. ContentSource="Header"
  1310. RecognizesAccessKey="True"
  1311. HorizontalAlignment="Center"
  1312. VerticalAlignment="Center"/>
  1313. <Popup
  1314. Name="Popup"
  1315. Placement="Bottom"
  1316. IsOpen="{TemplateBinding IsSubmenuOpen}"
  1317. AllowsTransparency="True"
  1318. Focusable="False"
  1319. PopupAnimation="Slide">
  1320. <Border
  1321. Name="SubmenuBorder"
  1322. SnapsToDevicePixels="True"
  1323. Background="#7F0E4E8D"
  1324. BorderBrush="Transparent"
  1325. BorderThickness="1" >
  1326. <StackPanel
  1327. IsItemsHost="True"
  1328. KeyboardNavigation.DirectionalNavigation="Cycle" />
  1329. </Border>
  1330. </Popup>
  1331. </Grid>
  1332. </Border>
  1333. <ControlTemplate.Triggers>
  1334. <Trigger Property="IsSuspendingPopupAnimation" Value="true">
  1335. <Setter TargetName="Popup" Property="PopupAnimation" Value="None"/>
  1336. </Trigger>
  1337. <Trigger Property="IsHighlighted" Value="true">
  1338. <Setter TargetName="Border" Property="Background">
  1339. <Setter.Value>
  1340. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/leftImage.png"/>
  1341. </Setter.Value>
  1342. </Setter>
  1343. <Setter TargetName="Border" Property="BorderBrush" Value="Transparent"/>
  1344. </Trigger>
  1345. <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True">
  1346. <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="0,0,4,4"/>
  1347. <Setter TargetName="SubmenuBorder" Property="Padding" Value="0,0,0,3"/>
  1348. </Trigger>
  1349. <Trigger Property="IsEnabled" Value="False">
  1350. <Setter Property="Foreground" Value="#ffffffff"/>
  1351. </Trigger>
  1352. </ControlTemplate.Triggers>
  1353. </ControlTemplate>
  1354. <!-- TopLevelItem -->
  1355. <ControlTemplate
  1356. x:Key="{x:Static MenuItem.TopLevelItemTemplateKey}"
  1357. TargetType="{x:Type MenuItem}">
  1358. <Border Name="Border" Margin="30,0,0,0">
  1359. <Grid>
  1360. <ContentPresenter
  1361. ContentSource="Header"
  1362. RecognizesAccessKey="True"
  1363. HorizontalAlignment="Center"
  1364. VerticalAlignment="Center"/>
  1365. </Grid>
  1366. </Border>
  1367. <ControlTemplate.Triggers>
  1368. <Trigger Property="IsHighlighted" Value="true">
  1369. <Setter TargetName="Border" Property="Background">
  1370. <Setter.Value>
  1371. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/leftImage.png"/>
  1372. </Setter.Value>
  1373. </Setter>
  1374. <Setter TargetName="Border" Property="BorderBrush" Value="Transparent"/>
  1375. </Trigger>
  1376. <Trigger Property="IsEnabled" Value="False">
  1377. <Setter Property="Foreground" Value="#ffffffff"/>
  1378. </Trigger>
  1379. </ControlTemplate.Triggers>
  1380. </ControlTemplate>
  1381. <!-- SubmenuItem 自定义菜单项的外观样式-->
  1382. <ControlTemplate
  1383. x:Key="{x:Static MenuItem.SubmenuItemTemplateKey}"
  1384. TargetType="{x:Type MenuItem}">
  1385. <Border Name="Border" >
  1386. <Grid >
  1387. <Grid.ColumnDefinitions>
  1388. <ColumnDefinition Width="Auto" SharedSizeGroup="Icon"/>
  1389. <ColumnDefinition Width="*" />
  1390. <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut"/>
  1391. <ColumnDefinition Width="13"/>
  1392. </Grid.ColumnDefinitions>
  1393. <ContentPresenter
  1394. Name="Icon"
  1395. Margin="6,2,6,2"
  1396. HorizontalAlignment="Stretch"
  1397. VerticalAlignment="Stretch"
  1398. ContentSource="Icon"/>
  1399. <Border
  1400. Name="Check"
  1401. Width="13" Height="13"
  1402. Visibility="Hidden"
  1403. Margin="6,0,6,0"
  1404. Background="#331068A3"
  1405. BorderThickness="1"
  1406. BorderBrush="#331068A3">
  1407. <Path
  1408. Name="CheckMark"
  1409. Width="7" Height="7"
  1410. Visibility="Visible"
  1411. SnapsToDevicePixels="False"
  1412. Stroke="#331068A3"
  1413. StrokeThickness="1"
  1414. Data="M 0 0 L 7 7 M 0 7 L 7 0" />
  1415. </Border>
  1416. <ContentPresenter
  1417. Name="HeaderHost"
  1418. Grid.Column="1"
  1419. ContentSource="Header"
  1420. RecognizesAccessKey="True"/>
  1421. <TextBlock x:Name="InputGestureText"
  1422. Grid.Column="2"
  1423. Background="#331068A3"
  1424. Text="{TemplateBinding InputGestureText}"
  1425. Margin="5,2,0,2"
  1426. DockPanel.Dock="Right" />
  1427. </Grid>
  1428. </Border>
  1429. <ControlTemplate.Triggers>
  1430. <Trigger Property="Icon" Value="{x:Null}">
  1431. <Setter TargetName="Icon" Property="Visibility" Value="Hidden"/>
  1432. </Trigger>
  1433. <Trigger Property="IsChecked" Value="true">
  1434. <Setter TargetName="CheckMark" Property="Visibility" Value="Visible"/>
  1435. </Trigger>
  1436. <Trigger Property="IsCheckable" Value="true">
  1437. <Setter TargetName="Check" Property="Visibility" Value="Hidden"/>
  1438. <Setter TargetName="Icon" Property="Visibility" Value="Hidden"/>
  1439. </Trigger>
  1440. <!--选中菜单项时的高亮颜色的trigger设置-->
  1441. <Trigger Property="IsHighlighted" Value="true">
  1442. <Setter TargetName="Border" Property="Background">
  1443. <Setter.Value>
  1444. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/leftImage.png"/>
  1445. </Setter.Value>
  1446. </Setter>
  1447. </Trigger>
  1448. <Trigger Property="IsEnabled" Value="false">
  1449. <Setter Property="Foreground" Value="Yellow"/>
  1450. </Trigger>
  1451. </ControlTemplate.Triggers>
  1452. </ControlTemplate>
  1453. <!-- SubmenuHeader -->
  1454. <ControlTemplate
  1455. x:Key="{x:Static MenuItem.SubmenuHeaderTemplateKey}"
  1456. TargetType="{x:Type MenuItem}">
  1457. <Border Name="Border" >
  1458. <Grid>
  1459. <Grid.ColumnDefinitions>
  1460. <ColumnDefinition Width="Auto" SharedSizeGroup="Icon"/>
  1461. <ColumnDefinition Width="*" />
  1462. <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut"/>
  1463. <ColumnDefinition Width="13"/>
  1464. </Grid.ColumnDefinitions>
  1465. <ContentPresenter
  1466. Name="Icon"
  1467. Margin="6,0,6,0"
  1468. HorizontalAlignment="Stretch"
  1469. VerticalAlignment="Stretch"
  1470. ContentSource="Icon"/>
  1471. <ContentPresenter
  1472. Name="HeaderHost"
  1473. Grid.Column="1"
  1474. ContentSource="Header"
  1475. RecognizesAccessKey="True"/>
  1476. <TextBlock x:Name="InputGestureText"
  1477. Grid.Column="2"
  1478. Text="{TemplateBinding InputGestureText}"
  1479. Margin="5,2,2,2"
  1480. DockPanel.Dock="Right"/>
  1481. <Path
  1482. Grid.Column="3"
  1483. HorizontalAlignment="Center"
  1484. VerticalAlignment="Center"
  1485. Data="M 0 0 L 0 7 L 4 3.5 Z"
  1486. Fill="#331068A3" />
  1487. <Popup
  1488. Name="Popup"
  1489. Placement="Left"
  1490. HorizontalOffset="-4"
  1491. IsOpen="{TemplateBinding IsSubmenuOpen}"
  1492. AllowsTransparency="True"
  1493. Focusable="False"
  1494. PopupAnimation="Slide">
  1495. <Border
  1496. Name="SubmenuBorder"
  1497. SnapsToDevicePixels="True"
  1498. Background="#331068A3"
  1499. BorderBrush="#331068A3"
  1500. BorderThickness="1" >
  1501. <StackPanel
  1502. IsItemsHost="True"
  1503. KeyboardNavigation.DirectionalNavigation="Cycle" />
  1504. </Border>
  1505. </Popup>
  1506. </Grid>
  1507. </Border>
  1508. <ControlTemplate.Triggers>
  1509. <Trigger Property="Icon" Value="{x:Null}">
  1510. <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
  1511. </Trigger>
  1512. <Trigger Property="IsHighlighted" Value="true">
  1513. <Setter TargetName="Border" Property="Background">
  1514. <Setter.Value>
  1515. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/leftImage.png"/>
  1516. </Setter.Value>
  1517. </Setter>
  1518. </Trigger>
  1519. <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True">
  1520. <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="4"/>
  1521. <Setter TargetName="SubmenuBorder" Property="Padding" Value="0,3,0,3"/>
  1522. </Trigger>
  1523. <Trigger Property="IsEnabled" Value="false">
  1524. <Setter Property="Foreground" Value="#ffffffff"/>
  1525. </Trigger>
  1526. </ControlTemplate.Triggers>
  1527. </ControlTemplate>
  1528. <!-- MenuItem Style -->
  1529. <Style x:Key="{x:Type MenuItem}" TargetType="{x:Type MenuItem}">
  1530. <Setter Property="OverridesDefaultStyle" Value="True"/>
  1531. <Style.Triggers>
  1532. <Trigger Property="Role" Value="TopLevelHeader">
  1533. <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelHeaderTemplateKey}}"/>
  1534. <Setter Property="Grid.IsSharedSizeScope" Value="true"/>
  1535. </Trigger>
  1536. <Trigger Property="Role" Value="TopLevelItem">
  1537. <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelItemTemplateKey}}"/>
  1538. </Trigger>
  1539. <Trigger Property="Role" Value="SubmenuHeader">
  1540. <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuHeaderTemplateKey}}"/>
  1541. </Trigger>
  1542. <Trigger Property="Role" Value="SubmenuItem">
  1543. <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuItemTemplateKey}}"/>
  1544. </Trigger>
  1545. </Style.Triggers>
  1546. </Style>
  1547. <!--#endregion-->
  1548. <!--#region RadioButton -->
  1549. <Style x:Key="CheckRadioFocusVisual">
  1550. <Setter Property="Control.Template">
  1551. <Setter.Value>
  1552. <ControlTemplate>
  1553. <Rectangle Margin="14,0,0,0" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
  1554. </ControlTemplate>
  1555. </Setter.Value>
  1556. </Setter>
  1557. </Style>
  1558. <Style TargetType="{x:Type RadioButton}">
  1559. <Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}"/>
  1560. <Setter Property="Foreground" Value="{DynamicResource foreground}"/>
  1561. <Setter Property="VerticalContentAlignment" Value="Center"/>
  1562. <Setter Property="Background" >
  1563. <Setter.Value>
  1564. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/btn_normal.png"/>
  1565. </Setter.Value>
  1566. </Setter>
  1567. <Setter Property="Padding" Value="2,0,0,0"/>
  1568. <Setter Property="Template">
  1569. <Setter.Value>
  1570. <ControlTemplate TargetType="{x:Type RadioButton}">
  1571. <BulletDecorator Background="Transparent" VerticalAlignment="Center">
  1572. <BulletDecorator.Bullet>
  1573. <Grid >
  1574. <Ellipse x:Name="Border" Fill="{TemplateBinding Background}" Height="10" Width="10">
  1575. </Ellipse>
  1576. <Ellipse x:Name="Dot" Height="5" Visibility="Hidden" Width="5" Fill="#ff8a03"/>
  1577. </Grid>
  1578. </BulletDecorator.Bullet>
  1579. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  1580. </BulletDecorator>
  1581. <ControlTemplate.Triggers>
  1582. <Trigger Property="IsChecked" Value="true">
  1583. <Setter Property="Visibility" TargetName="Dot" Value="Visible"/>
  1584. </Trigger>
  1585. <Trigger Property="IsChecked" Value="False">
  1586. <Setter Property="Visibility" TargetName="Dot" Value="Collapsed"/>
  1587. </Trigger>
  1588. <Trigger Property="IsChecked" Value="{x:Null}">
  1589. <Setter Property="Visibility" TargetName="Dot" Value="Collapsed"/>
  1590. </Trigger>
  1591. <Trigger Property="IsPressed" Value="true">
  1592. <Setter Property="Fill" TargetName="Border" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
  1593. </Trigger>
  1594. <Trigger Property="IsEnabled" Value="false">
  1595. <Setter Property="Fill" TargetName="Border" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
  1596. <Setter Property="Fill" TargetName="Dot" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  1597. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  1598. </Trigger>
  1599. </ControlTemplate.Triggers>
  1600. </ControlTemplate>
  1601. </Setter.Value>
  1602. </Setter>
  1603. </Style>
  1604. <!--#endregion-->
  1605. <!--#region CheckBox -->
  1606. <Style TargetType="{x:Type CheckBox}">
  1607. <Setter Property="Foreground" Value="{DynamicResource foreground}"/>
  1608. <Setter Property="Background" Value="#FFF4F4F4"/>
  1609. <Setter Property="BorderBrush" Value="#FF8E8F8F"/>
  1610. <Setter Property="BorderThickness" Value="1"/>
  1611. <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
  1612. <Setter Property="FocusVisualStyle">
  1613. <Setter.Value>
  1614. <Style>
  1615. <Setter Property="Control.Template">
  1616. <Setter.Value>
  1617. <ControlTemplate>
  1618. <Rectangle Margin="1" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
  1619. </ControlTemplate>
  1620. </Setter.Value>
  1621. </Setter>
  1622. </Style>
  1623. </Setter.Value>
  1624. </Setter>
  1625. <Setter Property="Template">
  1626. <Setter.Value>
  1627. <ControlTemplate TargetType="{x:Type CheckBox}">
  1628. <StackPanel Background="Transparent" SnapsToDevicePixels="True" Orientation="Horizontal">
  1629. <Image x:Name="image1" Source="Image/Cb_HalfChecked.png" Width="12" Height="14"></Image>
  1630. <ContentPresenter Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  1631. </StackPanel>
  1632. <ControlTemplate.Triggers>
  1633. <Trigger Property="HasContent" Value="True">
  1634. <Setter Property="FocusVisualStyle">
  1635. <Setter.Value>
  1636. <Style>
  1637. <Setter Property="Control.Template">
  1638. <Setter.Value>
  1639. <ControlTemplate>
  1640. <Rectangle Margin="14,0,0,0" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
  1641. </ControlTemplate>
  1642. </Setter.Value>
  1643. </Setter>
  1644. </Style>
  1645. </Setter.Value>
  1646. </Setter>
  1647. <Setter Property="Padding" Value="4,0,0,0"/>
  1648. </Trigger>
  1649. <Trigger Property="IsEnabled" Value="False">
  1650. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  1651. </Trigger>
  1652. <Trigger Property="IsChecked" Value="true">
  1653. <Setter TargetName="image1" Property="Source" Value="Image/Cb_Checked.png"/>
  1654. </Trigger>
  1655. <Trigger Property="IsChecked" Value="{x:Null}">
  1656. <Setter TargetName="image1" Property="Source" Value="Image/Cb_HalfChecked.png"/>
  1657. </Trigger>
  1658. </ControlTemplate.Triggers>
  1659. </ControlTemplate>
  1660. </Setter.Value>
  1661. </Setter>
  1662. </Style>
  1663. <!--#endregion-->
  1664. <!--#region TextBox -->
  1665. <Style TargetType="{x:Type TextBox}">
  1666. <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"/>
  1667. <Setter Property="BorderThickness" Value="1"/>
  1668. <Setter Property="Padding" Value="1"/>
  1669. <Setter Property="Foreground" Value="{DynamicResource foreground}"/>
  1670. <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
  1671. <Setter Property="VerticalContentAlignment" Value="Center"/>
  1672. <Setter Property="Height" Value="24"/>
  1673. <Setter Property="HorizontalContentAlignment" Value="Left"/>
  1674. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  1675. <Setter Property="AllowDrop" Value="true"/>
  1676. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  1677. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  1678. <Setter Property="Template">
  1679. <Setter.Value>
  1680. <ControlTemplate TargetType="{x:Type TextBox}">
  1681. <Themes1:ClassicBorderDecorator x:Name="Bd" BorderThickness="1" BorderStyle="None" BorderBrush="#08335f">
  1682. <ScrollViewer x:Name="PART_ContentHost"/>
  1683. </Themes1:ClassicBorderDecorator>
  1684. <ControlTemplate.Triggers>
  1685. <Trigger Property="IsEnabled" Value="false">
  1686. <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
  1687. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  1688. </Trigger>
  1689. </ControlTemplate.Triggers>
  1690. </ControlTemplate>
  1691. </Setter.Value>
  1692. </Setter>
  1693. <Style.Triggers>
  1694. <MultiTrigger>
  1695. <MultiTrigger.Conditions>
  1696. <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true"/>
  1697. <Condition Property="IsSelectionActive" Value="false"/>
  1698. </MultiTrigger.Conditions>
  1699. <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
  1700. </MultiTrigger>
  1701. </Style.Triggers>
  1702. </Style>
  1703. <!--#endregion-->
  1704. <!--#region ComboBox -->
  1705. <Style x:Key="ComboBoxFocusVisual">
  1706. <Setter Property="Control.Template">
  1707. <Setter.Value>
  1708. <ControlTemplate>
  1709. <Rectangle StrokeDashArray="1 2" StrokeThickness="1" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" Margin="4,4,21,4"/>
  1710. </ControlTemplate>
  1711. </Setter.Value>
  1712. </Setter>
  1713. </Style>
  1714. <Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
  1715. <Style x:Key="ComboBoxTransparentButtonStyle" TargetType="{x:Type ToggleButton}">
  1716. <Setter Property="MinWidth" Value="0"/>
  1717. <Setter Property="MinHeight" Value="0"/>
  1718. <Setter Property="Width" Value="Auto"/>
  1719. <Setter Property="Height" Value="Auto"/>
  1720. <Setter Property="Background" Value="Transparent"/>
  1721. <Setter Property="Foreground" Value="White"/>
  1722. <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"/>
  1723. <Setter Property="BorderThickness" Value="2"/>
  1724. <Setter Property="Template">
  1725. <Setter.Value>
  1726. <ControlTemplate TargetType="{x:Type ToggleButton}">
  1727. <DockPanel Background="{TemplateBinding Background}" LastChildFill="false" SnapsToDevicePixels="true">
  1728. <Themes1:ClassicBorderDecorator x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" BorderStyle="None" DockPanel.Dock="Right" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
  1729. <Path Data="{StaticResource DownArrowGeometry}" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  1730. </Themes1:ClassicBorderDecorator>
  1731. </DockPanel>
  1732. <ControlTemplate.Triggers>
  1733. <Trigger Property="IsChecked" Value="true">
  1734. <Setter Property="BorderStyle" TargetName="Border" Value="AltPressed"/>
  1735. </Trigger>
  1736. </ControlTemplate.Triggers>
  1737. </ControlTemplate>
  1738. </Setter.Value>
  1739. </Setter>
  1740. <Style.Triggers>
  1741. <Trigger Property="IsEnabled" Value="false">
  1742. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
  1743. </Trigger>
  1744. </Style.Triggers>
  1745. </Style>
  1746. <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
  1747. <Setter Property="OverridesDefaultStyle" Value="true"/>
  1748. <Setter Property="AllowDrop" Value="true"/>
  1749. <Setter Property="MinWidth" Value="0"/>
  1750. <Setter Property="Foreground" Value="{DynamicResource foreground}"/>
  1751. <Setter Property="MinHeight" Value="0"/>
  1752. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  1753. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  1754. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  1755. <Setter Property="Template">
  1756. <Setter.Value>
  1757. <ControlTemplate TargetType="{x:Type TextBox}">
  1758. <ScrollViewer x:Name="PART_ContentHost" Background="Transparent" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
  1759. </ControlTemplate>
  1760. </Setter.Value>
  1761. </Setter>
  1762. </Style>
  1763. <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
  1764. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  1765. <Grid>
  1766. <Themes1:ClassicBorderDecorator x:Name="Border" BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" BorderThickness="2" BorderStyle="None">
  1767. <Popup x:Name="PART_Popup" AllowsTransparency="true" Focusable="False" IsOpen="{TemplateBinding IsDropDownOpen}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
  1768. <Themes1:SystemDropShadowChrome x:Name="Shdw" Color="Transparent" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=Border}">
  1769. <Border x:Name="DropDownBorder" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1" >
  1770. <Border.Background>
  1771. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png" Stretch="Fill" Opacity="0.5"/>
  1772. </Border.Background>
  1773. <ScrollViewer x:Name="DropDownScrollViewer">
  1774. <Grid RenderOptions.ClearTypeHint="Enabled">
  1775. <Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
  1776. <Rectangle x:Name="OpaqueRect" Fill="{Binding Background, ElementName=DropDownBorder}" Height="{Binding ActualHeight, ElementName=DropDownBorder}" Width="{Binding ActualWidth, ElementName=DropDownBorder}"/>
  1777. </Canvas>
  1778. <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  1779. </Grid>
  1780. </ScrollViewer>
  1781. </Border>
  1782. </Themes1:SystemDropShadowChrome>
  1783. </Popup>
  1784. </Themes1:ClassicBorderDecorator>
  1785. <ToggleButton ClickMode="Press" Focusable="false" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" MinWidth="0" MinHeight="0" Style="{StaticResource ComboBoxTransparentButtonStyle}" Width="Auto"/>
  1786. <DockPanel>
  1787. <FrameworkElement DockPanel.Dock="Right" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
  1788. <TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
  1789. </DockPanel>
  1790. </Grid>
  1791. </Border>
  1792. <ControlTemplate.Triggers>
  1793. <Trigger Property="HasItems" Value="false">
  1794. <Setter Property="MinHeight" TargetName="DropDownBorder" Value="95"/>
  1795. </Trigger>
  1796. <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
  1797. <Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
  1798. <Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
  1799. </Trigger>
  1800. <Trigger Property="IsEnabled" Value="false">
  1801. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  1802. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
  1803. </Trigger>
  1804. <MultiTrigger>
  1805. <MultiTrigger.Conditions>
  1806. <Condition Property="IsGrouping" Value="true"/>
  1807. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
  1808. </MultiTrigger.Conditions>
  1809. <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
  1810. </MultiTrigger>
  1811. <Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
  1812. <Setter Property="Canvas.Top" TargetName="OpaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
  1813. <Setter Property="Canvas.Left" TargetName="OpaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
  1814. </Trigger>
  1815. </ControlTemplate.Triggers>
  1816. </ControlTemplate>
  1817. <Style x:Key="BaseComboBoxStyle" TargetType="{x:Type ComboBox}">
  1818. <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}"/>
  1819. <Setter Property="Foreground" Value="White"/>
  1820. <Setter Property="Background" Value="Transparent"/>
  1821. <Setter Property="BorderBrush" Value="#08335f"/>
  1822. <Setter Property="BorderThickness" Value="1"/>
  1823. <Setter Property="Margin" Value="0,0,0,0"/>
  1824. <Setter Property="Padding" Value="0"/>
  1825. <Setter Property="Height" Value="24"/>
  1826. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
  1827. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
  1828. <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
  1829. <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
  1830. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  1831. <Setter Property="VerticalContentAlignment" Value="Center"/>
  1832. <Setter Property="IsTextSearchCaseSensitive" Value="true"/>
  1833. <Setter Property="IsEditable" Value="true"/>
  1834. <Setter Property="StaysOpenOnEdit" Value="true"/>
  1835. <Setter Property="Template">
  1836. <Setter.Value>
  1837. <ControlTemplate TargetType="{x:Type ComboBox}">
  1838. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  1839. <Grid>
  1840. <Themes1:ClassicBorderDecorator x:Name="Border" BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" BorderThickness="2" BorderStyle="None">
  1841. <Popup x:Name="PART_Popup" AllowsTransparency="true" Focusable="False" IsOpen="{TemplateBinding IsDropDownOpen}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
  1842. <Themes1:SystemDropShadowChrome x:Name="Shdw" Color="Transparent" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=Border}">
  1843. <Border x:Name="DropDownBorder" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1" >
  1844. <Border.Background>
  1845. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png"/>
  1846. </Border.Background>
  1847. <ScrollViewer x:Name="DropDownScrollViewer">
  1848. <Grid RenderOptions.ClearTypeHint="Enabled">
  1849. <Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
  1850. <Rectangle x:Name="OpaqueRect" Fill="{Binding Background, ElementName=DropDownBorder}" Height="{Binding ActualHeight, ElementName=DropDownBorder}" Width="{Binding ActualWidth, ElementName=DropDownBorder}"/>
  1851. </Canvas>
  1852. <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  1853. </Grid>
  1854. </ScrollViewer>
  1855. </Border>
  1856. </Themes1:SystemDropShadowChrome>
  1857. </Popup>
  1858. </Themes1:ClassicBorderDecorator>
  1859. <DockPanel Margin="2">
  1860. <FrameworkElement DockPanel.Dock="Right" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
  1861. <Border x:Name="SelectedItemBorder" Margin="{TemplateBinding Padding}">
  1862. <ContentPresenter ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" Content="{TemplateBinding SelectionBoxItem}" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1,1,1,1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  1863. </Border>
  1864. </DockPanel>
  1865. <ToggleButton ClickMode="Press" Focusable="false" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="2" MinWidth="0" MinHeight="0" Style="{StaticResource ComboBoxTransparentButtonStyle}" Width="Auto"/>
  1866. </Grid>
  1867. </Border>
  1868. <ControlTemplate.Triggers>
  1869. <MultiTrigger>
  1870. <MultiTrigger.Conditions>
  1871. <!--<Condition Property="IsSelectionBoxHighlighted" Value="true"/>-->
  1872. <Condition Property="IsDropDownOpen" Value="false"/>
  1873. </MultiTrigger.Conditions>
  1874. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
  1875. </MultiTrigger>
  1876. <!--<Trigger Property="IsSelectionBoxHighlighted" Value="true">
  1877. <Setter Property="Background" TargetName="SelectedItemBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  1878. </Trigger>-->
  1879. <Trigger Property="HasItems" Value="false">
  1880. <Setter Property="MinHeight" TargetName="DropDownBorder" Value="95"/>
  1881. </Trigger>
  1882. <Trigger Property="IsEnabled" Value="false">
  1883. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  1884. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
  1885. </Trigger>
  1886. <MultiTrigger>
  1887. <MultiTrigger.Conditions>
  1888. <Condition Property="IsGrouping" Value="true"/>
  1889. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
  1890. </MultiTrigger.Conditions>
  1891. <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
  1892. </MultiTrigger>
  1893. <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
  1894. <Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
  1895. <Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
  1896. </Trigger>
  1897. <Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
  1898. <Setter Property="Canvas.Top" TargetName="OpaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
  1899. <Setter Property="Canvas.Left" TargetName="OpaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
  1900. </Trigger>
  1901. </ControlTemplate.Triggers>
  1902. </ControlTemplate>
  1903. </Setter.Value>
  1904. </Setter>
  1905. <Style.Triggers>
  1906. <Trigger Property="IsEditable" Value="true">
  1907. <Setter Property="IsTabStop" Value="false"/>
  1908. <Setter Property="Padding" Value="1"/>
  1909. <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
  1910. </Trigger>
  1911. </Style.Triggers>
  1912. </Style>
  1913. <Style TargetType="ComboBox" BasedOn="{StaticResource BaseComboBoxStyle}"></Style>
  1914. <!--#endregion-->
  1915. <!--#region ColorCommboxStyle -->
  1916. <ObjectDataProvider ObjectInstance="{x:Type Colors}" MethodName="GetProperties" x:Key="colorPropertieOdp"></ObjectDataProvider>
  1917. <Style x:Key="ColorCommboxStyle" TargetType="ComboBox" BasedOn="{StaticResource BaseComboBoxStyle}">
  1918. <Setter Property="IsTextSearchCaseSensitive" Value="False"/>
  1919. <Setter Property="IsEditable" Value="False"/>
  1920. <Setter Property="StaysOpenOnEdit" Value="False"/>
  1921. <Setter Property="ItemsSource" Value="{Binding Source={StaticResource colorPropertieOdp}}"></Setter>
  1922. <Setter Property="ItemTemplate">
  1923. <Setter.Value>
  1924. <DataTemplate>
  1925. <StackPanel Orientation="Horizontal">
  1926. <Rectangle Fill="{Binding Name}" Width="40" Height="10"></Rectangle>
  1927. <TextBlock Text="{Binding Name}"></TextBlock>
  1928. </StackPanel>
  1929. </DataTemplate>
  1930. </Setter.Value>
  1931. </Setter>
  1932. </Style>
  1933. <!--#endregion-->
  1934. </ResourceDictionary>