终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GenricStyle.xaml 131 KiB

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