终端一体化运控平台
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Generic.xaml 195 KiB

2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389
  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
  5. xmlns:Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
  6. xmlns:con="clr-namespace:BPASmartClient.SCADAControl.Converters"
  7. xmlns:ctrl="clr-namespace:BPASmartClient.SCADAControl.CustomerControls"
  8. xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore">
  9. <SolidColorBrush x:Key="AccentBrush" Color="#2B79E2" />
  10. <SolidColorBrush x:Key="ControlBorderBrush" Color="LightGray" />
  11. <SolidColorBrush x:Key="ControlBackground" Color="White" />
  12. <SolidColorBrush x:Key="ControlForeground" Color="Black" />
  13. <SolidColorBrush x:Key="foreground" Color="#a2c2e8" />
  14. <SolidColorBrush x:Key="borderBrush" Color="#FF074B92" />
  15. <SolidColorBrush x:Key="Titleforeground" Color="#FF07D7FF" />
  16. <SolidColorBrush x:Key="DataGridColumnHeaderColor" Color="#00c2f4" />
  17. <SolidColorBrush x:Key="LabelColor" Color="#FF00EEF3" />
  18. <SolidColorBrush x:Key="MainTitleforeground" Color="#feffff" />
  19. <SolidColorBrush x:Key="ButtonSelectForeground" Color="#4fade8" />
  20. <SolidColorBrush x:Key="ButtonUnSelectForeground" Color="#3afdff" />
  21. <SolidColorBrush x:Key="MeunSelectForeground" Color="#8f723c" />
  22. <SolidColorBrush x:Key="MeunUnSelectForeground" Color="White" />
  23. <LinearGradientBrush x:Key="NormalBackground" StartPoint="0.5,0" EndPoint="0.5,1">
  24. <GradientStopCollection>
  25. <GradientStop Color="White" />
  26. <GradientStop Offset="0.5" Color="#D0D0D0" />
  27. <GradientStop Offset="1" Color="#E3E3E3" />
  28. </GradientStopCollection>
  29. </LinearGradientBrush>
  30. <con:HalfNumberConverter x:Key="HalfNumber" />
  31. <FontFamily x:Key="Digital">
  32. pack://application:,,,/Fonts/#DS-Digital
  33. </FontFamily>
  34. <Style TargetType="{x:Type ctrl:ArcGauge}">
  35. <Setter Property="Background" Value="#646464" />
  36. <Setter Property="Foreground" Value="Black" />
  37. <Setter Property="Template">
  38. <Setter.Value>
  39. <ControlTemplate TargetType="{x:Type ctrl:ArcGauge}">
  40. <Border Margin="10">
  41. <Grid Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}">
  42. <Ellipse Fill="#FF3B3B3B" />
  43. <Grid Margin="2" RenderTransformOrigin="0.5,0.5">
  44. <Grid.RenderTransform>
  45. <TransformGroup>
  46. <RotateTransform Angle="{Binding Path=Angle, ElementName=PointRotate}" />
  47. </TransformGroup>
  48. </Grid.RenderTransform>
  49. <Ellipse
  50. Width="16"
  51. Height="14"
  52. VerticalAlignment="Top"
  53. Fill="Orange">
  54. <Ellipse.Effect>
  55. <BlurEffect Radius="12" />
  56. </Ellipse.Effect>
  57. </Ellipse>
  58. </Grid>
  59. <Grid
  60. x:Name="bdGrid"
  61. Margin="12"
  62. ClipToBounds="True"
  63. UseLayoutRounding="True">
  64. <Ellipse>
  65. <Ellipse.Fill>
  66. <RadialGradientBrush>
  67. <GradientStop Color="#4D000000" />
  68. </RadialGradientBrush>
  69. </Ellipse.Fill>
  70. </Ellipse>
  71. <Grid>
  72. <Grid.ColumnDefinitions>
  73. <ColumnDefinition />
  74. <ColumnDefinition Width="2*" />
  75. <ColumnDefinition />
  76. </Grid.ColumnDefinitions>
  77. <Grid.RowDefinitions>
  78. <RowDefinition />
  79. <RowDefinition Height="2*" />
  80. <RowDefinition />
  81. </Grid.RowDefinitions>
  82. <Ellipse
  83. Grid.Row="1"
  84. Grid.Column="1"
  85. Stroke="#464646"
  86. StrokeThickness="1" />
  87. <Ellipse
  88. Grid.Row="1"
  89. Grid.Column="1"
  90. Margin="4"
  91. Stroke="#959595"
  92. StrokeThickness="6" />
  93. <Ellipse
  94. Grid.Row="1"
  95. Grid.Column="1"
  96. Margin="14"
  97. Stroke="#464646"
  98. StrokeThickness="1" />
  99. </Grid>
  100. <Grid>
  101. <Grid.RowDefinitions>
  102. <RowDefinition />
  103. <RowDefinition />
  104. </Grid.RowDefinitions>
  105. <Path
  106. Margin="0,30,0,0"
  107. HorizontalAlignment="Center"
  108. Data="M5,0 5,0 10,120 0,120z"
  109. Fill="#0FA9CE"
  110. RenderTransformOrigin="0.5,1"
  111. Stretch="Uniform">
  112. <Path.RenderTransform>
  113. <TransformGroup>
  114. <RotateTransform x:Name="PointRotate" />
  115. </TransformGroup>
  116. </Path.RenderTransform>
  117. </Path>
  118. </Grid>
  119. <Ellipse
  120. Width="28"
  121. Height="28"
  122. Fill="Black">
  123. <Ellipse.Effect>
  124. <DropShadowEffect
  125. BlurRadius="16"
  126. Direction="0"
  127. ShadowDepth="0"
  128. Color="#0FA9CE" />
  129. </Ellipse.Effect>
  130. </Ellipse>
  131. <Border
  132. Margin="0,0,0,12"
  133. Padding="4,2"
  134. HorizontalAlignment="Center"
  135. VerticalAlignment="Bottom"
  136. Background="Black"
  137. BorderBrush="#10ABD1"
  138. BorderThickness="2">
  139. <TextBlock
  140. Width="46"
  141. FontSize="16"
  142. Foreground="White"
  143. Text="{Binding Value, RelativeSource={RelativeSource Mode=TemplatedParent}, StringFormat={}{0:f1}}"
  144. TextAlignment="Center" />
  145. </Border>
  146. </Grid>
  147. </Grid>
  148. </Border>
  149. </ControlTemplate>
  150. </Setter.Value>
  151. </Setter>
  152. </Style>
  153. <Style TargetType="{x:Type ctrl:SwitchButton}">
  154. <Setter Property="Background" Value="{StaticResource ControlBackground}" />
  155. <Setter Property="BorderBrush" Value="LightGray" />
  156. <Setter Property="Foreground" Value="Gray" />
  157. <Setter Property="BorderThickness" Value="0" />
  158. <Setter Property="Template">
  159. <Setter.Value>
  160. <ControlTemplate TargetType="ctrl:SwitchButton">
  161. <Border
  162. Background="{TemplateBinding Background}"
  163. BorderBrush="{TemplateBinding BorderBrush}"
  164. BorderThickness="{TemplateBinding BorderThickness}"
  165. CornerRadius="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ActualHeight, Converter={StaticResource HalfNumber}}">
  166. <Grid>
  167. <Ellipse
  168. x:Name="ELLIPSE"
  169. HorizontalAlignment="Left"
  170. VerticalAlignment="Center"
  171. Fill="Gray"
  172. RenderTransformOrigin="0.5,0.5"
  173. Stroke="{StaticResource ControlBorderBrush}"
  174. StrokeThickness="1">
  175. <Ellipse.RenderTransform>
  176. <TransformGroup>
  177. <TranslateTransform x:Name="TranslateX" X="2" />
  178. </TransformGroup>
  179. </Ellipse.RenderTransform>
  180. </Ellipse>
  181. </Grid>
  182. </Border>
  183. </ControlTemplate>
  184. </Setter.Value>
  185. </Setter>
  186. </Style>
  187. <Style x:Key="swith_button" TargetType="{x:Type ctrl:SwitchButton}">
  188. <Setter Property="Background" Value="{StaticResource ControlBackground}" />
  189. <Setter Property="BorderBrush" Value="LightGray" />
  190. <Setter Property="Foreground" Value="Gray" />
  191. <Setter Property="BorderThickness" Value="0" />
  192. <Setter Property="Template">
  193. <Setter.Value>
  194. <ControlTemplate TargetType="ctrl:SwitchButton">
  195. <Border
  196. Background="{TemplateBinding Background}"
  197. BorderBrush="{TemplateBinding BorderBrush}"
  198. BorderThickness="{TemplateBinding BorderThickness}"
  199. CornerRadius="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ActualHeight, Converter={StaticResource HalfNumber}}">
  200. <Grid>
  201. <Ellipse
  202. x:Name="ELLIPSE"
  203. HorizontalAlignment="Left"
  204. VerticalAlignment="Center"
  205. Fill="Gray"
  206. RenderTransformOrigin="0.5,0.5"
  207. Stroke="{StaticResource ControlBorderBrush}"
  208. StrokeThickness="1">
  209. <Ellipse.RenderTransform>
  210. <TransformGroup>
  211. <TranslateTransform x:Name="TranslateX" X="2" />
  212. </TransformGroup>
  213. </Ellipse.RenderTransform>
  214. </Ellipse>
  215. </Grid>
  216. </Border>
  217. </ControlTemplate>
  218. </Setter.Value>
  219. </Setter>
  220. </Style>
  221. <Style TargetType="ctrl:DigitalNumber">
  222. <Setter Property="Background" Value="#FF1A1E22" />
  223. <Setter Property="Foreground" Value="#FF0AA74D" />
  224. <Setter Property="NumberValue" Value="0.01" />
  225. <Setter Property="FontSize" Value="20" />
  226. <Setter Property="Template">
  227. <Setter.Value>
  228. <ControlTemplate TargetType="ctrl:DigitalNumber">
  229. <Grid Background="{TemplateBinding Background}">
  230. <TextBlock
  231. x:Name="line"
  232. HorizontalAlignment="Center"
  233. VerticalAlignment="Center"
  234. FontFamily="{StaticResource Digital}"
  235. FontSize="{TemplateBinding FontSize}"
  236. Foreground="{TemplateBinding Foreground}"
  237. Text="{Binding NumberValue, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ctrl:DigitalNumber}, Mode=TwoWay}" />
  238. </Grid>
  239. </ControlTemplate>
  240. </Setter.Value>
  241. </Setter>
  242. </Style>
  243. <Style TargetType="{x:Type ctrl:KnobButton}">
  244. <Setter Property="Background" Value="#0068F4" />
  245. <Setter Property="BorderBrush" Value="LightGray" />
  246. <Setter Property="Foreground" Value="Black" />
  247. <Setter Property="FontSize" Value="20" />
  248. <Setter Property="Template">
  249. <Setter.Value>
  250. <ControlTemplate TargetType="ctrl:KnobButton">
  251. <Grid x:Name="bdGrid" Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}">
  252. <Grid Margin="16" RenderTransformOrigin="0.5,0.5">
  253. <Grid.RenderTransform>
  254. <RotateTransform x:Name="rotatevalue" Angle="00" />
  255. </Grid.RenderTransform>
  256. <Ellipse
  257. Margin="4"
  258. Fill="#FFF6F6F6"
  259. Stroke="{StaticResource ControlBorderBrush}">
  260. <Ellipse.Effect>
  261. <DropShadowEffect
  262. BlurRadius="8"
  263. Direction="-90"
  264. ShadowDepth="2"
  265. Color="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Background.(SolidColorBrush.Color)}" />
  266. </Ellipse.Effect>
  267. </Ellipse>
  268. <Ellipse
  269. Width="8"
  270. Height="8"
  271. Margin="12"
  272. VerticalAlignment="Bottom"
  273. Fill="{TemplateBinding Background}" />
  274. </Grid>
  275. <TextBlock
  276. HorizontalAlignment="Center"
  277. VerticalAlignment="Center"
  278. FontSize="{TemplateBinding FontSize}"
  279. Foreground="{TemplateBinding Foreground}"
  280. Text="{Binding Value, RelativeSource={RelativeSource Mode=TemplatedParent}, StringFormat={}{0:F2}}" />
  281. </Grid>
  282. </ControlTemplate>
  283. </Setter.Value>
  284. </Setter>
  285. </Style>
  286. <Style TargetType="{x:Type ctrl:TheTimer}">
  287. <Setter Property="Template">
  288. <Setter.Value>
  289. <ControlTemplate TargetType="{x:Type ctrl:TheTimer}">
  290. <Border
  291. Background="{TemplateBinding Background}"
  292. BorderBrush="{TemplateBinding BorderBrush}"
  293. BorderThickness="{TemplateBinding BorderThickness}">
  294. <Grid>
  295. <Image RenderOptions.BitmapScalingMode="Fant" Source="../Images/timericon.png" />
  296. </Grid>
  297. </Border>
  298. </ControlTemplate>
  299. </Setter.Value>
  300. </Setter>
  301. </Style>
  302. <Style TargetType="{x:Type ctrl:TheButton}">
  303. <Style.Setters>
  304. <Setter Property="VerticalContentAlignment" Value="Center" />
  305. <Setter Property="Cursor" Value="Hand" />
  306. <Setter Property="BorderThickness" Value="0" />
  307. <Setter Property="FontSize" Value="14" />
  308. <Setter Property="BorderBrush" Value="Transparent" />
  309. <Setter Property="Background">
  310. <Setter.Value>
  311. <ImageBrush ImageSource="../Images/button2.png" />
  312. </Setter.Value>
  313. </Setter>
  314. <Setter Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  315. <Setter Property="Height" Value="25" />
  316. <Setter Property="Template">
  317. <Setter.Value>
  318. <ControlTemplate TargetType="{x:Type ctrl:TheButton}">
  319. <Border
  320. x:Name="BD"
  321. Background="{TemplateBinding Background}"
  322. BorderBrush="{TemplateBinding BorderBrush}"
  323. BorderThickness="{TemplateBinding BorderThickness}"
  324. Cursor="Hand">
  325. <StackPanel
  326. HorizontalAlignment="Center"
  327. Cursor="Hand"
  328. Orientation="Horizontal">
  329. <TextBlock
  330. x:Name="textBlock"
  331. Margin="10,0,10,0"
  332. VerticalAlignment="Center"
  333. Cursor="Hand"
  334. FontFamily="{TemplateBinding FontFamily}"
  335. FontSize="{TemplateBinding FontSize}"
  336. FontWeight="{TemplateBinding FontWeight}"
  337. Foreground="{TemplateBinding Foreground}"
  338. Text="{TemplateBinding Content}" />
  339. </StackPanel>
  340. </Border>
  341. <ControlTemplate.Triggers>
  342. <!--<Trigger Property="IsMouseOver" Value="true">
  343. <Setter TargetName="BD" Property="Background" >
  344. <Setter.Value>
  345. <ImageBrush ImageSource="../Images/button2.png" />
  346. </Setter.Value>
  347. </Setter>
  348. -->
  349. <!--<Setter TargetName="textBlock" Property="Foreground" Value="{TemplateBinding Foreground}" />-->
  350. <!--
  351. </Trigger>
  352. <Trigger Property="IsMouseOver" Value="False">
  353. <Setter TargetName="BD" Property="Background" >
  354. <Setter.Value>
  355. <ImageBrush ImageSource="../Images/button2.png" />
  356. </Setter.Value>
  357. </Setter>
  358. -->
  359. <!--<Setter TargetName="textBlock" Property="Foreground" Value="{TemplateBinding Foreground}" />-->
  360. <!--
  361. </Trigger>-->
  362. <Trigger Property="IsEnabled" Value="False">
  363. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonUnSelectForeground}" />
  364. </Trigger>
  365. </ControlTemplate.Triggers>
  366. </ControlTemplate>
  367. </Setter.Value>
  368. </Setter>
  369. </Style.Setters>
  370. </Style>
  371. <Style TargetType="{x:Type ctrl:TheToggleButton}">
  372. <Style.Setters>
  373. <Setter Property="VerticalContentAlignment" Value="Center" />
  374. <Setter Property="Cursor" Value="Hand" />
  375. <Setter Property="BorderThickness" Value="0" />
  376. <Setter Property="FontSize" Value="14" />
  377. <Setter Property="BorderBrush" Value="Transparent" />
  378. <Setter Property="Background">
  379. <Setter.Value>
  380. <ImageBrush ImageSource="../Images/button1.png" />
  381. </Setter.Value>
  382. </Setter>
  383. <Setter Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  384. <Setter Property="Height" Value="25" />
  385. <Setter Property="Template">
  386. <Setter.Value>
  387. <ControlTemplate TargetType="{x:Type ctrl:TheToggleButton}">
  388. <Border
  389. x:Name="BD"
  390. Background="{TemplateBinding Background}"
  391. BorderBrush="{TemplateBinding BorderBrush}"
  392. BorderThickness="{TemplateBinding BorderThickness}"
  393. Cursor="Hand">
  394. <StackPanel
  395. HorizontalAlignment="Center"
  396. Cursor="Hand"
  397. Orientation="Horizontal">
  398. <TextBlock
  399. x:Name="textBlock"
  400. Margin="10,0,10,0"
  401. VerticalAlignment="Center"
  402. Cursor="Hand"
  403. FontFamily="{TemplateBinding FontFamily}"
  404. FontSize="{TemplateBinding FontSize}"
  405. FontWeight="{TemplateBinding FontWeight}"
  406. Foreground="{TemplateBinding Foreground}"
  407. Text="{TemplateBinding Content}" />
  408. </StackPanel>
  409. </Border>
  410. <ControlTemplate.Triggers>
  411. <Trigger Property="IsChecked" Value="true">
  412. <Setter TargetName="BD" Property="Opacity" Value="1"/>
  413. <Setter TargetName="textBlock" Property="Opacity" Value="1" />
  414. </Trigger>
  415. <Trigger Property="IsChecked" Value="False">
  416. <Setter TargetName="BD" Property="Opacity" Value="0.5"/>
  417. <Setter TargetName="textBlock" Property="Opacity" Value="0.5" />
  418. </Trigger>
  419. <Trigger Property="IsEnabled" Value="False">
  420. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonUnSelectForeground}" />
  421. </Trigger>
  422. </ControlTemplate.Triggers>
  423. </ControlTemplate>
  424. </Setter.Value>
  425. </Setter>
  426. </Style.Setters>
  427. </Style>
  428. <Style TargetType="{x:Type ctrl:TheTextBox}">
  429. <Setter Property="BorderBrush" Value="{DynamicResource borderBrush}" />
  430. <Setter Property="BorderThickness" Value="1" />
  431. <Setter Property="Padding" Value="0" />
  432. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  433. <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
  434. <Setter Property="VerticalContentAlignment" Value="Center" />
  435. <Setter Property="Height" Value="24" />
  436. <Setter Property="CaretBrush" Value="White" />
  437. <Setter Property="Padding" Value="0" />
  438. <Setter Property="HorizontalContentAlignment" Value="Left" />
  439. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  440. <Setter Property="AllowDrop" Value="true" />
  441. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  442. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  443. <Setter Property="Template">
  444. <Setter.Value>
  445. <ControlTemplate TargetType="{x:Type TextBox}">
  446. <Themes1:ClassicBorderDecorator
  447. x:Name="Bd"
  448. Background="{TemplateBinding Background}"
  449. BorderBrush="{TemplateBinding BorderBrush}"
  450. BorderStyle="None"
  451. BorderThickness="{TemplateBinding BorderThickness}">
  452. <ScrollViewer x:Name="PART_ContentHost" />
  453. </Themes1:ClassicBorderDecorator>
  454. <ControlTemplate.Triggers>
  455. <Trigger Property="IsEnabled" Value="false">
  456. <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  457. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  458. </Trigger>
  459. </ControlTemplate.Triggers>
  460. </ControlTemplate>
  461. </Setter.Value>
  462. </Setter>
  463. <Style.Triggers>
  464. <MultiTrigger>
  465. <MultiTrigger.Conditions>
  466. <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
  467. <Condition Property="IsSelectionActive" Value="false" />
  468. <Condition Property="IsSelectionActive" Value="false" />
  469. </MultiTrigger.Conditions>
  470. <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
  471. </MultiTrigger>
  472. </Style.Triggers>
  473. </Style>
  474. <Style TargetType="{x:Type ctrl:NumberBox}">
  475. <Setter Property="BorderBrush" Value="{DynamicResource borderBrush}" />
  476. <Setter Property="BorderThickness" Value="1" />
  477. <Setter Property="Padding" Value="0" />
  478. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  479. <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
  480. <Setter Property="VerticalContentAlignment" Value="Center" />
  481. <Setter Property="Height" Value="24" />
  482. <Setter Property="CaretBrush" Value="White" />
  483. <Setter Property="Padding" Value="0" />
  484. <Setter Property="HorizontalContentAlignment" Value="Left" />
  485. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  486. <Setter Property="AllowDrop" Value="true" />
  487. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  488. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  489. <Setter Property="Template">
  490. <Setter.Value>
  491. <ControlTemplate TargetType="{x:Type TextBox}">
  492. <Themes1:ClassicBorderDecorator
  493. x:Name="Bd"
  494. BorderStyle="None"
  495. Background="{TemplateBinding Background}"
  496. BorderBrush="{TemplateBinding BorderBrush}"
  497. BorderThickness="{TemplateBinding BorderThickness}">
  498. <ScrollViewer x:Name="PART_ContentHost" />
  499. </Themes1:ClassicBorderDecorator>
  500. <ControlTemplate.Triggers>
  501. <Trigger Property="IsEnabled" Value="false">
  502. <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  503. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  504. </Trigger>
  505. </ControlTemplate.Triggers>
  506. </ControlTemplate>
  507. </Setter.Value>
  508. </Setter>
  509. <Style.Triggers>
  510. <MultiTrigger>
  511. <MultiTrigger.Conditions>
  512. <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
  513. <Condition Property="IsSelectionActive" Value="false" />
  514. <Condition Property="IsSelectionActive" Value="false" />
  515. </MultiTrigger.Conditions>
  516. <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
  517. </MultiTrigger>
  518. </Style.Triggers>
  519. </Style>
  520. <Style TargetType="{x:Type ctrl:TheTextBlock}">
  521. <Style.Setters>
  522. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  523. <Setter Property="HorizontalAlignment" Value="Left" />
  524. <Setter Property="VerticalAlignment" Value="Center" />
  525. <Setter Property="FontSize" Value="20" />
  526. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  527. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  528. <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
  529. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  530. <Setter Property="AllowDrop" Value="true" />
  531. <Setter Property="TextWrapping" Value="Wrap" />
  532. </Style.Setters>
  533. </Style>
  534. <Style x:Key="DesignToggleButton" TargetType="ToggleButton">
  535. <Setter Property="Foreground" Value="{StaticResource ControlForeground}" />
  536. <Setter Property="Template">
  537. <Setter.Value>
  538. <ControlTemplate TargetType="ToggleButton">
  539. <Border
  540. Background="{StaticResource NormalBackground}"
  541. BorderBrush="{StaticResource ControlBorderBrush}"
  542. BorderThickness="1"
  543. CornerRadius="2">
  544. <TextBlock
  545. HorizontalAlignment="Center"
  546. VerticalAlignment="Center"
  547. FontSize="{TemplateBinding FontSize}"
  548. FontWeight="{TemplateBinding FontWeight}"
  549. Text="{TemplateBinding Content}" />
  550. </Border>
  551. </ControlTemplate>
  552. </Setter.Value>
  553. </Setter>
  554. </Style>
  555. <Style x:Key="ExecuteToggleButton" TargetType="ToggleButton">
  556. <Setter Property="Foreground" Value="{StaticResource ControlForeground}" />
  557. <Setter Property="Template">
  558. <Setter.Value>
  559. <ControlTemplate TargetType="ToggleButton">
  560. <Border
  561. x:Name="bd"
  562. Background="{StaticResource NormalBackground}"
  563. BorderBrush="{StaticResource ControlBorderBrush}"
  564. BorderThickness="1"
  565. CornerRadius="2">
  566. <TextBlock
  567. HorizontalAlignment="Center"
  568. VerticalAlignment="Center"
  569. FontSize="{TemplateBinding FontSize}"
  570. FontWeight="{TemplateBinding FontWeight}"
  571. Text="{TemplateBinding Content}" />
  572. </Border>
  573. <ControlTemplate.Triggers>
  574. <Trigger Property="IsChecked" Value="True">
  575. <Setter TargetName="bd" Property="Background">
  576. <Setter.Value>
  577. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  578. <GradientStopCollection>
  579. <GradientStop Color="#6AD456" />
  580. <GradientStop Offset="0.5" Color="#1DAE06" />
  581. <GradientStop Offset="1" Color="#8BDC7C" />
  582. </GradientStopCollection>
  583. </LinearGradientBrush>
  584. </Setter.Value>
  585. </Setter>
  586. </Trigger>
  587. </ControlTemplate.Triggers>
  588. </ControlTemplate>
  589. </Setter.Value>
  590. </Setter>
  591. </Style>
  592. <Style TargetType="{x:Type ctrl:WaveProgressBar}">
  593. <Setter Property="BorderBrush" Value="{StaticResource borderBrush}" />
  594. <Setter Property="BorderThickness" Value="1" />
  595. <Setter Property="WaveFill" Value="{StaticResource borderBrush}" />
  596. <Setter Property="WaveThickness" Value="2" />
  597. <Setter Property="WaveStroke" Value="{StaticResource borderBrush}" />
  598. <Setter Property="ShowText" Value="True" />
  599. <Setter Property="FontSize" Value="20" />
  600. <Setter Property="Foreground" Value="{StaticResource MeunSelectForeground}" />
  601. <Setter Property="Background" Value="Transparent" />
  602. <Setter Property="Template">
  603. <Setter.Value>
  604. <ControlTemplate TargetType="ctrl:WaveProgressBar">
  605. <ControlTemplate.Resources>
  606. <Storyboard x:Key="StoryboardOnLoaded" RepeatBehavior="Forever">
  607. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_Wave" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)">
  608. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="-400" />
  609. </DoubleAnimationUsingKeyFrames>
  610. </Storyboard>
  611. </ControlTemplate.Resources>
  612. <StackPanel>
  613. <Border Background="{TemplateBinding Background}">
  614. <Viewbox>
  615. <Border
  616. x:Name="PART_Clip"
  617. Width="200"
  618. Height="200"
  619. BorderBrush="{TemplateBinding BorderBrush}"
  620. BorderThickness="{TemplateBinding BorderThickness}"
  621. ClipToBounds="True"
  622. CornerRadius="100">
  623. <Border.Clip>
  624. <EllipseGeometry
  625. Center="100,100"
  626. RadiusX="100"
  627. RadiusY="100" />
  628. </Border.Clip>
  629. <Grid>
  630. <Path
  631. x:Name="PART_Wave"
  632. Width="600"
  633. Height="250"
  634. Margin="0,0,-400,-20"
  635. HorizontalAlignment="Left"
  636. VerticalAlignment="Top"
  637. ClipToBounds="True"
  638. Fill="{TemplateBinding WaveFill}"
  639. RenderTransformOrigin="0.5,0.5"
  640. Stretch="Fill"
  641. Stroke="{TemplateBinding WaveStroke}"
  642. StrokeThickness="{TemplateBinding WaveThickness}"
  643. UseLayoutRounding="False">
  644. <Path.Data>
  645. <PathGeometry>
  646. <PathFigure StartPoint="0,1">
  647. <PolyBezierSegment Points="0.5,1 0.5,0 1,0" />
  648. <PolyBezierSegment Points="1.5,0 1.5,1 2,1" />
  649. <PolyBezierSegment Points="2.5,1 2.5,0 3,0" />
  650. <PolyLineSegment Points="3,0 3,10, 0,10 0,1" />
  651. </PathFigure>
  652. </PathGeometry>
  653. </Path.Data>
  654. </Path>
  655. <TextBlock
  656. HorizontalAlignment="Center"
  657. VerticalAlignment="Center"
  658. FontFamily="{StaticResource Digital}"
  659. FontSize="{TemplateBinding FontSize}"
  660. Foreground="{TemplateBinding Foreground}"
  661. Text="{Binding Value, RelativeSource={RelativeSource Mode=TemplatedParent}, StringFormat={}{0:f2}%}"
  662. Visibility="{Binding ShowText, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static con:BoolToVisibilityConverter.Instance}}" />
  663. </Grid>
  664. </Border>
  665. </Viewbox>
  666. </Border>
  667. </StackPanel>
  668. <ControlTemplate.Triggers>
  669. <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="PART_Wave">
  670. <BeginStoryboard Name="BeginStoryboardWave" Storyboard="{StaticResource StoryboardOnLoaded}" />
  671. </EventTrigger>
  672. <EventTrigger RoutedEvent="FrameworkElement.Unloaded" SourceName="PART_Wave">
  673. <StopStoryboard BeginStoryboardName="BeginStoryboardWave" />
  674. </EventTrigger>
  675. </ControlTemplate.Triggers>
  676. </ControlTemplate>
  677. </Setter.Value>
  678. </Setter>
  679. </Style>
  680. <Style TargetType="{x:Type ctrl:StatusLight}">
  681. <Setter Property="Template">
  682. <Setter.Value>
  683. <ControlTemplate TargetType="{x:Type ctrl:StatusLight}">
  684. <Border Width="{Binding Path=ActualHeight, RelativeSource={RelativeSource Self}}">
  685. <Grid>
  686. <Image
  687. x:Name="ima"
  688. RenderOptions.BitmapScalingMode="Fant"
  689. Source="../Images/State0.png" />
  690. </Grid>
  691. </Border>
  692. </ControlTemplate>
  693. </Setter.Value>
  694. </Setter>
  695. </Style>
  696. <Style TargetType="{x:Type ctrl:TheCheckBox}">
  697. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  698. <Setter Property="VerticalContentAlignment" Value="Center" />
  699. <Setter Property="FocusVisualStyle">
  700. <Setter.Value>
  701. <Style>
  702. <Setter Property="Control.Template">
  703. <Setter.Value>
  704. <ControlTemplate>
  705. <Rectangle
  706. Margin="1"
  707. SnapsToDevicePixels="True"
  708. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  709. StrokeDashArray="1 2"
  710. StrokeThickness="1" />
  711. </ControlTemplate>
  712. </Setter.Value>
  713. </Setter>
  714. </Style>
  715. </Setter.Value>
  716. </Setter>
  717. <Setter Property="Template">
  718. <Setter.Value>
  719. <ControlTemplate TargetType="{x:Type CheckBox}">
  720. <StackPanel
  721. Background="Transparent"
  722. Orientation="Horizontal"
  723. SnapsToDevicePixels="True">
  724. <Grid>
  725. <Image
  726. Source="../Images/Cb_HalfChecked.png" Margin="0,8,2,8" VerticalAlignment="Center" />
  727. <Image
  728. x:Name="image1"
  729. Source="../Images/Cb_HalfChecked.png" Margin="0,8,2,8" VerticalAlignment="Center" />
  730. </Grid>
  731. <ContentPresenter
  732. Margin="{TemplateBinding Padding}"
  733. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  734. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  735. Content="{TemplateBinding Content}"
  736. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  737. RecognizesAccessKey="True"
  738. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  739. </StackPanel>
  740. <ControlTemplate.Triggers>
  741. <Trigger Property="HasContent" Value="True">
  742. <Setter Property="FocusVisualStyle">
  743. <Setter.Value>
  744. <Style>
  745. <Setter Property="Control.Template">
  746. <Setter.Value>
  747. <ControlTemplate>
  748. <Rectangle
  749. Margin="14,0,0,0"
  750. SnapsToDevicePixels="True"
  751. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  752. StrokeDashArray="1 2"
  753. StrokeThickness="1" />
  754. </ControlTemplate>
  755. </Setter.Value>
  756. </Setter>
  757. </Style>
  758. </Setter.Value>
  759. </Setter>
  760. <Setter Property="Padding" Value="4,0,0,0" />
  761. </Trigger>
  762. <Trigger Property="IsEnabled" Value="False">
  763. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  764. </Trigger>
  765. <Trigger Property="IsChecked" Value="true">
  766. <Setter TargetName="image1" Property="Source" Value="../Images/Cb_Checked.png" />
  767. </Trigger>
  768. <Trigger Property="IsChecked" Value="{x:Null}">
  769. <Setter TargetName="image1" Property="Source" Value="../Images/Cb_HalfChecked.png" />
  770. </Trigger>
  771. </ControlTemplate.Triggers>
  772. </ControlTemplate>
  773. </Setter.Value>
  774. </Setter>
  775. </Style>
  776. <Style x:Key="ComboBoxFocusVisual">
  777. <Setter Property="Control.Template">
  778. <Setter.Value>
  779. <ControlTemplate>
  780. <Rectangle
  781. Margin="4,4,21,4"
  782. SnapsToDevicePixels="true"
  783. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  784. StrokeDashArray="1 2"
  785. StrokeThickness="1" />
  786. </ControlTemplate>
  787. </Setter.Value>
  788. </Setter>
  789. </Style>
  790. <Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
  791. <Style x:Key="ComboBoxTransparentButtonStyle" TargetType="{x:Type ToggleButton}">
  792. <Setter Property="MinWidth" Value="0" />
  793. <Setter Property="MinHeight" Value="0" />
  794. <Setter Property="Width" Value="Auto" />
  795. <Setter Property="Height" Value="Auto" />
  796. <Setter Property="Background" Value="Transparent" />
  797. <Setter Property="Foreground" Value="White" />
  798. <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" />
  799. <Setter Property="BorderThickness" Value="2" />
  800. <Setter Property="Template">
  801. <Setter.Value>
  802. <ControlTemplate TargetType="{x:Type ToggleButton}">
  803. <DockPanel
  804. Background="{TemplateBinding Background}"
  805. LastChildFill="false"
  806. SnapsToDevicePixels="true">
  807. <Themes1:ClassicBorderDecorator
  808. x:Name="Border"
  809. Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
  810. BorderBrush="{TemplateBinding BorderBrush}"
  811. BorderStyle="None"
  812. BorderThickness="{TemplateBinding BorderThickness}"
  813. DockPanel.Dock="Right">
  814. <Path
  815. HorizontalAlignment="Center"
  816. VerticalAlignment="Center"
  817. Data="{StaticResource DownArrowGeometry}"
  818. Fill="{TemplateBinding Foreground}" />
  819. </Themes1:ClassicBorderDecorator>
  820. </DockPanel>
  821. <ControlTemplate.Triggers>
  822. <Trigger Property="IsChecked" Value="true">
  823. <Setter TargetName="Border" Property="BorderStyle" Value="AltPressed" />
  824. </Trigger>
  825. </ControlTemplate.Triggers>
  826. </ControlTemplate>
  827. </Setter.Value>
  828. </Setter>
  829. <Style.Triggers>
  830. <Trigger Property="IsEnabled" Value="false">
  831. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
  832. </Trigger>
  833. </Style.Triggers>
  834. </Style>
  835. <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
  836. <Setter Property="OverridesDefaultStyle" Value="true" />
  837. <Setter Property="AllowDrop" Value="true" />
  838. <Setter Property="MinWidth" Value="0" />
  839. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  840. <Setter Property="MinHeight" Value="0" />
  841. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  842. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  843. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  844. <Setter Property="Template">
  845. <Setter.Value>
  846. <ControlTemplate TargetType="{x:Type TextBox}">
  847. <ScrollViewer
  848. x:Name="PART_ContentHost"
  849. Background="Transparent"
  850. Focusable="false"
  851. HorizontalScrollBarVisibility="Hidden"
  852. VerticalScrollBarVisibility="Hidden" />
  853. </ControlTemplate>
  854. </Setter.Value>
  855. </Setter>
  856. </Style>
  857. <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
  858. <Border
  859. Background="{TemplateBinding Background}"
  860. BorderBrush="{TemplateBinding BorderBrush}"
  861. BorderThickness="{TemplateBinding BorderThickness}"
  862. SnapsToDevicePixels="true">
  863. <Grid>
  864. <Themes1:ClassicBorderDecorator
  865. x:Name="Border"
  866. BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
  867. BorderStyle="None"
  868. BorderThickness="2">
  869. <Popup
  870. x:Name="PART_Popup"
  871. AllowsTransparency="true"
  872. Focusable="False"
  873. IsOpen="{TemplateBinding IsDropDownOpen}"
  874. Placement="Bottom"
  875. PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  876. <Themes1:SystemDropShadowChrome
  877. x:Name="Shdw"
  878. MinWidth="{Binding ActualWidth, ElementName=Border}"
  879. MaxHeight="{TemplateBinding MaxDropDownHeight}"
  880. Color="Transparent">
  881. <Border
  882. x:Name="DropDownBorder"
  883. BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
  884. BorderThickness="1">
  885. <Border.Background>
  886. <ImageBrush
  887. ImageSource="../Images/nbbj.png"
  888. Opacity="0.5"
  889. Stretch="Fill" />
  890. </Border.Background>
  891. <ScrollViewer x:Name="DropDownScrollViewer">
  892. <Grid RenderOptions.ClearTypeHint="Enabled">
  893. <Canvas
  894. Width="0"
  895. Height="0"
  896. HorizontalAlignment="Left"
  897. VerticalAlignment="Top">
  898. <Rectangle
  899. x:Name="OpaqueRect"
  900. Width="{Binding ActualWidth, ElementName=DropDownBorder}"
  901. Height="{Binding ActualHeight, ElementName=DropDownBorder}"
  902. Fill="{Binding Background, ElementName=DropDownBorder}" />
  903. </Canvas>
  904. <ItemsPresenter
  905. x:Name="ItemsPresenter"
  906. KeyboardNavigation.DirectionalNavigation="Contained"
  907. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  908. </Grid>
  909. </ScrollViewer>
  910. </Border>
  911. </Themes1:SystemDropShadowChrome>
  912. </Popup>
  913. </Themes1:ClassicBorderDecorator>
  914. <ToggleButton
  915. Width="Auto"
  916. MinWidth="0"
  917. MinHeight="0"
  918. ClickMode="Press"
  919. Focusable="false"
  920. IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  921. Style="{StaticResource ComboBoxTransparentButtonStyle}" />
  922. <DockPanel>
  923. <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
  924. <TextBox
  925. x:Name="PART_EditableTextBox"
  926. Margin="{TemplateBinding Padding}"
  927. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  928. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  929. CaretBrush="White"
  930. IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
  931. Style="{StaticResource ComboBoxEditableTextBox}" />
  932. </DockPanel>
  933. </Grid>
  934. </Border>
  935. <ControlTemplate.Triggers>
  936. <Trigger Property="HasItems" Value="false">
  937. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
  938. </Trigger>
  939. <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
  940. <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
  941. <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
  942. </Trigger>
  943. <Trigger Property="IsEnabled" Value="false">
  944. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  945. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  946. </Trigger>
  947. <MultiTrigger>
  948. <MultiTrigger.Conditions>
  949. <Condition Property="IsGrouping" Value="true" />
  950. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
  951. </MultiTrigger.Conditions>
  952. <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
  953. </MultiTrigger>
  954. <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
  955. <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
  956. <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
  957. </Trigger>
  958. </ControlTemplate.Triggers>
  959. </ControlTemplate>
  960. <Style TargetType="{x:Type ctrl:TheComboBox}">
  961. <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
  962. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  963. <Setter Property="Background" Value="Transparent" />
  964. <Setter Property="BorderBrush" Value="{DynamicResource borderBrush}" />
  965. <Setter Property="BorderThickness" Value="1" />
  966. <Setter Property="Margin" Value="0,0,0,0" />
  967. <Setter Property="Padding" Value="0" />
  968. <Setter Property="Height" Value="24" />
  969. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
  970. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
  971. <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
  972. <Setter Property="ScrollViewer.PanningMode" Value="Both" />
  973. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  974. <Setter Property="VerticalContentAlignment" Value="Center" />
  975. <Setter Property="IsTextSearchCaseSensitive" Value="true" />
  976. <Setter Property="IsEditable" Value="true" />
  977. <Setter Property="StaysOpenOnEdit" Value="true" />
  978. <Setter Property="Template">
  979. <Setter.Value>
  980. <ControlTemplate TargetType="{x:Type ctrl:TheComboBox}">
  981. <Border
  982. Background="{TemplateBinding Background}"
  983. BorderBrush="{TemplateBinding BorderBrush}"
  984. BorderThickness="{TemplateBinding BorderThickness}"
  985. SnapsToDevicePixels="true">
  986. <Grid>
  987. <Themes1:ClassicBorderDecorator
  988. x:Name="Border"
  989. BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
  990. BorderStyle="None"
  991. BorderThickness="2">
  992. <Popup
  993. x:Name="PART_Popup"
  994. AllowsTransparency="true"
  995. Focusable="False"
  996. IsOpen="{TemplateBinding IsDropDownOpen}"
  997. Placement="Bottom"
  998. PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  999. <Themes1:SystemDropShadowChrome
  1000. x:Name="Shdw"
  1001. MinWidth="{Binding ActualWidth, ElementName=Border}"
  1002. MaxHeight="{TemplateBinding MaxDropDownHeight}"
  1003. Color="Transparent">
  1004. <Border
  1005. x:Name="DropDownBorder"
  1006. BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
  1007. BorderThickness="1">
  1008. <Border.Background>
  1009. <ImageBrush ImageSource="../Images/nbbj.png" />
  1010. </Border.Background>
  1011. <ScrollViewer x:Name="DropDownScrollViewer">
  1012. <Grid RenderOptions.ClearTypeHint="Enabled">
  1013. <Canvas
  1014. Width="0"
  1015. Height="0"
  1016. HorizontalAlignment="Left"
  1017. VerticalAlignment="Top">
  1018. <Rectangle
  1019. x:Name="OpaqueRect"
  1020. Width="{Binding ActualWidth, ElementName=DropDownBorder}"
  1021. Height="{Binding ActualHeight, ElementName=DropDownBorder}"
  1022. Fill="{Binding Background, ElementName=DropDownBorder}" />
  1023. </Canvas>
  1024. <ItemsPresenter
  1025. x:Name="ItemsPresenter"
  1026. KeyboardNavigation.DirectionalNavigation="Contained"
  1027. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1028. </Grid>
  1029. </ScrollViewer>
  1030. </Border>
  1031. </Themes1:SystemDropShadowChrome>
  1032. </Popup>
  1033. </Themes1:ClassicBorderDecorator>
  1034. <DockPanel Margin="2">
  1035. <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
  1036. <Border x:Name="SelectedItemBorder" Margin="{TemplateBinding Padding}">
  1037. <ContentPresenter
  1038. Margin="1,1,1,1"
  1039. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1040. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1041. Content="{TemplateBinding SelectionBoxItem}"
  1042. ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
  1043. ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
  1044. ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
  1045. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1046. </Border>
  1047. </DockPanel>
  1048. <ToggleButton
  1049. Width="Auto"
  1050. MinWidth="0"
  1051. MinHeight="0"
  1052. Margin="2"
  1053. ClickMode="Press"
  1054. Focusable="false"
  1055. IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  1056. Style="{StaticResource ComboBoxTransparentButtonStyle}" />
  1057. </Grid>
  1058. </Border>
  1059. <ControlTemplate.Triggers>
  1060. <MultiTrigger>
  1061. <MultiTrigger.Conditions>
  1062. <!--<Condition Property="IsSelectionBoxHighlighted" Value="true"/>-->
  1063. <Condition Property="IsDropDownOpen" Value="false" />
  1064. </MultiTrigger.Conditions>
  1065. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  1066. </MultiTrigger>
  1067. <!--<Trigger Property="IsSelectionBoxHighlighted" Value="true">
  1068. <Setter Property="Background" TargetName="SelectedItemBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  1069. </Trigger>-->
  1070. <Trigger Property="HasItems" Value="false">
  1071. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
  1072. </Trigger>
  1073. <Trigger Property="IsEnabled" Value="false">
  1074. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  1075. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  1076. </Trigger>
  1077. <MultiTrigger>
  1078. <MultiTrigger.Conditions>
  1079. <Condition Property="IsGrouping" Value="true" />
  1080. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
  1081. </MultiTrigger.Conditions>
  1082. <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
  1083. </MultiTrigger>
  1084. <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
  1085. <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
  1086. <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
  1087. </Trigger>
  1088. <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
  1089. <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
  1090. <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
  1091. </Trigger>
  1092. </ControlTemplate.Triggers>
  1093. </ControlTemplate>
  1094. </Setter.Value>
  1095. </Setter>
  1096. <Style.Triggers>
  1097. <Trigger Property="IsEditable" Value="true">
  1098. <Setter Property="IsTabStop" Value="false" />
  1099. <Setter Property="Padding" Value="1" />
  1100. <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
  1101. </Trigger>
  1102. </Style.Triggers>
  1103. </Style>
  1104. <Style TargetType="{x:Type ctrl:TheDataGrid}">
  1105. <Setter Property="AutoGenerateColumns" Value="False" />
  1106. <Setter Property="Background" Value="Transparent" />
  1107. <Setter Property="CanUserAddRows" Value="False" />
  1108. <Setter Property="CanUserDeleteRows" Value="False" />
  1109. <Setter Property="BorderThickness" Value="0" />
  1110. <Setter Property="HeadersVisibility" Value="Column" />
  1111. <Setter Property="GridLinesVisibility" Value="None" />
  1112. <Setter Property="SelectionMode" Value="Single" />
  1113. <!--<Setter Property="Template">
  1114. <Setter.Value>
  1115. <ControlTemplate TargetType="ctrl:TheDataGrid">
  1116. <Border BorderBrush="{StaticResource ControlBorderBrush}" BorderThickness="1" Background="{StaticResource ControlBackground}">
  1117. <TextBlock Margin="4 0 0 0" Text="{TemplateBinding Text}" VerticalAlignment="Center" Foreground="BlueViolet"/>
  1118. </Border>
  1119. </ControlTemplate>
  1120. </Setter.Value>
  1121. </Setter>-->
  1122. </Style>
  1123. <Style TargetType="{x:Type DataGridRow}">
  1124. <Setter Property="Background" Value="Transparent" />
  1125. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1126. <Setter Property="HorizontalAlignment" Value="Right" />
  1127. <Setter Property="SnapsToDevicePixels" Value="true" />
  1128. <Setter Property="Foreground" Value="#abf4ff" />
  1129. <Setter Property="BorderBrush" Value="#abf4ff" />
  1130. <Setter Property="FontSize" Value="14" />
  1131. <Setter Property="Template">
  1132. <Setter.Value>
  1133. <ControlTemplate TargetType="{x:Type DataGridRow}">
  1134. <Border
  1135. x:Name="DGR_Border"
  1136. BorderThickness="{TemplateBinding BorderThickness}"
  1137. SnapsToDevicePixels="True">
  1138. <SelectiveScrollingGrid x:Name="selectiveScrollingGrid">
  1139. <SelectiveScrollingGrid.ColumnDefinitions>
  1140. <ColumnDefinition Width="Auto" />
  1141. <ColumnDefinition Width="*" />
  1142. </SelectiveScrollingGrid.ColumnDefinitions>
  1143. <SelectiveScrollingGrid.RowDefinitions>
  1144. <RowDefinition Height="*" />
  1145. <RowDefinition Height="Auto" />
  1146. </SelectiveScrollingGrid.RowDefinitions>
  1147. <DataGridCellsPresenter
  1148. Grid.Column="1"
  1149. ItemsPanel="{TemplateBinding ItemsPanel}"
  1150. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1151. <DataGridDetailsPresenter
  1152. Grid.Row="1"
  1153. Grid.Column="1"
  1154. SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
  1155. Visibility="{TemplateBinding DetailsVisibility}" />
  1156. <DataGridRowHeader
  1157. Grid.RowSpan="2"
  1158. SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
  1159. Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
  1160. </SelectiveScrollingGrid>
  1161. <VisualStateManager.VisualStateGroups>
  1162. <VisualStateGroup x:Name="CommonStates">
  1163. <VisualState x:Name="Normal" />
  1164. <VisualState x:Name="MouseOver">
  1165. <Storyboard>
  1166. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background)">
  1167. <DiscreteObjectKeyFrame KeyTime="0">
  1168. <DiscreteObjectKeyFrame.Value>
  1169. <SolidColorBrush Color="#230077BC" />
  1170. </DiscreteObjectKeyFrame.Value>
  1171. </DiscreteObjectKeyFrame>
  1172. </ObjectAnimationUsingKeyFrames>
  1173. </Storyboard>
  1174. </VisualState>
  1175. <VisualState x:Name="Normal_Selected">
  1176. <Storyboard>
  1177. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background)">
  1178. <DiscreteObjectKeyFrame KeyTime="0">
  1179. <DiscreteObjectKeyFrame.Value>
  1180. <SolidColorBrush Color="#3D0077BC" />
  1181. </DiscreteObjectKeyFrame.Value>
  1182. </DiscreteObjectKeyFrame>
  1183. </ObjectAnimationUsingKeyFrames>
  1184. </Storyboard>
  1185. </VisualState>
  1186. </VisualStateGroup>
  1187. <VisualStateGroup x:Name="ValidationStates">
  1188. <VisualState x:Name="Valid" />
  1189. <VisualState x:Name="InvalidFocused" />
  1190. <VisualState x:Name="InvalidUnfocused" />
  1191. </VisualStateGroup>
  1192. </VisualStateManager.VisualStateGroups>
  1193. </Border>
  1194. </ControlTemplate>
  1195. </Setter.Value>
  1196. </Setter>
  1197. </Style>
  1198. <Style TargetType="{x:Type GridSplitter}">
  1199. <Setter Property="Width" Value="1" />
  1200. <Setter Property="Background" Value="#175c86" />
  1201. <Setter Property="Cursor" Value="SizeWE" />
  1202. <Setter Property="Margin" Value="0,0,0,0" />
  1203. <Setter Property="Template">
  1204. <Setter.Value>
  1205. <ControlTemplate TargetType="{x:Type Thumb}">
  1206. <Border
  1207. Width="{TemplateBinding Width}"
  1208. Margin="{TemplateBinding Margin}"
  1209. Background="{TemplateBinding Background}"
  1210. Opacity="0.4" />
  1211. </ControlTemplate>
  1212. </Setter.Value>
  1213. </Setter>
  1214. </Style>
  1215. <Style x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">
  1216. <Setter Property="Width" Value="1" />
  1217. <Setter Property="Background" Value="#175c86" />
  1218. <Setter Property="Cursor" Value="SizeWE" />
  1219. <Setter Property="Margin" Value="0,0,0,0" />
  1220. <Setter Property="Template">
  1221. <Setter.Value>
  1222. <ControlTemplate TargetType="{x:Type Thumb}">
  1223. <Border
  1224. Width="{TemplateBinding Width}"
  1225. Margin="{TemplateBinding Margin}"
  1226. Background="{TemplateBinding Background}"
  1227. Opacity="0.4" />
  1228. </ControlTemplate>
  1229. </Setter.Value>
  1230. </Setter>
  1231. </Style>
  1232. <Style TargetType="{x:Type DataGridColumnHeader}">
  1233. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1234. <Setter Property="VerticalContentAlignment" Value="Center" />
  1235. <Setter Property="Height" Value="30" />
  1236. <Setter Property="Background">
  1237. <Setter.Value>
  1238. <ImageBrush ImageSource="../Images/biogebj.png" Opacity="0.2" />
  1239. </Setter.Value>
  1240. </Setter>
  1241. <Setter Property="BorderThickness" Value="0" />
  1242. <Setter Property="Foreground" Value="{DynamicResource DataGridColumnHeaderColor}" />
  1243. <Setter Property="FontSize" Value="14" />
  1244. <Setter Property="Template">
  1245. <Setter.Value>
  1246. <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
  1247. <Grid>
  1248. <Border
  1249. Padding="{TemplateBinding Padding}"
  1250. Background="{TemplateBinding Background}"
  1251. BorderBrush="{TemplateBinding BorderBrush}"
  1252. BorderThickness="{TemplateBinding BorderThickness}">
  1253. <ContentPresenter
  1254. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1255. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1256. RecognizesAccessKey="True"
  1257. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1258. </Border>
  1259. <GridSplitter
  1260. HorizontalAlignment="Right"
  1261. Background="#FF0BAE3F"
  1262. BorderBrush="#FFBD2A2A" />
  1263. <Thumb
  1264. x:Name="PART_RightHeaderGripper"
  1265. Width="2"
  1266. HorizontalAlignment="Right"
  1267. Background="#FF1D9B9E"
  1268. Style="{StaticResource ColumnHeaderGripperStyle}" />
  1269. </Grid>
  1270. </ControlTemplate>
  1271. </Setter.Value>
  1272. </Setter>
  1273. </Style>
  1274. <Style x:Key="DataGridColumnHeader" TargetType="{x:Type DataGridColumnHeader}">
  1275. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1276. <Setter Property="VerticalContentAlignment" Value="Center" />
  1277. <Setter Property="Height" Value="30" />
  1278. <Setter Property="Background">
  1279. <Setter.Value>
  1280. <ImageBrush ImageSource="../Images/databj.png" />
  1281. </Setter.Value>
  1282. </Setter>
  1283. <Setter Property="BorderThickness" Value="0" />
  1284. <Setter Property="Foreground" Value="White" />
  1285. <Setter Property="FontSize" Value="10" />
  1286. <Setter Property="Template">
  1287. <Setter.Value>
  1288. <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
  1289. <Grid>
  1290. <Border
  1291. Padding="{TemplateBinding Padding}"
  1292. Background="{TemplateBinding Background}"
  1293. BorderBrush="{TemplateBinding BorderBrush}"
  1294. BorderThickness="{TemplateBinding BorderThickness}">
  1295. <ContentPresenter
  1296. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1297. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1298. RecognizesAccessKey="True"
  1299. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1300. </Border>
  1301. <Thumb
  1302. x:Name="PART_RightHeaderGripper"
  1303. HorizontalAlignment="Right"
  1304. Style="{StaticResource ColumnHeaderGripperStyle}" />
  1305. </Grid>
  1306. </ControlTemplate>
  1307. </Setter.Value>
  1308. </Setter>
  1309. </Style>
  1310. <Style TargetType="{x:Type DataGridCell}">
  1311. <Setter Property="Background" Value="Transparent" />
  1312. <Setter Property="BorderBrush" Value="#FF31879E" />
  1313. <Setter Property="BorderThickness" Value="0" />
  1314. <Setter Property="Template">
  1315. <Setter.Value>
  1316. <ControlTemplate TargetType="{x:Type DataGridCell}">
  1317. <Border
  1318. Background="{TemplateBinding Background}"
  1319. BorderBrush="{TemplateBinding BorderBrush}"
  1320. BorderThickness="{TemplateBinding BorderThickness}"
  1321. SnapsToDevicePixels="True">
  1322. <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1323. </Border>
  1324. </ControlTemplate>
  1325. </Setter.Value>
  1326. </Setter>
  1327. <Style.Triggers>
  1328. <Trigger Property="IsSelected" Value="True">
  1329. <!--<Setter Property="Background" Value="#FF2281EC"/>-->
  1330. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
  1331. <!--<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>-->
  1332. </Trigger>
  1333. <!--<Trigger Property="IsKeyboardFocusWithin" Value="True">
  1334. <Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
  1335. </Trigger>-->
  1336. <Trigger Property="IsEnabled" Value="false">
  1337. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  1338. </Trigger>
  1339. </Style.Triggers>
  1340. </Style>
  1341. <SolidColorBrush x:Key="ListBorder" Color="#828790" />
  1342. <Style TargetType="{x:Type ctrl:TheListBox}">
  1343. <Setter Property="Background" Value="Transparent" />
  1344. <Setter Property="BorderBrush" Value="{StaticResource ListBorder}" />
  1345. <Setter Property="BorderThickness" Value="0" />
  1346. <Setter Property="Padding" Value="10" />
  1347. <Setter Property="Foreground" Value="White" />
  1348. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
  1349. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
  1350. <Setter Property="ScrollViewer.PanningMode" Value="Both" />
  1351. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  1352. <Setter Property="VerticalContentAlignment" Value="Center" />
  1353. </Style>
  1354. <BorderGapMaskConverter x:Key="BorderGapMaskConverter" />
  1355. <Style TargetType="{x:Type ctrl:TheGroupBox}">
  1356. <Setter Property="BorderThickness" Value="0" />
  1357. <Setter Property="Background" Value="Transparent" />
  1358. <Setter Property="Foreground" Value="{DynamicResource Titleforeground}" />
  1359. <Setter Property="Template">
  1360. <Setter.Value>
  1361. <ControlTemplate TargetType="{x:Type GroupBox}">
  1362. <Grid SnapsToDevicePixels="true">
  1363. <Grid.ColumnDefinitions>
  1364. <ColumnDefinition Width="6" />
  1365. <ColumnDefinition Width="Auto" />
  1366. <ColumnDefinition Width="*" />
  1367. <ColumnDefinition Width="6" />
  1368. </Grid.ColumnDefinitions>
  1369. <Grid.RowDefinitions>
  1370. <RowDefinition Height="Auto" />
  1371. <RowDefinition Height="Auto" />
  1372. <RowDefinition Height="*" />
  1373. <RowDefinition Height="6" />
  1374. </Grid.RowDefinitions>
  1375. <Rectangle Grid.RowSpan="2" Grid.ColumnSpan="4" />
  1376. <Border
  1377. Grid.Row="2"
  1378. Grid.RowSpan="2"
  1379. Grid.ColumnSpan="4"
  1380. Margin="0,0,0,0"
  1381. BorderThickness="0"
  1382. CornerRadius="0" />
  1383. <Image
  1384. Grid.Row="0"
  1385. Grid.RowSpan="2"
  1386. Grid.Column="1"
  1387. Height="4"
  1388. Margin="0,5,0,0"
  1389. HorizontalAlignment="Left"
  1390. Source="../Images/2609.png" />
  1391. <Border
  1392. x:Name="Header"
  1393. Grid.Row="0"
  1394. Grid.RowSpan="2"
  1395. Grid.Column="1"
  1396. Height="30"
  1397. Margin="30,0,0,0"
  1398. Padding="3,1,3,0">
  1399. <ContentPresenter
  1400. VerticalAlignment="Center"
  1401. ContentSource="Header"
  1402. RecognizesAccessKey="True"
  1403. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1404. </Border>
  1405. <ContentPresenter
  1406. Grid.Row="2"
  1407. Grid.Column="1"
  1408. Grid.ColumnSpan="2"
  1409. Margin="{TemplateBinding Padding}"
  1410. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1411. </Grid>
  1412. </ControlTemplate>
  1413. </Setter.Value>
  1414. </Setter>
  1415. </Style>
  1416. <Style x:Key="CheckRadioFocusVisual">
  1417. <Setter Property="Control.Template">
  1418. <Setter.Value>
  1419. <ControlTemplate>
  1420. <Rectangle
  1421. Margin="14,0,0,0"
  1422. SnapsToDevicePixels="true"
  1423. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  1424. StrokeDashArray="1 2"
  1425. StrokeThickness="1" />
  1426. </ControlTemplate>
  1427. </Setter.Value>
  1428. </Setter>
  1429. </Style>
  1430. <Style TargetType="{x:Type ctrl:TheRadioButton}">
  1431. <Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}" />
  1432. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  1433. <Setter Property="VerticalContentAlignment" Value="Center" />
  1434. <Setter Property="Background">
  1435. <Setter.Value>
  1436. <ImageBrush ImageSource="/BPASmartClient.SCADAControl;component/Images/btnkeys.png" />
  1437. </Setter.Value>
  1438. </Setter>
  1439. <Setter Property="Padding" Value="2,0,0,0" />
  1440. <Setter Property="Template">
  1441. <Setter.Value>
  1442. <ControlTemplate TargetType="{x:Type RadioButton}">
  1443. <BulletDecorator VerticalAlignment="Center" Background="Transparent">
  1444. <BulletDecorator.Bullet>
  1445. <Grid Height="{TemplateBinding Height}" Width="{TemplateBinding Height}">
  1446. <Ellipse x:Name="Border" Margin="0,5,10,5" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
  1447. <Ellipse x:Name="Dot" Width="{Binding Width,ElementName=Border}" Height="{Binding Height,ElementName=Border}" Margin="0,5,10,5" Fill="{TemplateBinding Foreground}" />
  1448. </Grid>
  1449. </BulletDecorator.Bullet>
  1450. <ContentPresenter
  1451. Margin="-5,0,0,0"
  1452. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1453. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1454. RecognizesAccessKey="True" />
  1455. </BulletDecorator>
  1456. <ControlTemplate.Triggers>
  1457. <Trigger Property="IsChecked" Value="true">
  1458. <Setter TargetName="Dot" Property="Visibility" Value="Visible" />
  1459. </Trigger>
  1460. <Trigger Property="IsChecked" Value="False">
  1461. <Setter TargetName="Dot" Property="Visibility" Value="Collapsed" />
  1462. </Trigger>
  1463. <Trigger Property="IsChecked" Value="{x:Null}">
  1464. <Setter TargetName="Dot" Property="Visibility" Value="Collapsed" />
  1465. </Trigger>
  1466. <Trigger Property="IsPressed" Value="true">
  1467. <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  1468. </Trigger>
  1469. <Trigger Property="IsEnabled" Value="false">
  1470. <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  1471. <Setter TargetName="Dot" Property="Fill" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  1472. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  1473. </Trigger>
  1474. </ControlTemplate.Triggers>
  1475. </ControlTemplate>
  1476. </Setter.Value>
  1477. </Setter>
  1478. </Style>
  1479. <SolidColorBrush x:Key="ProgressBar.Progress.圆形蓝.Text" Color="#FF0089E6" />
  1480. <SolidColorBrush x:Key="ProgressBar.Progress.圆形蓝.UnSelect" Color="#330089E6" />
  1481. <SolidColorBrush x:Key="ProgressBar.Progress.圆形蓝.Select" Color="#FF0089E6" />
  1482. <LinearGradientBrush x:Key="ProgressBar.Progress.动画蓝" StartPoint="1,0" EndPoint="0,0">
  1483. <GradientStop Offset="0" Color="#00000000" />
  1484. <GradientStop Offset="0.4" Color="#4C57B9FB" />
  1485. <GradientStop Offset="0.6" Color="#FF57B9FB" />
  1486. <GradientStop Offset="0.8" Color="#4C57B9FB" />
  1487. <GradientStop Offset="1" Color="#00000000" />
  1488. </LinearGradientBrush>
  1489. <SolidColorBrush x:Key="ProgressBar.Progress.圆形绿.Text" Color="#FF00DC00" />
  1490. <SolidColorBrush x:Key="ProgressBar.Progress.圆形绿.UnSelect" Color="#3300DC00" />
  1491. <SolidColorBrush x:Key="ProgressBar.Progress.圆形绿.Select" Color="#FF00DC00" />
  1492. <LinearGradientBrush x:Key="ProgressBar.Progress.动画绿" StartPoint="1,0" EndPoint="0,0">
  1493. <GradientStop Offset="0" Color="#00000000" />
  1494. <GradientStop Offset="0.4" Color="#4C72F972" />
  1495. <GradientStop Offset="0.6" Color="#FF72F972" />
  1496. <GradientStop Offset="0.8" Color="#4C72F972" />
  1497. <GradientStop Offset="1" Color="#00000000" />
  1498. </LinearGradientBrush>
  1499. <SolidColorBrush x:Key="ProgressBar.Progress.圆形红.Text" Color="#FFF10000" />
  1500. <SolidColorBrush x:Key="ProgressBar.Progress.圆形红.UnSelect" Color="#33F10000" />
  1501. <SolidColorBrush x:Key="ProgressBar.Progress.圆形红.Select" Color="#FFF10000" />
  1502. <LinearGradientBrush x:Key="ProgressBar.Progress.动画红" StartPoint="1,0" EndPoint="0,0">
  1503. <GradientStop Offset="0" Color="#00000000" />
  1504. <GradientStop Offset="0.4" Color="#4CFF5858" />
  1505. <GradientStop Offset="0.6" Color="#FFFF5858" />
  1506. <GradientStop Offset="0.8" Color="#4CFF5858" />
  1507. <GradientStop Offset="1" Color="#00000000" />
  1508. </LinearGradientBrush>
  1509. <LinearGradientBrush x:Key="ProgressBar.动画" StartPoint="1,0" EndPoint="0,0">
  1510. <GradientStop Offset="0" Color="#00000000" />
  1511. <GradientStop Offset="0.4" Color="#6F06F11F" />
  1512. <GradientStop Offset="0.6" Color="LightBlue" />
  1513. <GradientStop Offset="0.8" Color="#6F06F11F" />
  1514. <GradientStop Offset="1" Color="#00000000" />
  1515. </LinearGradientBrush>
  1516. <LinearGradientBrush x:Key="ProgressBar.Progress" StartPoint="0,0" EndPoint="1,0">
  1517. <GradientStop Offset="0" Color="#4F05CE10" />
  1518. <GradientStop Offset="1" Color="#6F06F11F" />
  1519. </LinearGradientBrush>
  1520. <SolidColorBrush x:Key="ProgressBar.Background" Color="#072a56" />
  1521. <SolidColorBrush x:Key="ProgressBar.Border" Color="#072a56" />
  1522. <con:Style3DashConverter x:Key="Style3Dash" />
  1523. <con:Style3ArcConverter x:Key="Style3Arc" />
  1524. <Style TargetType="{x:Type ctrl:TheBlueProgressBar}">
  1525. <Setter Property="Width" Value="100" />
  1526. <Setter Property="Height" Value="100" />
  1527. <Setter Property="Template">
  1528. <Setter.Value>
  1529. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1530. <ControlTemplate.Resources>
  1531. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  1532. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ell动画" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
  1533. <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
  1534. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
  1535. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="90" />
  1536. </DoubleAnimationUsingKeyFrames>
  1537. </Storyboard>
  1538. </ControlTemplate.Resources>
  1539. <Grid>
  1540. <Rectangle
  1541. Fill="#ef426f"
  1542. RadiusX="5"
  1543. RadiusY="5"
  1544. Visibility="Collapsed" />
  1545. <Ellipse
  1546. x:Name="ell动画"
  1547. Width="80"
  1548. Height="80"
  1549. RenderTransformOrigin="0.5,0.5"
  1550. Stroke="{DynamicResource ProgressBar.Progress.动画蓝}"
  1551. StrokeDashCap="Flat"
  1552. StrokeThickness="10">
  1553. <Ellipse.RenderTransform>
  1554. <TransformGroup>
  1555. <!-- 旋转变换 -->
  1556. <RotateTransform Angle="-90" />
  1557. <!-- 缩放变换 -->
  1558. <ScaleTransform ScaleX="1" ScaleY="1" />
  1559. <!-- 倾斜变换 -->
  1560. <SkewTransform AngleX="0" AngleY="0" />
  1561. <!-- 移动变换 -->
  1562. <TranslateTransform X="0" Y="0" />
  1563. </TransformGroup>
  1564. </Ellipse.RenderTransform>
  1565. <Ellipse.StrokeDashArray>
  1566. <MultiBinding Converter="{StaticResource Style3Arc}">
  1567. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1568. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1569. </MultiBinding>
  1570. </Ellipse.StrokeDashArray>
  1571. </Ellipse>
  1572. <Ellipse
  1573. Width="80"
  1574. Height="80"
  1575. Stroke="{DynamicResource ProgressBar.Progress.圆形蓝.UnSelect}"
  1576. StrokeThickness="10" />
  1577. <Ellipse
  1578. Width="80"
  1579. Height="80"
  1580. RenderTransformOrigin="0.5,0.5"
  1581. Stroke="{DynamicResource ProgressBar.Progress.圆形蓝.Select}"
  1582. StrokeDashCap="Flat"
  1583. StrokeThickness="10">
  1584. <Ellipse.RenderTransform>
  1585. <RotateTransform Angle="-90" />
  1586. </Ellipse.RenderTransform>
  1587. <Ellipse.StrokeDashArray>
  1588. <MultiBinding Converter="{StaticResource Style3Arc}">
  1589. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1590. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1591. </MultiBinding>
  1592. </Ellipse.StrokeDashArray>
  1593. </Ellipse>
  1594. <TextBlock
  1595. HorizontalAlignment="Center"
  1596. VerticalAlignment="Center"
  1597. FontFamily="Fonts/#Quartz M"
  1598. FontSize="20"
  1599. Foreground="{DynamicResource ProgressBar.Progress.圆形蓝.Text}"
  1600. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat={}{0:f1}%}" />
  1601. </Grid>
  1602. <ControlTemplate.Triggers>
  1603. <EventTrigger RoutedEvent="Loaded">
  1604. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  1605. </EventTrigger>
  1606. </ControlTemplate.Triggers>
  1607. </ControlTemplate>
  1608. </Setter.Value>
  1609. </Setter>
  1610. </Style>
  1611. <Style TargetType="{x:Type ctrl:TheGreenProgressBar}">
  1612. <Setter Property="Width" Value="100" />
  1613. <Setter Property="Height" Value="100" />
  1614. <Setter Property="Template">
  1615. <Setter.Value>
  1616. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1617. <ControlTemplate.Resources>
  1618. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  1619. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ell动画" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
  1620. <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
  1621. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
  1622. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="90" />
  1623. </DoubleAnimationUsingKeyFrames>
  1624. </Storyboard>
  1625. </ControlTemplate.Resources>
  1626. <Grid>
  1627. <Rectangle
  1628. Fill="#ef426f"
  1629. RadiusX="5"
  1630. RadiusY="5"
  1631. Visibility="Collapsed" />
  1632. <Ellipse
  1633. x:Name="ell动画"
  1634. Width="80"
  1635. Height="80"
  1636. RenderTransformOrigin="0.5,0.5"
  1637. Stroke="{DynamicResource ProgressBar.Progress.动画绿}"
  1638. StrokeDashCap="Flat"
  1639. StrokeThickness="10">
  1640. <Ellipse.RenderTransform>
  1641. <TransformGroup>
  1642. <!-- 旋转变换 -->
  1643. <RotateTransform Angle="-90" />
  1644. <!-- 缩放变换 -->
  1645. <ScaleTransform ScaleX="1" ScaleY="1" />
  1646. <!-- 倾斜变换 -->
  1647. <SkewTransform AngleX="0" AngleY="0" />
  1648. <!-- 移动变换 -->
  1649. <TranslateTransform X="0" Y="0" />
  1650. </TransformGroup>
  1651. </Ellipse.RenderTransform>
  1652. <Ellipse.StrokeDashArray>
  1653. <MultiBinding Converter="{StaticResource Style3Arc}">
  1654. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1655. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1656. </MultiBinding>
  1657. </Ellipse.StrokeDashArray>
  1658. </Ellipse>
  1659. <Ellipse
  1660. Width="80"
  1661. Height="80"
  1662. Stroke="{DynamicResource ProgressBar.Progress.圆形绿.UnSelect}"
  1663. StrokeThickness="10" />
  1664. <Ellipse
  1665. Width="80"
  1666. Height="80"
  1667. RenderTransformOrigin="0.5,0.5"
  1668. Stroke="{DynamicResource ProgressBar.Progress.圆形绿.Select}"
  1669. StrokeDashCap="Flat"
  1670. StrokeThickness="10">
  1671. <Ellipse.RenderTransform>
  1672. <RotateTransform Angle="-90" />
  1673. </Ellipse.RenderTransform>
  1674. <Ellipse.StrokeDashArray>
  1675. <MultiBinding Converter="{StaticResource Style3Arc}">
  1676. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1677. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1678. </MultiBinding>
  1679. </Ellipse.StrokeDashArray>
  1680. </Ellipse>
  1681. <TextBlock
  1682. HorizontalAlignment="Center"
  1683. VerticalAlignment="Center"
  1684. FontFamily="Fonts/#Quartz M"
  1685. FontSize="20"
  1686. Foreground="{DynamicResource ProgressBar.Progress.圆形绿.Text}"
  1687. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat={}{0:f1}%}" />
  1688. </Grid>
  1689. <ControlTemplate.Triggers>
  1690. <EventTrigger RoutedEvent="Loaded">
  1691. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  1692. </EventTrigger>
  1693. </ControlTemplate.Triggers>
  1694. </ControlTemplate>
  1695. </Setter.Value>
  1696. </Setter>
  1697. </Style>
  1698. <Style TargetType="{x:Type ctrl:TheRedProgressBar}">
  1699. <Setter Property="Width" Value="100" />
  1700. <Setter Property="Height" Value="100" />
  1701. <Setter Property="Template">
  1702. <Setter.Value>
  1703. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1704. <ControlTemplate.Resources>
  1705. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  1706. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ell动画" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
  1707. <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
  1708. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
  1709. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="90" />
  1710. </DoubleAnimationUsingKeyFrames>
  1711. </Storyboard>
  1712. </ControlTemplate.Resources>
  1713. <Grid>
  1714. <Rectangle
  1715. Fill="#ef426f"
  1716. RadiusX="5"
  1717. RadiusY="5"
  1718. Visibility="Collapsed" />
  1719. <Ellipse
  1720. x:Name="ell动画"
  1721. Width="80"
  1722. Height="80"
  1723. RenderTransformOrigin="0.5,0.5"
  1724. Stroke="{DynamicResource ProgressBar.Progress.动画红}"
  1725. StrokeDashCap="Flat"
  1726. StrokeThickness="10">
  1727. <Ellipse.RenderTransform>
  1728. <TransformGroup>
  1729. <!-- 旋转变换 -->
  1730. <RotateTransform Angle="-90" />
  1731. <!-- 缩放变换 -->
  1732. <ScaleTransform ScaleX="1" ScaleY="1" />
  1733. <!-- 倾斜变换 -->
  1734. <SkewTransform AngleX="0" AngleY="0" />
  1735. <!-- 移动变换 -->
  1736. <TranslateTransform X="0" Y="0" />
  1737. </TransformGroup>
  1738. </Ellipse.RenderTransform>
  1739. <Ellipse.StrokeDashArray>
  1740. <MultiBinding Converter="{StaticResource Style3Arc}">
  1741. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1742. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1743. </MultiBinding>
  1744. </Ellipse.StrokeDashArray>
  1745. </Ellipse>
  1746. <Ellipse
  1747. Width="80"
  1748. Height="80"
  1749. Stroke="{DynamicResource ProgressBar.Progress.圆形红.UnSelect}"
  1750. StrokeThickness="10" />
  1751. <Ellipse
  1752. Width="80"
  1753. Height="80"
  1754. RenderTransformOrigin="0.5,0.5"
  1755. Stroke="{DynamicResource ProgressBar.Progress.圆形红.Select}"
  1756. StrokeDashCap="Flat"
  1757. StrokeThickness="10">
  1758. <Ellipse.RenderTransform>
  1759. <RotateTransform Angle="-90" />
  1760. </Ellipse.RenderTransform>
  1761. <Ellipse.StrokeDashArray>
  1762. <MultiBinding Converter="{StaticResource Style3Arc}">
  1763. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1764. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1765. </MultiBinding>
  1766. </Ellipse.StrokeDashArray>
  1767. </Ellipse>
  1768. <TextBlock
  1769. HorizontalAlignment="Center"
  1770. VerticalAlignment="Center"
  1771. FontFamily="Fonts/#Quartz M"
  1772. FontSize="20"
  1773. Foreground="{DynamicResource ProgressBar.Progress.圆形红.Text}"
  1774. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat={}{0:f1}%}" />
  1775. </Grid>
  1776. <ControlTemplate.Triggers>
  1777. <EventTrigger RoutedEvent="Loaded">
  1778. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  1779. </EventTrigger>
  1780. <Trigger Property="IsEnabled" Value="True">
  1781. <Trigger.EnterActions>
  1782. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  1783. </Trigger.EnterActions>
  1784. </Trigger>
  1785. </ControlTemplate.Triggers>
  1786. </ControlTemplate>
  1787. </Setter.Value>
  1788. </Setter>
  1789. </Style>
  1790. <Style TargetType="{x:Type ctrl:TheProgressBar}">
  1791. <Setter Property="Foreground" Value="{StaticResource ProgressBar.Progress}" />
  1792. <Setter Property="Background" Value="{StaticResource ProgressBar.Background}" />
  1793. <Setter Property="BorderBrush" Value="{StaticResource ProgressBar.Border}" />
  1794. <Setter Property="BorderThickness" Value="1" />
  1795. <Setter Property="Height" Value="16" />
  1796. <Setter Property="Template">
  1797. <Setter.Value>
  1798. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1799. <ControlTemplate.Resources>
  1800. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  1801. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="dh" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
  1802. <EasingDoubleKeyFrame KeyTime="0" Value="0.25" />
  1803. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.25" />
  1804. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.25" />
  1805. </DoubleAnimationUsingKeyFrames>
  1806. <PointAnimationUsingKeyFrames Storyboard.TargetName="dh" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
  1807. <EasingPointKeyFrame KeyTime="0" Value="-0.5,0.5" />
  1808. <EasingPointKeyFrame KeyTime="0:0:1" Value="0.5,0.5" />
  1809. <EasingPointKeyFrame KeyTime="0:0:2" Value="1.5,0.5" />
  1810. </PointAnimationUsingKeyFrames>
  1811. </Storyboard>
  1812. </ControlTemplate.Resources>
  1813. <Grid x:Name="TemplateRoot">
  1814. <Border
  1815. Background="{TemplateBinding Background}"
  1816. BorderBrush="{TemplateBinding BorderBrush}"
  1817. BorderThickness="{TemplateBinding BorderThickness}"
  1818. Opacity="0.3" />
  1819. <Rectangle x:Name="PART_Track" />
  1820. <Grid
  1821. x:Name="PART_Indicator"
  1822. HorizontalAlignment="Left"
  1823. ClipToBounds="true">
  1824. <Rectangle x:Name="dh" Fill="{DynamicResource ProgressBar.动画}">
  1825. <Rectangle.RenderTransform>
  1826. <TransformGroup>
  1827. <ScaleTransform ScaleX="1" ScaleY="1" />
  1828. <SkewTransform AngleX="-45" AngleY="0" />
  1829. <RotateTransform Angle="0" />
  1830. <TranslateTransform X="0" Y="0" />
  1831. </TransformGroup>
  1832. </Rectangle.RenderTransform>
  1833. </Rectangle>
  1834. <Rectangle
  1835. x:Name="Indicator"
  1836. Fill="{TemplateBinding Foreground}"
  1837. Visibility="Collapsed" />
  1838. <Rectangle
  1839. x:Name="Animation"
  1840. Fill="{DynamicResource ProgressBar.动画}"
  1841. RenderTransformOrigin="0.5,0.5">
  1842. <Rectangle.RenderTransform>
  1843. <TransformGroup>
  1844. <ScaleTransform ScaleX="1" ScaleY="1" />
  1845. <SkewTransform AngleX="-45" AngleY="0" />
  1846. <RotateTransform Angle="0" />
  1847. <TranslateTransform X="0" Y="0" />
  1848. </TransformGroup>
  1849. </Rectangle.RenderTransform>
  1850. </Rectangle>
  1851. </Grid>
  1852. <TextBlock
  1853. x:Name="textBlock"
  1854. HorizontalAlignment="Center"
  1855. VerticalAlignment="Center"
  1856. FontFamily="{StaticResource Digital}"
  1857. FontSize="12"
  1858. Foreground="{DynamicResource Titleforeground}"
  1859. Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Value, StringFormat={}百分比: {0:f2} %}"
  1860. Visibility="Visible" />
  1861. <VisualStateManager.VisualStateGroups>
  1862. <VisualStateGroup x:Name="CommonStates">
  1863. <VisualState x:Name="Determinate" />
  1864. <VisualState x:Name="Indeterminate">
  1865. <Storyboard RepeatBehavior="Forever">
  1866. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Animation" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
  1867. <EasingDoubleKeyFrame KeyTime="0" Value="0.25" />
  1868. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.25" />
  1869. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.25" />
  1870. </DoubleAnimationUsingKeyFrames>
  1871. <PointAnimationUsingKeyFrames Storyboard.TargetName="Animation" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
  1872. <EasingPointKeyFrame KeyTime="0" Value="-0.5,0.5" />
  1873. <EasingPointKeyFrame KeyTime="0:0:1" Value="0.5,0.5" />
  1874. <EasingPointKeyFrame KeyTime="0:0:2" Value="1.5,0.5" />
  1875. </PointAnimationUsingKeyFrames>
  1876. </Storyboard>
  1877. </VisualState>
  1878. </VisualStateGroup>
  1879. </VisualStateManager.VisualStateGroups>
  1880. </Grid>
  1881. <ControlTemplate.Triggers>
  1882. <Trigger Property="Orientation" Value="Vertical">
  1883. <Setter TargetName="TemplateRoot" Property="LayoutTransform">
  1884. <Setter.Value>
  1885. <RotateTransform Angle="90" />
  1886. </Setter.Value>
  1887. </Setter>
  1888. </Trigger>
  1889. <Trigger Property="IsIndeterminate" Value="true">
  1890. <Setter TargetName="Indicator" Property="Visibility" Value="Collapsed" />
  1891. <Setter TargetName="dh" Property="Visibility" Value="Collapsed" />
  1892. <Setter TargetName="Animation" Property="Visibility" Value="Visible" />
  1893. </Trigger>
  1894. <Trigger Property="IsIndeterminate" Value="False">
  1895. <Setter TargetName="Indicator" Property="Visibility" Value="Visible" />
  1896. <Setter TargetName="dh" Property="Visibility" Value="Visible" />
  1897. <Setter TargetName="Animation" Property="Visibility" Value="Collapsed" />
  1898. </Trigger>
  1899. <EventTrigger RoutedEvent="Loaded">
  1900. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  1901. </EventTrigger>
  1902. </ControlTemplate.Triggers>
  1903. </ControlTemplate>
  1904. </Setter.Value>
  1905. </Setter>
  1906. </Style>
  1907. <Style x:Key="TabItemFocusVisual">
  1908. <Setter Property="Control.Template">
  1909. <Setter.Value>
  1910. <ControlTemplate>
  1911. <Rectangle
  1912. Margin="4,4,4,2"
  1913. SnapsToDevicePixels="true"
  1914. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  1915. StrokeDashArray="1 2"
  1916. StrokeThickness="1" />
  1917. </ControlTemplate>
  1918. </Setter.Value>
  1919. </Setter>
  1920. </Style>
  1921. <Style x:Key="TheTabItem" TargetType="{x:Type TabItem}">
  1922. <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
  1923. <Setter Property="Foreground">
  1924. <Setter.Value>
  1925. #A5FFFFFF
  1926. </Setter.Value>
  1927. </Setter>
  1928. <Setter Property="Padding" Value="6,1,6,1" />
  1929. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  1930. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  1931. <Setter Property="Cursor" Value="Hand" />
  1932. <Setter Property="Template">
  1933. <Setter.Value>
  1934. <ControlTemplate TargetType="{x:Type TabItem}">
  1935. <Border
  1936. x:Name="Bd"
  1937. Height="35"
  1938. Margin="5"
  1939. Padding="{TemplateBinding Padding}"
  1940. Background="{TemplateBinding Background}"
  1941. BorderBrush="{TemplateBinding BorderBrush}"
  1942. BorderThickness="{TemplateBinding BorderThickness}"
  1943. CornerRadius="2">
  1944. <ContentPresenter
  1945. x:Name="Content"
  1946. HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  1947. VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  1948. ContentSource="Header"
  1949. Cursor="Hand"
  1950. RecognizesAccessKey="True"
  1951. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1952. </Border>
  1953. <ControlTemplate.Triggers>
  1954. <Trigger Property="IsSelected" Value="true">
  1955. <Setter Property="Foreground" Value="{DynamicResource MeunSelectForeground}" />
  1956. <Setter TargetName="Bd" Property="Background">
  1957. <Setter.Value>
  1958. <ImageBrush ImageSource="../Images/Tab4_Select.png" />
  1959. </Setter.Value>
  1960. </Setter>
  1961. </Trigger>
  1962. <Trigger Property="IsSelected" Value="False">
  1963. <Setter Property="Foreground" Value="{DynamicResource MeunUnSelectForeground}" />
  1964. <Setter TargetName="Bd" Property="Background">
  1965. <Setter.Value>
  1966. <ImageBrush ImageSource="../Images/Tab4_No.png" />
  1967. </Setter.Value>
  1968. </Setter>
  1969. </Trigger>
  1970. <Trigger Property="IsMouseOver" Value="True">
  1971. <Setter Property="Foreground" Value="#8f723c" />
  1972. <Setter TargetName="Bd" Property="Background">
  1973. <Setter.Value>
  1974. <ImageBrush ImageSource="../Images/Tab4_Select.png" />
  1975. </Setter.Value>
  1976. </Setter>
  1977. </Trigger>
  1978. </ControlTemplate.Triggers>
  1979. </ControlTemplate>
  1980. </Setter.Value>
  1981. </Setter>
  1982. </Style>
  1983. <Style x:Key="TitleTabItem" TargetType="{x:Type TabItem}">
  1984. <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
  1985. <Setter Property="Padding" Value="10,2,10,2" />
  1986. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  1987. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  1988. <Setter Property="Cursor" Value="Hand" />
  1989. <Setter Property="Template">
  1990. <Setter.Value>
  1991. <ControlTemplate TargetType="{x:Type TabItem}">
  1992. <Border
  1993. x:Name="Bd"
  1994. Height="30"
  1995. Margin="5"
  1996. Padding="{TemplateBinding Padding}"
  1997. Background="{TemplateBinding Background}"
  1998. BorderBrush="{TemplateBinding BorderBrush}"
  1999. BorderThickness="{TemplateBinding BorderThickness}"
  2000. CornerRadius="0">
  2001. <ContentPresenter
  2002. x:Name="Content"
  2003. HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  2004. VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  2005. ContentSource="Header"
  2006. Cursor="Hand"
  2007. RecognizesAccessKey="True"
  2008. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  2009. </Border>
  2010. <ControlTemplate.Triggers>
  2011. <Trigger Property="IsSelected" Value="true">
  2012. <Setter Property="Foreground" Value="#FFD4DEE0" />
  2013. <Setter TargetName="Bd" Property="Background">
  2014. <Setter.Value>
  2015. <ImageBrush ImageSource="../Images/Tab_SelectWZBJ.png" />
  2016. </Setter.Value>
  2017. </Setter>
  2018. </Trigger>
  2019. <Trigger Property="IsSelected" Value="False">
  2020. <Setter Property="Foreground" Value="#FF18A9C9" />
  2021. <Setter TargetName="Bd" Property="Background">
  2022. <Setter.Value>
  2023. <ImageBrush ImageSource="../Images/Tab_NoWZBJ.png" />
  2024. </Setter.Value>
  2025. </Setter>
  2026. </Trigger>
  2027. <Trigger Property="IsMouseOver" Value="True">
  2028. <Setter Property="Foreground" Value="#FFD4DEE0" />
  2029. <Setter TargetName="Bd" Property="Background">
  2030. <Setter.Value>
  2031. <ImageBrush ImageSource="../Images/Tab_SelectWZBJ.png" />
  2032. </Setter.Value>
  2033. </Setter>
  2034. </Trigger>
  2035. </ControlTemplate.Triggers>
  2036. </ControlTemplate>
  2037. </Setter.Value>
  2038. </Setter>
  2039. </Style>
  2040. <!--#region ScrollBar-->
  2041. <Style x:Key="UpScrollBarButton" TargetType="{x:Type RepeatButton}">
  2042. <Setter Property="OverridesDefaultStyle" Value="true" />
  2043. <Setter Property="Cursor" Value="Hand" />
  2044. <Setter Property="Focusable" Value="false" />
  2045. <Setter Property="IsTabStop" Value="false" />
  2046. <Setter Property="Template">
  2047. <Setter.Value>
  2048. <ControlTemplate TargetType="{x:Type RepeatButton}">
  2049. <Image
  2050. Width="8"
  2051. Height="5"
  2052. Source="../Images/Scroll_↑.png" />
  2053. </ControlTemplate>
  2054. </Setter.Value>
  2055. </Setter>
  2056. </Style>
  2057. <Style x:Key="DownScrollBarButton" TargetType="{x:Type RepeatButton}">
  2058. <Setter Property="OverridesDefaultStyle" Value="true" />
  2059. <Setter Property="Cursor" Value="Hand" />
  2060. <Setter Property="Focusable" Value="false" />
  2061. <Setter Property="IsTabStop" Value="false" />
  2062. <Setter Property="Template">
  2063. <Setter.Value>
  2064. <ControlTemplate TargetType="{x:Type RepeatButton}">
  2065. <Image
  2066. Width="8"
  2067. Height="5"
  2068. Source="../Images/Scroll_↓.png" />
  2069. </ControlTemplate>
  2070. </Setter.Value>
  2071. </Setter>
  2072. </Style>
  2073. <Style x:Key="LeftScrollBarButton" TargetType="{x:Type RepeatButton}">
  2074. <Setter Property="OverridesDefaultStyle" Value="true" />
  2075. <Setter Property="Cursor" Value="Hand" />
  2076. <Setter Property="Focusable" Value="false" />
  2077. <Setter Property="IsTabStop" Value="false" />
  2078. <Setter Property="Template">
  2079. <Setter.Value>
  2080. <ControlTemplate TargetType="{x:Type RepeatButton}">
  2081. <Image
  2082. Width="5"
  2083. Height="8"
  2084. Source="../Images/Scroll_←.png" />
  2085. </ControlTemplate>
  2086. </Setter.Value>
  2087. </Setter>
  2088. </Style>
  2089. <Style x:Key="RightScrollBarButton" TargetType="{x:Type RepeatButton}">
  2090. <Setter Property="OverridesDefaultStyle" Value="true" />
  2091. <Setter Property="Cursor" Value="Hand" />
  2092. <Setter Property="Focusable" Value="false" />
  2093. <Setter Property="IsTabStop" Value="false" />
  2094. <Setter Property="Template">
  2095. <Setter.Value>
  2096. <ControlTemplate TargetType="{x:Type RepeatButton}">
  2097. <Image
  2098. Width="5"
  2099. Height="8"
  2100. Source="../Images/Scroll_→.png" />
  2101. </ControlTemplate>
  2102. </Setter.Value>
  2103. </Setter>
  2104. </Style>
  2105. <Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
  2106. <Setter Property="OverridesDefaultStyle" Value="true" />
  2107. <Setter Property="Background" Value="Transparent" />
  2108. <Setter Property="Focusable" Value="false" />
  2109. <Setter Property="IsTabStop" Value="false" />
  2110. <Setter Property="Template">
  2111. <Setter.Value>
  2112. <ControlTemplate TargetType="{x:Type RepeatButton}">
  2113. <Rectangle
  2114. Width="{TemplateBinding Width}"
  2115. Height="{TemplateBinding Height}"
  2116. Fill="{TemplateBinding Background}" />
  2117. </ControlTemplate>
  2118. </Setter.Value>
  2119. </Setter>
  2120. </Style>
  2121. <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
  2122. <Setter Property="OverridesDefaultStyle" Value="true" />
  2123. <Setter Property="IsTabStop" Value="false" />
  2124. <Setter Property="Template">
  2125. <Setter.Value>
  2126. <ControlTemplate TargetType="{x:Type Thumb}">
  2127. <Border
  2128. x:Name="bd1"
  2129. Margin="2,2,2,2"
  2130. Background="#00c2f4"
  2131. CornerRadius="3"
  2132. Cursor="Hand"
  2133. Opacity="1"
  2134. SnapsToDevicePixels="true" />
  2135. <ControlTemplate.Triggers>
  2136. <Trigger Property="IsMouseOver" Value="true">
  2137. <Setter TargetName="bd1" Property="Margin" Value="-1,-1,-1,-1" />
  2138. </Trigger>
  2139. </ControlTemplate.Triggers>
  2140. </ControlTemplate>
  2141. </Setter.Value>
  2142. </Setter>
  2143. </Style>
  2144. <LinearGradientBrush x:Key="HorizontalScrollBarBackground" StartPoint="0,0" EndPoint="0,1">
  2145. <GradientStop Offset="0" Color="#E1E1E1" />
  2146. <GradientStop Offset="0.20" Color="#EDEDED" />
  2147. <GradientStop Offset="0.80" Color="#EDEDED" />
  2148. <GradientStop Offset="1" Color="#E3E3E3" />
  2149. </LinearGradientBrush>
  2150. <Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
  2151. <Setter Property="OverridesDefaultStyle" Value="true" />
  2152. <Setter Property="Background" Value="Transparent" />
  2153. <Setter Property="Focusable" Value="false" />
  2154. <Setter Property="IsTabStop" Value="false" />
  2155. <Setter Property="Template">
  2156. <Setter.Value>
  2157. <ControlTemplate TargetType="{x:Type RepeatButton}">
  2158. <Rectangle
  2159. Width="{TemplateBinding Width}"
  2160. Height="{TemplateBinding Height}"
  2161. Fill="{TemplateBinding Background}" />
  2162. </ControlTemplate>
  2163. </Setter.Value>
  2164. </Setter>
  2165. </Style>
  2166. <Style TargetType="{x:Type ScrollBar}">
  2167. <Setter Property="Background">
  2168. <Setter.Value>
  2169. <ImageBrush ImageSource="../Images/biogebj.png" Opacity="0.2" />
  2170. </Setter.Value>
  2171. </Setter>
  2172. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
  2173. <Setter Property="Stylus.IsFlicksEnabled" Value="false" />
  2174. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  2175. <Setter Property="Opacity" Value="1" />
  2176. <Setter Property="MinWidth" Value="3" />
  2177. <Setter Property="Template">
  2178. <Setter.Value>
  2179. <ControlTemplate TargetType="{x:Type ScrollBar}">
  2180. <Border
  2181. Width="10"
  2182. Margin="0,0,0,0"
  2183. Background="{TemplateBinding Background}"
  2184. CornerRadius="2"
  2185. Opacity="{TemplateBinding Opacity}">
  2186. <Grid x:Name="Bg" SnapsToDevicePixels="true">
  2187. <Grid.RowDefinitions>
  2188. <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
  2189. <RowDefinition Height="*" />
  2190. <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
  2191. </Grid.RowDefinitions>
  2192. <RepeatButton
  2193. Themes:ScrollChrome.ScrollGlyph="UpArrow"
  2194. Command="{x:Static ScrollBar.LineUpCommand}"
  2195. IsEnabled="{TemplateBinding IsMouseOver}"
  2196. Style="{StaticResource UpScrollBarButton}" />
  2197. <Track
  2198. x:Name="PART_Track"
  2199. Grid.Row="1"
  2200. IsDirectionReversed="true"
  2201. IsEnabled="{TemplateBinding IsMouseOver}">
  2202. <Track.DecreaseRepeatButton>
  2203. <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}" />
  2204. </Track.DecreaseRepeatButton>
  2205. <Track.IncreaseRepeatButton>
  2206. <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}" />
  2207. </Track.IncreaseRepeatButton>
  2208. <Track.Thumb>
  2209. <Thumb Themes:ScrollChrome.ScrollGlyph="VerticalGripper" Style="{StaticResource ScrollBarThumb}" />
  2210. </Track.Thumb>
  2211. </Track>
  2212. <RepeatButton
  2213. Grid.Row="2"
  2214. Themes:ScrollChrome.ScrollGlyph="DownArrow"
  2215. Command="{x:Static ScrollBar.LineDownCommand}"
  2216. IsEnabled="{TemplateBinding IsMouseOver}"
  2217. Style="{StaticResource DownScrollBarButton}" />
  2218. </Grid>
  2219. </Border>
  2220. </ControlTemplate>
  2221. </Setter.Value>
  2222. </Setter>
  2223. <Style.Triggers>
  2224. <Trigger Property="Orientation" Value="Horizontal">
  2225. <Setter Property="Template">
  2226. <Setter.Value>
  2227. <ControlTemplate TargetType="{x:Type ScrollBar}">
  2228. <Border
  2229. Height="10"
  2230. Margin="0,0,0,0"
  2231. Background="{TemplateBinding Background}"
  2232. CornerRadius="2"
  2233. Opacity="{TemplateBinding Opacity}">
  2234. <Grid
  2235. x:Name="Bg"
  2236. Background="{TemplateBinding Background}"
  2237. SnapsToDevicePixels="true">
  2238. <Grid.ColumnDefinitions>
  2239. <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" />
  2240. <ColumnDefinition Width="*" />
  2241. <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" />
  2242. </Grid.ColumnDefinitions>
  2243. <RepeatButton
  2244. Themes:ScrollChrome.ScrollGlyph="LeftArrow"
  2245. Command="{x:Static ScrollBar.LineLeftCommand}"
  2246. IsEnabled="{TemplateBinding IsMouseOver}"
  2247. Style="{StaticResource LeftScrollBarButton}" />
  2248. <Track
  2249. x:Name="PART_Track"
  2250. Grid.Column="1"
  2251. IsEnabled="{TemplateBinding IsMouseOver}">
  2252. <Track.DecreaseRepeatButton>
  2253. <RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource HorizontalScrollBarPageButton}" />
  2254. </Track.DecreaseRepeatButton>
  2255. <Track.IncreaseRepeatButton>
  2256. <RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource HorizontalScrollBarPageButton}" />
  2257. </Track.IncreaseRepeatButton>
  2258. <Track.Thumb>
  2259. <Thumb Themes:ScrollChrome.ScrollGlyph="HorizontalGripper" Style="{StaticResource ScrollBarThumb}" />
  2260. </Track.Thumb>
  2261. </Track>
  2262. <RepeatButton
  2263. Grid.Column="2"
  2264. Themes:ScrollChrome.ScrollGlyph="RightArrow"
  2265. Command="{x:Static ScrollBar.LineRightCommand}"
  2266. IsEnabled="{TemplateBinding IsMouseOver}"
  2267. Style="{StaticResource RightScrollBarButton}" />
  2268. </Grid>
  2269. </Border>
  2270. </ControlTemplate>
  2271. </Setter.Value>
  2272. </Setter>
  2273. </Trigger>
  2274. </Style.Triggers>
  2275. </Style>
  2276. <LinearGradientBrush x:Key="VerticalScrollBarBackground" StartPoint="0,0" EndPoint="1,0">
  2277. <GradientStop Offset="0" Color="#E1E1E1" />
  2278. <GradientStop Offset="0.20" Color="#EDEDED" />
  2279. <GradientStop Offset="0.80" Color="#EDEDED" />
  2280. <GradientStop Offset="1" Color="#E3E3E3" />
  2281. </LinearGradientBrush>
  2282. <!--#endregion-->
  2283. <!--#region Slider-->
  2284. <LinearGradientBrush x:Key="HorizontalSliderThumbHoverBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
  2285. <GradientStop Color="white" Offset="0"/>
  2286. <GradientStop Color="#B8E2F9" Offset="0.5"/>
  2287. <GradientStop Color="#B0DFF8" Offset="1"/>
  2288. </LinearGradientBrush>
  2289. <SolidColorBrush x:Key="HorizontalSliderThumbHoverBorder" Color="#3C7FB1"/>
  2290. <LinearGradientBrush x:Key="HorizontalSliderThumbPressedBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
  2291. <GradientStop Color="#B8E4FA" Offset="0.25"/>
  2292. <GradientStop Color="#5EB4E3" Offset="0.5"/>
  2293. <GradientStop Color="#4C8BB4" Offset="1"/>
  2294. </LinearGradientBrush>
  2295. <SolidColorBrush x:Key="HorizontalSliderThumbPressedBorder" Color="#2C628B"/>
  2296. <Geometry x:Key="SliderThumbDisabledGeometry">M -5,-10.5 L 5,-10.5 L 5,10.5 L -5,10.5 Z</Geometry>
  2297. <Geometry x:Key="SliderPointedThumbDisabledGeometry">M 4.5,-8.5 L -4.5,-8.5 L -4.5,4.5 L -0.5,8.5 L 0.5,8.5 L 4.5,4.5 Z</Geometry>
  2298. <Geometry x:Key="SliderPointedThumbOuterBorderGeometry">M 4.5,-7.5 A 1 1 0 0 0 3.5,-8.5 L -3.5,-8.5 A 1 1 0 0 0 -4.5,-7.5 L -4.5,4.5 L -0.5,8.5 L 0.5,8.5 L 4.5,4.5 Z</Geometry>
  2299. <LinearGradientBrush x:Key="HorizontalSliderThumbNormalBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
  2300. <GradientStop Color="White" Offset="0"/>
  2301. <GradientStop Color="#F0EFEF" Offset="0.4"/>
  2302. <GradientStop Color="#D6D5D5" Offset=".8"/>
  2303. </LinearGradientBrush>
  2304. <Geometry x:Key="SliderPointedThumbMiddleBorderGeometry">M 3.5,-7.5 L -3.5,-7.5 L -3.5,4.5 L 0,8 L 3.5,4.5 Z</Geometry>
  2305. <Style x:Key="HorizontalSliderUpThumbStyle" TargetType="{x:Type Thumb}">
  2306. <Setter Property="Focusable" Value="false"/>
  2307. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2308. <Setter Property="Height" Value="18"/>
  2309. <Setter Property="Width" Value="10"/>
  2310. <Setter Property="Foreground" Value="Gray"/>
  2311. <Setter Property="Template">
  2312. <Setter.Value>
  2313. <ControlTemplate TargetType="{x:Type Thumb}">
  2314. <Canvas SnapsToDevicePixels="true">
  2315. <Canvas.RenderTransform>
  2316. <TransformGroup>
  2317. <TransformGroup.Children>
  2318. <TransformCollection>
  2319. <RotateTransform Angle="180"/>
  2320. <TranslateTransform X="5" Y="9"/>
  2321. </TransformCollection>
  2322. </TransformGroup.Children>
  2323. </TransformGroup>
  2324. </Canvas.RenderTransform>
  2325. <Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource HorizontalSliderThumbNormalBackgroundInverted}"/>
  2326. <Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
  2327. <Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
  2328. </Canvas>
  2329. <ControlTemplate.Triggers>
  2330. <Trigger Property="IsMouseOver" Value="true">
  2331. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackgroundInverted}"/>
  2332. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2333. </Trigger>
  2334. <Trigger Property="Foreground" Value="Blue">
  2335. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackgroundInverted}"/>
  2336. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2337. </Trigger>
  2338. <Trigger Property="IsDragging" Value="true">
  2339. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackgroundInverted}"/>
  2340. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
  2341. </Trigger>
  2342. <Trigger Property="IsEnabled" Value="false">
  2343. <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
  2344. <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
  2345. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
  2346. <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
  2347. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
  2348. </Trigger>
  2349. </ControlTemplate.Triggers>
  2350. </ControlTemplate>
  2351. </Setter.Value>
  2352. </Setter>
  2353. </Style>
  2354. <Style x:Key="ButtonStyle2" TargetType="{x:Type Button}">
  2355. <Setter Property="BorderThickness" Value="1"/>
  2356. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  2357. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  2358. <Setter Property="VerticalContentAlignment" Value="Center"/>
  2359. <Setter Property="Padding" Value="1"/>
  2360. <Setter Property="Foreground" Value="#b3e8f0"></Setter>
  2361. <Setter Property="Height" Value="20"></Setter>
  2362. <Setter Property="Template">
  2363. <Setter.Value>
  2364. <ControlTemplate TargetType="{x:Type Button}">
  2365. <Grid Height="20" Width="Auto" Margin="0">
  2366. <VisualStateManager.VisualStateGroups>
  2367. <VisualStateGroup x:Name="CommonStates">
  2368. <VisualState x:Name="Normal"/>
  2369. <VisualState x:Name="MouseOver">
  2370. <Storyboard>
  2371. <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="rectangle">
  2372. <EasingColorKeyFrame KeyTime="0" Value="#FFFF9700"/>
  2373. </ColorAnimationUsingKeyFrames>
  2374. </Storyboard>
  2375. </VisualState>
  2376. <VisualState x:Name="Pressed"/>
  2377. <VisualState x:Name="Disabled"/>
  2378. </VisualStateGroup>
  2379. </VisualStateManager.VisualStateGroups>
  2380. <Rectangle x:Name="rectangle" Fill="#409eff" RadiusY="0" RadiusX="0"/>
  2381. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
  2382. </Grid>
  2383. <ControlTemplate.Triggers>
  2384. <Trigger Property="IsEnabled" Value="false">
  2385. <Setter Property="Foreground" Value="#b3e8f0"/>
  2386. </Trigger>
  2387. </ControlTemplate.Triggers>
  2388. </ControlTemplate>
  2389. </Setter.Value>
  2390. </Setter>
  2391. </Style>
  2392. <LinearGradientBrush x:Key="HorizontalSliderThumbHoverBackground" EndPoint="0,1" StartPoint="0,0">
  2393. <GradientStop Color="white" Offset="0"/>
  2394. <GradientStop Color="#B8E2F9" Offset="0.5"/>
  2395. <GradientStop Color="#B0DFF8" Offset="1"/>
  2396. </LinearGradientBrush>
  2397. <LinearGradientBrush x:Key="HorizontalSliderThumbPressedBackground" EndPoint="0,1" StartPoint="0,0">
  2398. <GradientStop Color="#B8E4FA" Offset="0.25"/>
  2399. <GradientStop Color="#5EB4E3" Offset="0.5"/>
  2400. <GradientStop Color="#4C8BB4" Offset="1"/>
  2401. </LinearGradientBrush>
  2402. <LinearGradientBrush x:Key="HorizontalSliderThumbNormalBackground" EndPoint="0,1" StartPoint="0,0">
  2403. <GradientStop Color="White" Offset="0"/>
  2404. <GradientStop Color="#F0EFEF" Offset="0.4"/>
  2405. <GradientStop Color="#D6D5D5" Offset=".8"/>
  2406. </LinearGradientBrush>
  2407. <Style x:Key="HorizontalSliderDownThumbStyle" TargetType="{x:Type Thumb}">
  2408. <Setter Property="Focusable" Value="false"/>
  2409. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2410. <Setter Property="Height" Value="18"/>
  2411. <Setter Property="Width" Value="10"/>
  2412. <Setter Property="Foreground" Value="Gray"/>
  2413. <Setter Property="Template">
  2414. <Setter.Value>
  2415. <ControlTemplate TargetType="{x:Type Thumb}">
  2416. <Canvas SnapsToDevicePixels="true">
  2417. <Canvas.RenderTransform>
  2418. <TranslateTransform X="5" Y="9"/>
  2419. </Canvas.RenderTransform>
  2420. <Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource HorizontalSliderThumbNormalBackground}"/>
  2421. <Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
  2422. <Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
  2423. </Canvas>
  2424. <ControlTemplate.Triggers>
  2425. <Trigger Property="IsMouseOver" Value="true">
  2426. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
  2427. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2428. </Trigger>
  2429. <Trigger Property="Foreground" Value="Blue">
  2430. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
  2431. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2432. </Trigger>
  2433. <Trigger Property="IsDragging" Value="true">
  2434. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackground}"/>
  2435. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
  2436. </Trigger>
  2437. <Trigger Property="IsEnabled" Value="false">
  2438. <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
  2439. <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
  2440. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
  2441. <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
  2442. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
  2443. </Trigger>
  2444. </ControlTemplate.Triggers>
  2445. </ControlTemplate>
  2446. </Setter.Value>
  2447. </Setter>
  2448. </Style>
  2449. <LinearGradientBrush x:Key="HorizontalSliderTrackNormalBorder" EndPoint="0,1" StartPoint="0,0">
  2450. <GradientStop Color="#FFAEB1AF" Offset="0.1"/>
  2451. <GradientStop Color="White" Offset=".9"/>
  2452. </LinearGradientBrush>
  2453. <SolidColorBrush x:Key="HorizontalSliderTrackNormalBackground" Color="#FFE7EAEA"/>
  2454. <Style x:Key="SliderRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
  2455. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2456. <Setter Property="IsTabStop" Value="false"/>
  2457. <Setter Property="Focusable" Value="false"/>
  2458. <Setter Property="Template">
  2459. <Setter.Value>
  2460. <ControlTemplate TargetType="{x:Type RepeatButton}">
  2461. <Rectangle Height="4">
  2462. <Rectangle.Fill>
  2463. <SolidColorBrush Color="#FF6A6B80" Opacity="0.6"/>
  2464. </Rectangle.Fill>
  2465. </Rectangle>
  2466. </ControlTemplate>
  2467. </Setter.Value>
  2468. </Setter>
  2469. </Style>
  2470. <Style x:Key="SliderRepeatButtonStyle1" TargetType="{x:Type RepeatButton}">
  2471. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2472. <Setter Property="IsTabStop" Value="false"/>
  2473. <Setter Property="Focusable" Value="false"/>
  2474. <Setter Property="Template">
  2475. <Setter.Value>
  2476. <ControlTemplate TargetType="{x:Type RepeatButton}">
  2477. <Rectangle Fill="#FF6262F0" Height="4"/>
  2478. </ControlTemplate>
  2479. </Setter.Value>
  2480. </Setter>
  2481. </Style>
  2482. <Geometry x:Key="SliderThumbOuterBorderGeometry">M -5,-9.5 A 1 1 0 0 1 -4,-10.5 L 4,-10.5 A 1 1 0 0 1 5,-9.5 L 5,9.5 A 1 1 0 0 1 4,10.5 L -4,10.5 A 1 1 0 0 1 -5,9.5 Z</Geometry>
  2483. <Geometry x:Key="SliderThumbMiddleBorderGeometry">M -4,-9.5 L 4,-9.5 L 4,9.5 L -4,9.5 Z</Geometry>
  2484. <Style x:Key="HorizontalSliderThumbStyle" TargetType="{x:Type Thumb}">
  2485. <Setter Property="Focusable" Value="false"/>
  2486. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2487. <Setter Property="Height" Value="22"/>
  2488. <Setter Property="Width" Value="11"/>
  2489. <Setter Property="Foreground" Value="Gray"/>
  2490. <Setter Property="Template">
  2491. <Setter.Value>
  2492. <ControlTemplate TargetType="{x:Type Thumb}">
  2493. <Canvas SnapsToDevicePixels="true">
  2494. <Canvas.RenderTransform>
  2495. <TranslateTransform X="-2" Y="4"/>
  2496. </Canvas.RenderTransform>
  2497. <Ellipse x:Name="ces" Width="23" Height="23" Margin="-4,-4,0,0" Fill="#7FE0751C"></Ellipse>
  2498. <Ellipse Width="15" Height="15" Fill="#FFE0751C"></Ellipse>
  2499. <Path Visibility="Collapsed" x:Name="Background" Data="{StaticResource SliderThumbOuterBorderGeometry}" Fill="{StaticResource HorizontalSliderThumbNormalBackground}"/>
  2500. <Path Visibility="Collapsed" x:Name="InnerBorder" Data="{StaticResource SliderThumbMiddleBorderGeometry}" Stroke="White"/>
  2501. <Path Visibility="Collapsed" x:Name="OuterBorder" Data="{StaticResource SliderThumbOuterBorderGeometry}" Stroke="#FF929292"/>
  2502. </Canvas>
  2503. <ControlTemplate.Triggers>
  2504. <Trigger Property="IsMouseOver" Value="true">
  2505. <Setter Property="Visibility" TargetName="ces" Value="Visible"/>
  2506. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
  2507. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2508. </Trigger>
  2509. <Trigger Property="IsMouseOver" Value="False">
  2510. <Setter Property="Visibility" TargetName="ces" Value="Collapsed"/>
  2511. </Trigger>
  2512. <Trigger Property="Foreground" Value="Blue">
  2513. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
  2514. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2515. </Trigger>
  2516. <Trigger Property="IsDragging" Value="true">
  2517. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackground}"/>
  2518. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
  2519. </Trigger>
  2520. <Trigger Property="IsEnabled" Value="false">
  2521. <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
  2522. <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
  2523. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
  2524. <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
  2525. </Trigger>
  2526. </ControlTemplate.Triggers>
  2527. </ControlTemplate>
  2528. </Setter.Value>
  2529. </Setter>
  2530. </Style>
  2531. <LinearGradientBrush x:Key="VerticalSliderThumbHoverBackground" EndPoint="1,0" StartPoint="0,0">
  2532. <GradientStop Color="white" Offset="0"/>
  2533. <GradientStop Color="#B8E2F9" Offset="0.5"/>
  2534. <GradientStop Color="#B0DFF8" Offset="1"/>
  2535. </LinearGradientBrush>
  2536. <LinearGradientBrush x:Key="VerticalSliderThumbPressedBackground" EndPoint="1,0" StartPoint="0,0">
  2537. <GradientStop Color="#B8E4FA" Offset="0.25"/>
  2538. <GradientStop Color="#5EB4E3" Offset="0.5"/>
  2539. <GradientStop Color="#4C8BB4" Offset="1"/>
  2540. </LinearGradientBrush>
  2541. <LinearGradientBrush x:Key="VerticalSliderThumbNormalBackground" EndPoint="1,0" StartPoint="0,0">
  2542. <GradientStop Color="White" Offset="0"/>
  2543. <GradientStop Color="#F0EFEF" Offset="0.4"/>
  2544. <GradientStop Color="#D6D5D5" Offset=".8"/>
  2545. </LinearGradientBrush>
  2546. <Style x:Key="VerticalSliderLeftThumbStyle" TargetType="{x:Type Thumb}">
  2547. <Setter Property="Focusable" Value="false"/>
  2548. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2549. <Setter Property="Height" Value="10"/>
  2550. <Setter Property="Width" Value="18"/>
  2551. <Setter Property="Foreground" Value="Gray"/>
  2552. <Setter Property="Template">
  2553. <Setter.Value>
  2554. <ControlTemplate TargetType="{x:Type Thumb}">
  2555. <Canvas SnapsToDevicePixels="true">
  2556. <Canvas.RenderTransform>
  2557. <TransformGroup>
  2558. <TransformGroup.Children>
  2559. <TransformCollection>
  2560. <RotateTransform Angle="90"/>
  2561. <TranslateTransform X="9" Y="5"/>
  2562. </TransformCollection>
  2563. </TransformGroup.Children>
  2564. </TransformGroup>
  2565. </Canvas.RenderTransform>
  2566. <Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource VerticalSliderThumbNormalBackground}"/>
  2567. <Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
  2568. <Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
  2569. </Canvas>
  2570. <ControlTemplate.Triggers>
  2571. <Trigger Property="IsMouseOver" Value="true">
  2572. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
  2573. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2574. </Trigger>
  2575. <Trigger Property="Foreground" Value="Blue">
  2576. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
  2577. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2578. </Trigger>
  2579. <Trigger Property="IsDragging" Value="true">
  2580. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackground}"/>
  2581. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
  2582. </Trigger>
  2583. <Trigger Property="IsEnabled" Value="false">
  2584. <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
  2585. <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
  2586. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
  2587. <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
  2588. </Trigger>
  2589. </ControlTemplate.Triggers>
  2590. </ControlTemplate>
  2591. </Setter.Value>
  2592. </Setter>
  2593. </Style>
  2594. <LinearGradientBrush x:Key="VerticalSliderThumbHoverBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
  2595. <GradientStop Color="white" Offset="0"/>
  2596. <GradientStop Color="#B8E2F9" Offset="0.5"/>
  2597. <GradientStop Color="#B0DFF8" Offset="1"/>
  2598. </LinearGradientBrush>
  2599. <LinearGradientBrush x:Key="VerticalSliderThumbPressedBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
  2600. <GradientStop Color="#B8E4FA" Offset="0.25"/>
  2601. <GradientStop Color="#5EB4E3" Offset="0.5"/>
  2602. <GradientStop Color="#4C8BB4" Offset="1"/>
  2603. </LinearGradientBrush>
  2604. <LinearGradientBrush x:Key="VerticalSliderThumbNormalBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
  2605. <GradientStop Color="White" Offset="0"/>
  2606. <GradientStop Color="#F0EFEF" Offset="0.4"/>
  2607. <GradientStop Color="#D6D5D5" Offset=".8"/>
  2608. </LinearGradientBrush>
  2609. <Style x:Key="VerticalSliderRightThumbStyle" TargetType="{x:Type Thumb}">
  2610. <Setter Property="Focusable" Value="false"/>
  2611. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2612. <Setter Property="Height" Value="10"/>
  2613. <Setter Property="Width" Value="18"/>
  2614. <Setter Property="Foreground" Value="Gray"/>
  2615. <Setter Property="Template">
  2616. <Setter.Value>
  2617. <ControlTemplate TargetType="{x:Type Thumb}">
  2618. <Canvas SnapsToDevicePixels="true">
  2619. <Canvas.RenderTransform>
  2620. <TransformGroup>
  2621. <TransformGroup.Children>
  2622. <TransformCollection>
  2623. <RotateTransform Angle="-90"/>
  2624. <TranslateTransform X="9" Y="5"/>
  2625. </TransformCollection>
  2626. </TransformGroup.Children>
  2627. </TransformGroup>
  2628. </Canvas.RenderTransform>
  2629. <Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource VerticalSliderThumbNormalBackgroundInverted}"/>
  2630. <Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
  2631. <Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
  2632. </Canvas>
  2633. <ControlTemplate.Triggers>
  2634. <Trigger Property="IsMouseOver" Value="true">
  2635. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackgroundInverted}"/>
  2636. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2637. </Trigger>
  2638. <Trigger Property="Foreground" Value="Blue">
  2639. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackgroundInverted}"/>
  2640. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2641. </Trigger>
  2642. <Trigger Property="IsDragging" Value="true">
  2643. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackgroundInverted}"/>
  2644. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
  2645. </Trigger>
  2646. <Trigger Property="IsEnabled" Value="false">
  2647. <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
  2648. <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
  2649. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
  2650. <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
  2651. </Trigger>
  2652. </ControlTemplate.Triggers>
  2653. </ControlTemplate>
  2654. </Setter.Value>
  2655. </Setter>
  2656. </Style>
  2657. <LinearGradientBrush x:Key="VerticalSliderTrackNormalBorder" EndPoint="1,0" StartPoint="0,0">
  2658. <GradientStop Color="#FFAEB1AF" Offset="0.1"/>
  2659. <GradientStop Color="White" Offset=".9"/>
  2660. </LinearGradientBrush>
  2661. <Style x:Key="VerticalSliderThumbStyle" TargetType="{x:Type Thumb}">
  2662. <Setter Property="Focusable" Value="false"/>
  2663. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2664. <Setter Property="Height" Value="11"/>
  2665. <Setter Property="Width" Value="22"/>
  2666. <Setter Property="Foreground" Value="Gray"/>
  2667. <Setter Property="Template">
  2668. <Setter.Value>
  2669. <ControlTemplate TargetType="{x:Type Thumb}">
  2670. <Canvas SnapsToDevicePixels="true">
  2671. <Canvas.RenderTransform>
  2672. <TransformGroup>
  2673. <TransformGroup.Children>
  2674. <TransformCollection>
  2675. <RotateTransform Angle="90"/>
  2676. <TranslateTransform X="11" Y="5.5"/>
  2677. </TransformCollection>
  2678. </TransformGroup.Children>
  2679. </TransformGroup>
  2680. </Canvas.RenderTransform>
  2681. <Ellipse x:Name="ces" Width="23" Height="23" Margin="-4,-4,0,0" Fill="#7FE0751C"></Ellipse>
  2682. <Ellipse Width="15" Height="15" Fill="#FFE0751C"></Ellipse>
  2683. <Path x:Name="Background" Visibility="Collapsed" Data="{StaticResource SliderThumbOuterBorderGeometry}" Fill="{StaticResource VerticalSliderThumbNormalBackground}"/>
  2684. <Path x:Name="InnerBorder" Visibility="Collapsed" Data="{StaticResource SliderThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
  2685. <Path x:Name="OuterBorder" Visibility="Collapsed" Data="{StaticResource SliderThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
  2686. </Canvas>
  2687. <ControlTemplate.Triggers>
  2688. <Trigger Property="IsMouseOver" Value="true">
  2689. <Setter Property="Visibility" TargetName="ces" Value="Visible"/>
  2690. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
  2691. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2692. </Trigger>
  2693. <Trigger Property="IsMouseOver" Value="False">
  2694. <Setter Property="Visibility" TargetName="ces" Value="Collapsed"/>
  2695. </Trigger>
  2696. <Trigger Property="Foreground" Value="Blue">
  2697. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
  2698. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2699. </Trigger>
  2700. <Trigger Property="IsDragging" Value="true">
  2701. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackground}"/>
  2702. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
  2703. </Trigger>
  2704. <Trigger Property="IsEnabled" Value="false">
  2705. <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
  2706. <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
  2707. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
  2708. <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
  2709. </Trigger>
  2710. </ControlTemplate.Triggers>
  2711. </ControlTemplate>
  2712. </Setter.Value>
  2713. </Setter>
  2714. </Style>
  2715. <Style TargetType="{x:Type Slider}">
  2716. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
  2717. <Setter Property="Background" Value="Transparent"/>
  2718. <Setter Property="Cursor" Value="Hand"/>
  2719. <Setter Property="Foreground" Value="#FFC4C4C4"/>
  2720. <Setter Property="Template">
  2721. <Setter.Value>
  2722. <ControlTemplate TargetType="{x:Type Slider}">
  2723. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  2724. <Grid>
  2725. <Grid.RowDefinitions>
  2726. <RowDefinition Height="Auto"/>
  2727. <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
  2728. <RowDefinition Height="Auto"/>
  2729. </Grid.RowDefinitions>
  2730. <TickBar x:Name="TopTick" Fill="{TemplateBinding Foreground}" Height="4" Placement="Top" Grid.Row="0" Visibility="Collapsed"/>
  2731. <TickBar x:Name="BottomTick" Fill="{TemplateBinding Foreground}" Height="4" Placement="Bottom" Grid.Row="2" Visibility="Collapsed"/>
  2732. <Border x:Name="TrackBackground" BorderBrush="{StaticResource HorizontalSliderTrackNormalBorder}" BorderThickness="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" Cursor="Hand" CornerRadius="1" Height="4.0" Margin="5,0" Grid.Row="1" VerticalAlignment="center">
  2733. <Canvas Margin="-6,-1">
  2734. <Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Height="4.0" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Visibility="Hidden"/>
  2735. </Canvas>
  2736. </Border>
  2737. <Track x:Name="PART_Track" Grid.Row="1">
  2738. <Track.DecreaseRepeatButton>
  2739. <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle1}"/>
  2740. </Track.DecreaseRepeatButton>
  2741. <Track.IncreaseRepeatButton>
  2742. <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
  2743. </Track.IncreaseRepeatButton>
  2744. <Track.Thumb>
  2745. <Thumb x:Name="Thumb" Style="{StaticResource HorizontalSliderThumbStyle}"/>
  2746. </Track.Thumb>
  2747. </Track>
  2748. </Grid>
  2749. </Border>
  2750. <ControlTemplate.Triggers>
  2751. <Trigger Property="TickPlacement" Value="TopLeft">
  2752. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2753. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderUpThumbStyle}"/>
  2754. <Setter Property="Margin" TargetName="TrackBackground" Value="5,2,5,0"/>
  2755. </Trigger>
  2756. <Trigger Property="TickPlacement" Value="BottomRight">
  2757. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2758. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderDownThumbStyle}"/>
  2759. <Setter Property="Margin" TargetName="TrackBackground" Value="5,0,5,2"/>
  2760. </Trigger>
  2761. <Trigger Property="TickPlacement" Value="Both">
  2762. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2763. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2764. </Trigger>
  2765. <Trigger Property="IsSelectionRangeEnabled" Value="true">
  2766. <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
  2767. </Trigger>
  2768. <Trigger Property="IsKeyboardFocused" Value="true">
  2769. <Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
  2770. </Trigger>
  2771. </ControlTemplate.Triggers>
  2772. </ControlTemplate>
  2773. </Setter.Value>
  2774. </Setter>
  2775. <Style.Triggers>
  2776. <Trigger Property="Orientation" Value="Vertical">
  2777. <Setter Property="Template">
  2778. <Setter.Value>
  2779. <ControlTemplate TargetType="{x:Type Slider}">
  2780. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  2781. <Grid>
  2782. <Grid.ColumnDefinitions>
  2783. <ColumnDefinition Width="Auto"/>
  2784. <ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto"/>
  2785. <ColumnDefinition Width="Auto"/>
  2786. </Grid.ColumnDefinitions>
  2787. <TickBar x:Name="TopTick" Grid.Column="0" Fill="{TemplateBinding Foreground}" Placement="Left" Visibility="Collapsed" Width="4"/>
  2788. <TickBar x:Name="BottomTick" Grid.Column="2" Fill="{TemplateBinding Foreground}" Placement="Right" Visibility="Collapsed" Width="4"/>
  2789. <Border x:Name="TrackBackground" BorderBrush="{StaticResource VerticalSliderTrackNormalBorder}" BorderThickness="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" Grid.Column="1" CornerRadius="1" HorizontalAlignment="center" Margin="0,5" Width="4.0">
  2790. <Canvas Margin="-1,-6">
  2791. <Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Visibility="Hidden" Width="4.0"/>
  2792. </Canvas>
  2793. </Border>
  2794. <Track x:Name="PART_Track" Grid.Column="1">
  2795. <Track.DecreaseRepeatButton>
  2796. <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
  2797. </Track.DecreaseRepeatButton>
  2798. <Track.IncreaseRepeatButton>
  2799. <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
  2800. </Track.IncreaseRepeatButton>
  2801. <Track.Thumb>
  2802. <Thumb x:Name="Thumb" Style="{StaticResource VerticalSliderThumbStyle}"/>
  2803. </Track.Thumb>
  2804. </Track>
  2805. </Grid>
  2806. </Border>
  2807. <ControlTemplate.Triggers>
  2808. <Trigger Property="TickPlacement" Value="TopLeft">
  2809. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2810. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderLeftThumbStyle}"/>
  2811. <Setter Property="Margin" TargetName="TrackBackground" Value="2,5,0,5"/>
  2812. </Trigger>
  2813. <Trigger Property="TickPlacement" Value="BottomRight">
  2814. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2815. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderRightThumbStyle}"/>
  2816. <Setter Property="Margin" TargetName="TrackBackground" Value="0,5,2,5"/>
  2817. </Trigger>
  2818. <Trigger Property="TickPlacement" Value="Both">
  2819. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2820. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2821. </Trigger>
  2822. <Trigger Property="IsSelectionRangeEnabled" Value="true">
  2823. <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
  2824. </Trigger>
  2825. <Trigger Property="IsKeyboardFocused" Value="true">
  2826. <Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
  2827. </Trigger>
  2828. </ControlTemplate.Triggers>
  2829. </ControlTemplate>
  2830. </Setter.Value>
  2831. </Setter>
  2832. </Trigger>
  2833. </Style.Triggers>
  2834. </Style>
  2835. <Style TargetType="{x:Type ctrl:TheSlider}">
  2836. <Setter Property="Width" Value="140" />
  2837. <Setter Property="Height" Value="24" />
  2838. <Setter Property="Maximum" Value="100" />
  2839. <Setter Property="Cursor" Value="Hand"/>
  2840. <Setter Property="Minimum" Value="0" />
  2841. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
  2842. <Setter Property="Background" Value="Transparent"/>
  2843. <Setter Property="Foreground" Value="#FFC4C4C4"/>
  2844. <Setter Property="Template">
  2845. <Setter.Value>
  2846. <ControlTemplate TargetType="{x:Type ctrl:TheSlider}">
  2847. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  2848. <Grid>
  2849. <Grid.RowDefinitions>
  2850. <RowDefinition Height="Auto"/>
  2851. <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
  2852. <RowDefinition Height="Auto"/>
  2853. </Grid.RowDefinitions>
  2854. <TickBar x:Name="TopTick" Fill="{TemplateBinding Foreground}" Height="4" Placement="Top" Grid.Row="0" Visibility="Collapsed"/>
  2855. <TickBar x:Name="BottomTick" Fill="{TemplateBinding Foreground}" Height="4" Placement="Bottom" Grid.Row="2" Visibility="Collapsed"/>
  2856. <Border x:Name="TrackBackground" BorderBrush="{StaticResource HorizontalSliderTrackNormalBorder}" BorderThickness="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" CornerRadius="1" Height="4.0" Margin="5,0" Grid.Row="1" VerticalAlignment="center">
  2857. <Canvas Margin="-6,-1">
  2858. <Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Height="4.0" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Visibility="Hidden"/>
  2859. </Canvas>
  2860. </Border>
  2861. <Track x:Name="PART_Track" Grid.Row="1">
  2862. <Track.DecreaseRepeatButton>
  2863. <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle1}"/>
  2864. </Track.DecreaseRepeatButton>
  2865. <Track.IncreaseRepeatButton>
  2866. <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
  2867. </Track.IncreaseRepeatButton>
  2868. <Track.Thumb>
  2869. <Thumb x:Name="Thumb" Style="{StaticResource HorizontalSliderThumbStyle}"/>
  2870. </Track.Thumb>
  2871. </Track>
  2872. </Grid>
  2873. </Border>
  2874. <ControlTemplate.Triggers>
  2875. <Trigger Property="TickPlacement" Value="TopLeft">
  2876. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2877. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderUpThumbStyle}"/>
  2878. <Setter Property="Margin" TargetName="TrackBackground" Value="5,2,5,0"/>
  2879. </Trigger>
  2880. <Trigger Property="TickPlacement" Value="BottomRight">
  2881. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2882. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderDownThumbStyle}"/>
  2883. <Setter Property="Margin" TargetName="TrackBackground" Value="5,0,5,2"/>
  2884. </Trigger>
  2885. <Trigger Property="TickPlacement" Value="Both">
  2886. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2887. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2888. </Trigger>
  2889. <Trigger Property="IsSelectionRangeEnabled" Value="true">
  2890. <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
  2891. </Trigger>
  2892. <Trigger Property="IsKeyboardFocused" Value="true">
  2893. <Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
  2894. </Trigger>
  2895. </ControlTemplate.Triggers>
  2896. </ControlTemplate>
  2897. </Setter.Value>
  2898. </Setter>
  2899. <Style.Triggers>
  2900. <Trigger Property="Orientation" Value="Vertical">
  2901. <Setter Property="Template">
  2902. <Setter.Value>
  2903. <ControlTemplate TargetType="{x:Type ctrl:TheSlider}">
  2904. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  2905. <Grid>
  2906. <Grid.ColumnDefinitions>
  2907. <ColumnDefinition Width="Auto"/>
  2908. <ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto"/>
  2909. <ColumnDefinition Width="Auto"/>
  2910. </Grid.ColumnDefinitions>
  2911. <TickBar x:Name="TopTick" Grid.Column="0" Fill="{TemplateBinding Foreground}" Placement="Left" Visibility="Collapsed" Width="4"/>
  2912. <TickBar x:Name="BottomTick" Grid.Column="2" Fill="{TemplateBinding Foreground}" Placement="Right" Visibility="Collapsed" Width="4"/>
  2913. <Border x:Name="TrackBackground" BorderBrush="{StaticResource VerticalSliderTrackNormalBorder}" BorderThickness="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" Grid.Column="1" CornerRadius="1" HorizontalAlignment="center" Margin="0,5" Width="4.0">
  2914. <Canvas Margin="-1,-6">
  2915. <Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Visibility="Hidden" Width="4.0"/>
  2916. </Canvas>
  2917. </Border>
  2918. <Track x:Name="PART_Track" Grid.Column="1">
  2919. <Track.DecreaseRepeatButton>
  2920. <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
  2921. </Track.DecreaseRepeatButton>
  2922. <Track.IncreaseRepeatButton>
  2923. <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
  2924. </Track.IncreaseRepeatButton>
  2925. <Track.Thumb>
  2926. <Thumb x:Name="Thumb" Style="{StaticResource VerticalSliderThumbStyle}"/>
  2927. </Track.Thumb>
  2928. </Track>
  2929. </Grid>
  2930. </Border>
  2931. <ControlTemplate.Triggers>
  2932. <Trigger Property="TickPlacement" Value="TopLeft">
  2933. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2934. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderLeftThumbStyle}"/>
  2935. <Setter Property="Margin" TargetName="TrackBackground" Value="2,5,0,5"/>
  2936. </Trigger>
  2937. <Trigger Property="TickPlacement" Value="BottomRight">
  2938. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2939. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderRightThumbStyle}"/>
  2940. <Setter Property="Margin" TargetName="TrackBackground" Value="0,5,2,5"/>
  2941. </Trigger>
  2942. <Trigger Property="TickPlacement" Value="Both">
  2943. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2944. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2945. </Trigger>
  2946. <Trigger Property="IsSelectionRangeEnabled" Value="true">
  2947. <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
  2948. </Trigger>
  2949. <Trigger Property="IsKeyboardFocused" Value="true">
  2950. <Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
  2951. </Trigger>
  2952. </ControlTemplate.Triggers>
  2953. </ControlTemplate>
  2954. </Setter.Value>
  2955. </Setter>
  2956. </Trigger>
  2957. </Style.Triggers>
  2958. </Style>
  2959. <!--#endregion-->
  2960. <!--#region 菜单栏-->
  2961. <Style x:Key="caidan_1" TargetType="{x:Type RadioButton}">
  2962. <Style.Setters>
  2963. <Setter Property="VerticalContentAlignment" Value="Center" />
  2964. <Setter Property="Cursor" Value="Hand" />
  2965. <Setter Property="BorderThickness" Value="0" />
  2966. <Setter Property="FontSize" Value="14" />
  2967. <Setter Property="Margin" Value="10,10,0,0" />
  2968. <Setter Property="BorderBrush" Value="Transparent" />
  2969. <Setter Property="Background">
  2970. <Setter.Value>
  2971. <ImageBrush ImageSource="../Images/button2.png" />
  2972. </Setter.Value>
  2973. </Setter>
  2974. <Setter Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  2975. <Setter Property="Height" Value="30" />
  2976. <Setter Property="Template">
  2977. <Setter.Value>
  2978. <ControlTemplate TargetType="{x:Type RadioButton}">
  2979. <Border
  2980. x:Name="BD"
  2981. Background="{TemplateBinding Background}"
  2982. BorderBrush="{TemplateBinding BorderBrush}"
  2983. BorderThickness="{TemplateBinding BorderThickness}"
  2984. Cursor="Hand">
  2985. <StackPanel
  2986. HorizontalAlignment="Center"
  2987. Cursor="Hand"
  2988. Orientation="Horizontal">
  2989. <TextBlock
  2990. x:Name="textBlock"
  2991. Margin="15,5,15,5"
  2992. VerticalAlignment="Center"
  2993. Cursor="Hand"
  2994. FontFamily="{TemplateBinding FontFamily}"
  2995. FontSize="{TemplateBinding FontSize}"
  2996. FontWeight="{TemplateBinding FontWeight}"
  2997. Foreground="{TemplateBinding Foreground}"
  2998. Text="{TemplateBinding Content}" />
  2999. </StackPanel>
  3000. </Border>
  3001. <ControlTemplate.Triggers>
  3002. <Trigger Property="IsChecked" Value="true">
  3003. <Setter TargetName="BD" Property="Background">
  3004. <Setter.Value>
  3005. <ImageBrush ImageSource="../Images/Tab4_Select.png" />
  3006. </Setter.Value>
  3007. </Setter>
  3008. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource MeunSelectForeground}" />
  3009. </Trigger>
  3010. <Trigger Property="IsChecked" Value="False">
  3011. <Setter TargetName="BD" Property="Background">
  3012. <Setter.Value>
  3013. <ImageBrush ImageSource="../Images/Tab4_No.png" />
  3014. </Setter.Value>
  3015. </Setter>
  3016. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  3017. </Trigger>
  3018. <Trigger Property="IsEnabled" Value="False">
  3019. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonUnSelectForeground}" />
  3020. </Trigger>
  3021. </ControlTemplate.Triggers>
  3022. </ControlTemplate>
  3023. </Setter.Value>
  3024. </Setter>
  3025. </Style.Setters>
  3026. </Style>
  3027. <DataTemplate x:Key="X_PageBoxStyle">
  3028. <Button x:Name="dsd" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" Background="Transparent" BorderBrush="Transparent" BorderThickness="0" CommandParameter="{Binding .}" Command="{Binding DataContext.MenSelectPageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}">
  3029. <Button.Template>
  3030. <ControlTemplate>
  3031. <Grid Margin="0">
  3032. <Grid.RowDefinitions>
  3033. <RowDefinition Height="auto"/>
  3034. <RowDefinition Height="auto"/>
  3035. </Grid.RowDefinitions>
  3036. <Grid Height="50" Width="100" >
  3037. <Grid.Background>
  3038. <ImageBrush ImageSource="../Images/bj.png" Stretch="UniformToFill"/>
  3039. </Grid.Background>
  3040. </Grid>
  3041. <Rectangle Height="50" Width="100" Stroke="#4818659B" StrokeThickness="1">
  3042. <Rectangle.Fill>
  3043. <VisualBrush Visual="{Binding visual,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
  3044. </Rectangle.Fill>
  3045. </Rectangle>
  3046. <Rectangle Width="100" Height="20" Grid.Row="1" Fill="Transparent" Stroke="#4818659B" StrokeThickness="1,0,1,1"/>
  3047. <TextBlock FontWeight="Normal" Margin="5,0,0,0" FontSize="12" Foreground="#a2c2e8"
  3048. x:Name="txt"
  3049. Grid.Row="2"
  3050. HorizontalAlignment="Left"
  3051. VerticalAlignment="Center"
  3052. FontFamily="../Fonts/#Quartz M"
  3053. Text="{Binding Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
  3054. <TextBlock FontWeight="Bold" Margin="5,0,5,0" FontSize="8" Foreground="{TemplateBinding Foreground}"
  3055. Grid.Row="2"
  3056. HorizontalAlignment="Right"
  3057. VerticalAlignment="Bottom" Visibility="Collapsed"
  3058. Text="{Binding Sort,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
  3059. </Grid>
  3060. </ControlTemplate>
  3061. </Button.Template>
  3062. </Button>
  3063. <DataTemplate.Triggers>
  3064. </DataTemplate.Triggers>
  3065. </DataTemplate>
  3066. <Style x:Key="ItemContainerStyle1" TargetType="ListBoxItem">
  3067. <Setter Property="HorizontalAlignment" Value="Left"/>
  3068. <Setter Property="VerticalAlignment" Value="Top"/>
  3069. <Setter Property="Cursor" Value="Hand"/>
  3070. <Setter Property="HorizontalContentAlignment" Value="Left"/>
  3071. <Setter Property="VerticalContentAlignment" Value="Top"/>
  3072. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  3073. <Setter Property="Template">
  3074. <Setter.Value>
  3075. <ControlTemplate TargetType="ListBoxItem">
  3076. <Border Name="Border"
  3077. Margin="5"
  3078. Background="Transparent"
  3079. BorderBrush="Transparent"
  3080. BorderThickness="1"
  3081. SnapsToDevicePixels="True">
  3082. <ContentPresenter />
  3083. </Border>
  3084. <ControlTemplate.Triggers>
  3085. <Trigger Property="IsMouseOver" Value="true">
  3086. <Setter TargetName="Border" Property="Background" Value="#EA18979B"/>
  3087. <Setter TargetName="Border" Property="BorderBrush" Value="#EA18979B"/>
  3088. <Setter Property="Foreground" Value="#a2c2e8"/>
  3089. </Trigger>
  3090. <Trigger Property="IsMouseOver" Value="False">
  3091. <Setter TargetName="Border" Property="Background" Value="#EA18659B"/>
  3092. <Setter TargetName="Border" Property="BorderBrush" Value="#EA18659B"/>
  3093. <Setter Property="Foreground" Value="#a2c2e8"/>
  3094. </Trigger>
  3095. <Trigger Property="IsSelected" Value="true">
  3096. <Setter TargetName="Border" Property="Background" Value="#EA18979B"/>
  3097. <Setter TargetName="Border" Property="BorderBrush" Value="#EA18979B"/>
  3098. <Setter Property="Foreground" Value="#a2c2e8"/>
  3099. </Trigger>
  3100. <Trigger Property="IsEnabled" Value="false">
  3101. <Setter Property="Foreground" Value="LightGray"/>
  3102. </Trigger>
  3103. </ControlTemplate.Triggers>
  3104. </ControlTemplate>
  3105. </Setter.Value>
  3106. </Setter>
  3107. </Style>
  3108. <!--#endregion-->
  3109. <Style x:Key="image矩阵框" TargetType="Image">
  3110. <Style.Setters>
  3111. <Setter Property="VerticalAlignment" Value="Stretch" />
  3112. <Setter Property="HorizontalAlignment" Value="Stretch" />
  3113. <Setter Property="Source" Value="../Images/矩形边框.png" />
  3114. </Style.Setters>
  3115. </Style>
  3116. <Style x:Key="image系统名称" TargetType="Image">
  3117. <Style.Setters>
  3118. <Setter Property="VerticalAlignment" Value="Stretch" />
  3119. <Setter Property="HorizontalAlignment" Value="Stretch" />
  3120. <Setter Property="Source" Value="../Images/系统名称.png" />
  3121. </Style.Setters>
  3122. </Style>
  3123. <Style x:Key="image矩阵框1" TargetType="Grid">
  3124. <Style.Setters>
  3125. <Setter Property="Background">
  3126. <Setter.Value>
  3127. <ImageBrush ImageSource="../Images/Pop_bg.png" Stretch="Fill" Opacity="1" ></ImageBrush>
  3128. </Setter.Value>
  3129. </Setter>
  3130. </Style.Setters>
  3131. </Style>
  3132. <Style x:Key="imageTextBlock" TargetType="TextBlock">
  3133. <Style.Setters>
  3134. <Setter Property="Background">
  3135. <Setter.Value>
  3136. <ImageBrush ImageSource="../Images/系统名称.png" Stretch="Fill" ></ImageBrush>
  3137. </Setter.Value>
  3138. </Setter>
  3139. </Style.Setters>
  3140. </Style>
  3141. <Style x:Key="image拉出" TargetType="Grid">
  3142. <Style.Setters>
  3143. <Setter Property="Background">
  3144. <Setter.Value>
  3145. <ImageBrush ImageSource="../Images/拉出.png" Stretch="Fill" ></ImageBrush>
  3146. </Setter.Value>
  3147. </Setter>
  3148. </Style.Setters>
  3149. </Style>
  3150. <Style x:Key="image收缩" TargetType="Grid">
  3151. <Style.Setters>
  3152. <Setter Property="Background">
  3153. <Setter.Value>
  3154. <ImageBrush ImageSource="../Images/收缩.png" Stretch="Fill" ></ImageBrush>
  3155. </Setter.Value>
  3156. </Setter>
  3157. </Style.Setters>
  3158. </Style>
  3159. <Style x:Key="image右1" TargetType="Image">
  3160. <Style.Setters>
  3161. <Setter Property="VerticalAlignment" Value="Stretch" />
  3162. <Setter Property="HorizontalAlignment" Value="Stretch" />
  3163. <Setter Property="Source" Value="../Images/右1.png" />
  3164. </Style.Setters>
  3165. </Style>
  3166. <Style x:Key="image右2" TargetType="Image">
  3167. <Style.Setters>
  3168. <Setter Property="VerticalAlignment" Value="Stretch" />
  3169. <Setter Property="HorizontalAlignment" Value="Stretch" />
  3170. <Setter Property="Source" Value="../Images/右2.png" />
  3171. </Style.Setters>
  3172. </Style>
  3173. <Style x:Key="image左1" TargetType="Image">
  3174. <Style.Setters>
  3175. <Setter Property="VerticalAlignment" Value="Stretch" />
  3176. <Setter Property="HorizontalAlignment" Value="Stretch" />
  3177. <Setter Property="Source" Value="../Images/左1.png" />
  3178. </Style.Setters>
  3179. </Style>
  3180. <Style x:Key="image左2" TargetType="Image">
  3181. <Style.Setters>
  3182. <Setter Property="VerticalAlignment" Value="Stretch" />
  3183. <Setter Property="HorizontalAlignment" Value="Stretch" />
  3184. <Setter Property="Source" Value="../Images/左2.png" />
  3185. </Style.Setters>
  3186. </Style>
  3187. <Style x:Key="borderSplider" TargetType="Border">
  3188. <Style.Setters>
  3189. <Setter Property="Height" Value="1" />
  3190. <Setter Property="VerticalAlignment" Value="Top" />
  3191. <Setter Property="HorizontalAlignment" Value="Stretch" />
  3192. <Setter Property="Background">
  3193. <Setter.Value>
  3194. <ImageBrush ImageSource="../Images/1.png" ></ImageBrush>
  3195. </Setter.Value>
  3196. </Setter>
  3197. </Style.Setters>
  3198. </Style>
  3199. <Style x:Key="CommonBtn_返回" TargetType="Button">
  3200. <Style.Setters>
  3201. <Setter Property="VerticalContentAlignment" Value="Center" />
  3202. <Setter Property="Cursor" Value="Hand" />
  3203. <Setter Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  3204. <Setter Property="Width" Value="68" />
  3205. <Setter Property="Height" Value="25" />
  3206. <Setter Property="Template">
  3207. <Setter.Value>
  3208. <ControlTemplate TargetType="Button">
  3209. <Border x:Name="BD" Cursor="Hand">
  3210. <StackPanel
  3211. Margin="5,0,10,0"
  3212. HorizontalAlignment="Right"
  3213. Orientation="Horizontal">
  3214. <Border Width="16" Margin="5">
  3215. <Border.Background>
  3216. <ImageBrush ImageSource="../Images/返回按钮图标.png" />
  3217. </Border.Background>
  3218. </Border>
  3219. <TextBlock
  3220. x:Name="textBlock"
  3221. VerticalAlignment="Center"
  3222. FontSize="14"
  3223. Foreground="{DynamicResource ButtonSelectForeground}"
  3224. Text="{TemplateBinding Content}" />
  3225. <!-- Text="{TemplateBinding Content}" -->
  3226. </StackPanel>
  3227. </Border>
  3228. <ControlTemplate.Triggers>
  3229. <Trigger Property="IsMouseOver" Value="true">
  3230. <Setter TargetName="BD" Property="Background">
  3231. <Setter.Value>
  3232. <ImageBrush ImageSource="../Images/返回按钮2.png" />
  3233. </Setter.Value>
  3234. </Setter>
  3235. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  3236. </Trigger>
  3237. <Trigger Property="IsMouseOver" Value="False">
  3238. <Setter TargetName="BD" Property="Background">
  3239. <Setter.Value>
  3240. <ImageBrush ImageSource="../Images/返回按钮1.png" />
  3241. </Setter.Value>
  3242. </Setter>
  3243. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  3244. </Trigger>
  3245. <Trigger Property="IsEnabled" Value="False">
  3246. <Setter TargetName="BD" Property="Background">
  3247. <Setter.Value>
  3248. <ImageBrush ImageSource="../Images/返回按钮1.png" />
  3249. </Setter.Value>
  3250. </Setter>
  3251. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonUnSelectForeground}" />
  3252. </Trigger>
  3253. </ControlTemplate.Triggers>
  3254. </ControlTemplate>
  3255. </Setter.Value>
  3256. </Setter>
  3257. </Style.Setters>
  3258. </Style>
  3259. <Style x:Key="BtnNull" TargetType="Button">
  3260. <Style.Setters>
  3261. <Setter Property="VerticalContentAlignment" Value="Center" />
  3262. <Setter Property="Cursor" Value="Hand"/>
  3263. <Setter Property="Background" Value="Transparent"/>
  3264. <Setter Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  3265. <Setter Property="Template">
  3266. <Setter.Value>
  3267. <ControlTemplate TargetType="Button">
  3268. <Border x:Name="BD" Cursor="Hand"/>
  3269. <ControlTemplate.Triggers>
  3270. <Trigger Property="IsMouseOver" Value="true">
  3271. <Setter TargetName="BD" Property="Background" Value="Transparent"/>
  3272. </Trigger>
  3273. <Trigger Property="IsMouseOver" Value="False">
  3274. <Setter TargetName="BD" Property="Background" Value="Transparent"/>
  3275. </Trigger>
  3276. <Trigger Property="IsEnabled" Value="False">
  3277. <Setter TargetName="BD" Property="Background" Value="Transparent"/>
  3278. </Trigger>
  3279. </ControlTemplate.Triggers>
  3280. </ControlTemplate>
  3281. </Setter.Value>
  3282. </Setter>
  3283. </Style.Setters>
  3284. </Style>
  3285. <Style x:Key="timeImage" TargetType="Image">
  3286. <Style.Setters>
  3287. <Setter Property="Width" Value="20" />
  3288. <Setter Property="Source" Value="../Images/日期1.png" />
  3289. </Style.Setters>
  3290. </Style>
  3291. </ResourceDictionary>