|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916 |
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
- xmlns:Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
- xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
- xmlns:hc="https://handyorg.github.io/handycontrol"
- xmlns:local="clr-namespace:BPASmartClient.CustomResource.UserControls">
-
- <!--#region Color-->
- <SolidColorBrush x:Key="foreground" Color="#a2c2e8" />
- <SolidColorBrush x:Key="borderBrush" Color="#FF074B92" />
- <SolidColorBrush x:Key="Titleforeground" Color="#FF07D7FF" />
- <SolidColorBrush x:Key="DataGridColumnHeaderColor" Color="#00c2f4" />
- <SolidColorBrush x:Key="LabelColor" Color="#FF00EEF3" />
- <SolidColorBrush x:Key="MainTitleforeground" Color="#feffff" />
- <SolidColorBrush x:Key="ButtonSelectForeground" Color="#4fade8" />
- <SolidColorBrush x:Key="ButtonUnSelectForeground" Color="#3afdff" />
- <SolidColorBrush x:Key="MeunSelectForeground" Color="#8f723c" />
- <SolidColorBrush x:Key="MeunUnSelectForeground" Color="White" />
-
- <!--<SolidColorBrush x:Key="foreground" Color="Red" />
- <SolidColorBrush x:Key="borderBrush" Color="Red" />
- <SolidColorBrush x:Key="Titleforeground" Color="Red" />
- <SolidColorBrush x:Key="LabelColor" Color="Red" />
- <SolidColorBrush x:Key="DataGridColumnHeaderColor" Color="Red"/>
- <SolidColorBrush x:Key="MainTitleforeground" Color="Red"/>
- <SolidColorBrush x:Key="ButtonSelectForeground" Color="Red"/>
- <SolidColorBrush x:Key="ButtonUnSelectForeground" Color="Red"/>
- <SolidColorBrush x:Key="MeunSelectForeground" Color="Red"/>
- <SolidColorBrush x:Key="MeunUnSelectForeground" Color="Red"/>-->
- <!--#endregion-->
-
- <!--#region ScrollBar-->
- <Style x:Key="UpScrollBarButton" TargetType="{x:Type RepeatButton}">
- <Setter Property="OverridesDefaultStyle" Value="true" />
- <Setter Property="Cursor" Value="Hand" />
- <Setter Property="Focusable" Value="false" />
- <Setter Property="IsTabStop" Value="false" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RepeatButton}">
- <Image
- Width="8"
- Height="5"
- Source="Image/Scroll_↑.png" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="DownScrollBarButton" TargetType="{x:Type RepeatButton}">
- <Setter Property="OverridesDefaultStyle" Value="true" />
- <Setter Property="Cursor" Value="Hand" />
- <Setter Property="Focusable" Value="false" />
- <Setter Property="IsTabStop" Value="false" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RepeatButton}">
- <Image
- Width="8"
- Height="5"
- Source="Image/Scroll_↓.png" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="LeftScrollBarButton" TargetType="{x:Type RepeatButton}">
- <Setter Property="OverridesDefaultStyle" Value="true" />
- <Setter Property="Cursor" Value="Hand" />
- <Setter Property="Focusable" Value="false" />
- <Setter Property="IsTabStop" Value="false" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RepeatButton}">
- <Image
- Width="5"
- Height="8"
- Source="Image/Scroll_←.png" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="RightScrollBarButton" TargetType="{x:Type RepeatButton}">
- <Setter Property="OverridesDefaultStyle" Value="true" />
- <Setter Property="Cursor" Value="Hand" />
- <Setter Property="Focusable" Value="false" />
- <Setter Property="IsTabStop" Value="false" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RepeatButton}">
- <Image
- Width="5"
- Height="8"
- Source="Image/Scroll_→.png" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
- <Setter Property="OverridesDefaultStyle" Value="true" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Focusable" Value="false" />
- <Setter Property="IsTabStop" Value="false" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RepeatButton}">
- <Rectangle
- Width="{TemplateBinding Width}"
- Height="{TemplateBinding Height}"
- Fill="{TemplateBinding Background}" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
- <Setter Property="OverridesDefaultStyle" Value="true" />
- <Setter Property="IsTabStop" Value="false" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Thumb}">
- <Border
- x:Name="bd1"
- Margin="2,2,2,2"
- Background="#00c2f4"
- CornerRadius="3"
- Cursor="Hand"
- Opacity="1"
- SnapsToDevicePixels="true" />
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="bd1" Property="Margin" Value="-1,-1,-1,-1" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <LinearGradientBrush x:Key="HorizontalScrollBarBackground" StartPoint="0,0" EndPoint="0,1">
- <GradientStop Offset="0" Color="#E1E1E1" />
- <GradientStop Offset="0.20" Color="#EDEDED" />
- <GradientStop Offset="0.80" Color="#EDEDED" />
- <GradientStop Offset="1" Color="#E3E3E3" />
- </LinearGradientBrush>
- <Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
- <Setter Property="OverridesDefaultStyle" Value="true" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Focusable" Value="false" />
- <Setter Property="IsTabStop" Value="false" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RepeatButton}">
- <Rectangle
- Width="{TemplateBinding Width}"
- Height="{TemplateBinding Height}"
- Fill="{TemplateBinding Background}" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="{x:Type ScrollBar}">
- <Setter Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/表格标题背景2.png" Opacity="0.2" />
- </Setter.Value>
- </Setter>
- <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
- <Setter Property="Stylus.IsFlicksEnabled" Value="false" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
- <Setter Property="Opacity" Value="1" />
- <Setter Property="MinWidth" Value="3" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ScrollBar}">
- <Border
- Width="10"
- Margin="0,0,0,0"
- Background="{TemplateBinding Background}"
- CornerRadius="2"
- Opacity="{TemplateBinding Opacity}">
- <Grid x:Name="Bg" SnapsToDevicePixels="true">
- <Grid.RowDefinitions>
- <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
- <RowDefinition Height="*" />
- <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
- </Grid.RowDefinitions>
- <RepeatButton
- Themes:ScrollChrome.ScrollGlyph="UpArrow"
- Command="{x:Static ScrollBar.LineUpCommand}"
- IsEnabled="{TemplateBinding IsMouseOver}"
- Style="{StaticResource UpScrollBarButton}" />
- <Track
- x:Name="PART_Track"
- Grid.Row="1"
- IsDirectionReversed="true"
- IsEnabled="{TemplateBinding IsMouseOver}">
- <Track.DecreaseRepeatButton>
- <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}" />
- </Track.DecreaseRepeatButton>
-
- <Track.IncreaseRepeatButton>
- <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}" />
- </Track.IncreaseRepeatButton>
- <Track.Thumb>
- <Thumb Themes:ScrollChrome.ScrollGlyph="VerticalGripper" Style="{StaticResource ScrollBarThumb}" />
- </Track.Thumb>
- </Track>
- <RepeatButton
- Grid.Row="2"
- Themes:ScrollChrome.ScrollGlyph="DownArrow"
- Command="{x:Static ScrollBar.LineDownCommand}"
- IsEnabled="{TemplateBinding IsMouseOver}"
- Style="{StaticResource DownScrollBarButton}" />
- </Grid>
- </Border>
-
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="Orientation" Value="Horizontal">
-
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ScrollBar}">
- <Border
- Height="10"
- Margin="0,0,0,0"
- Background="{TemplateBinding Background}"
- CornerRadius="2"
- Opacity="{TemplateBinding Opacity}">
- <Grid
- x:Name="Bg"
- Background="{TemplateBinding Background}"
- SnapsToDevicePixels="true">
- <Grid.ColumnDefinitions>
- <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" />
- </Grid.ColumnDefinitions>
- <RepeatButton
- Themes:ScrollChrome.ScrollGlyph="LeftArrow"
- Command="{x:Static ScrollBar.LineLeftCommand}"
- IsEnabled="{TemplateBinding IsMouseOver}"
- Style="{StaticResource LeftScrollBarButton}" />
- <Track
- x:Name="PART_Track"
- Grid.Column="1"
- IsEnabled="{TemplateBinding IsMouseOver}">
- <Track.DecreaseRepeatButton>
- <RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource HorizontalScrollBarPageButton}" />
- </Track.DecreaseRepeatButton>
- <Track.IncreaseRepeatButton>
- <RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource HorizontalScrollBarPageButton}" />
- </Track.IncreaseRepeatButton>
- <Track.Thumb>
- <Thumb Themes:ScrollChrome.ScrollGlyph="HorizontalGripper" Style="{StaticResource ScrollBarThumb}" />
- </Track.Thumb>
- </Track>
- <RepeatButton
- Grid.Column="2"
- Themes:ScrollChrome.ScrollGlyph="RightArrow"
- Command="{x:Static ScrollBar.LineRightCommand}"
- IsEnabled="{TemplateBinding IsMouseOver}"
- Style="{StaticResource RightScrollBarButton}" />
- </Grid>
- </Border>
-
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Trigger>
- </Style.Triggers>
- </Style>
- <LinearGradientBrush x:Key="VerticalScrollBarBackground" StartPoint="0,0" EndPoint="1,0">
- <GradientStop Offset="0" Color="#E1E1E1" />
- <GradientStop Offset="0.20" Color="#EDEDED" />
- <GradientStop Offset="0.80" Color="#EDEDED" />
- <GradientStop Offset="1" Color="#E3E3E3" />
- </LinearGradientBrush>
- <!--#endregion-->
-
- <!--#region Menu-->
- <SolidColorBrush x:Key="Menu.Static.Background" Color="#FFF0F0F0" />
- <SolidColorBrush x:Key="Expander.Static.Circle.Stroke" Color="#FF333333" />
- <SolidColorBrush x:Key="Expander.Static.Circle.Fill" Color="#FFFFFFFF" />
- <SolidColorBrush x:Key="Expander.Static.Arrow.Stroke" Color="#FF333333" />
- <SolidColorBrush x:Key="Expander.MouseOver.Circle.Stroke" Color="#FF5593FF" />
- <SolidColorBrush x:Key="Expander.MouseOver.Circle.Fill" Color="#FFF3F9FF" />
- <SolidColorBrush x:Key="Expander.MouseOver.Arrow.Stroke" Color="#FF000000" />
- <SolidColorBrush x:Key="Expander.Pressed.Circle.Stroke" Color="#FF3C77DD" />
- <SolidColorBrush x:Key="Expander.Pressed.Circle.Fill" Color="#FFD9ECFF" />
- <SolidColorBrush x:Key="Expander.Pressed.Arrow.Stroke" Color="#FF000000" />
- <SolidColorBrush x:Key="Expander.Disabled.Circle.Stroke" Color="#FFBCBCBC" />
- <SolidColorBrush x:Key="Expander.Disabled.Circle.Fill" Color="#FFE6E6E6" />
- <SolidColorBrush x:Key="Expander.Disabled.Arrow.Stroke" Color="#FF707070" />
- <Style x:Key="ExpanderHeaderFocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Border>
- <Rectangle
- Margin="0"
- SnapsToDevicePixels="true"
- Stroke="Black"
- StrokeDashArray="1 2"
- StrokeThickness="1" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Border Padding="{TemplateBinding Padding}" Cursor="Hand">
- <Grid
- Height="35"
- Margin="5"
- SnapsToDevicePixels="False">
- <Grid.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/Exp.png" />
- </Grid.Background>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="35" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Image
- Width="15"
- Margin="10,0,0,0"
- Source="/BPASmartClient.CustomResource;component/Image/上箭头.png" />
- <Ellipse
- x:Name="circle"
- Width="19"
- Height="19"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Fill="{StaticResource Expander.Static.Circle.Fill}"
- Stroke="{StaticResource Expander.Static.Circle.Stroke}"
- Visibility="Collapsed" />
- <Path
- x:Name="arrow"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M 1,1.5 L 4.5,5 L 8,1.5"
- SnapsToDevicePixels="false"
- Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
- StrokeThickness="2"
- Visibility="Collapsed" />
- <ContentPresenter
- Grid.Column="1"
- Margin="4,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="True" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
- <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
- <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
- <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
- <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
- <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
- <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
- <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3" />
- <SolidColorBrush x:Key="TextBox.MouseOver.Border" Color="#FF7EB4EA" />
- <SolidColorBrush x:Key="TextBox.Focus.Border" Color="#FF569DE5" />
- <Style x:Key="ExpanderUpHeaderStyle" TargetType="{x:Type ToggleButton}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Border Padding="{TemplateBinding Padding}">
- <Grid Background="Transparent" SnapsToDevicePixels="False">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="19" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid>
- <Grid.LayoutTransform>
- <TransformGroup>
- <TransformGroup.Children>
- <TransformCollection>
- <RotateTransform Angle="180" />
- </TransformCollection>
- </TransformGroup.Children>
- </TransformGroup>
- </Grid.LayoutTransform>
- <Ellipse
- x:Name="circle"
- Width="19"
- Height="19"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Fill="{StaticResource Expander.Static.Circle.Fill}"
- Stroke="{StaticResource Expander.Static.Circle.Stroke}" />
- <Path
- x:Name="arrow"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M 1,1.5 L 4.5,5 L 8,1.5"
- SnapsToDevicePixels="false"
- Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
- StrokeThickness="2" />
- </Grid>
- <ContentPresenter
- Grid.Column="1"
- Margin="4,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="True" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
- <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
- <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
- <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
- <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
- <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
- <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
- <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="ExpanderLeftHeaderStyle" TargetType="{x:Type ToggleButton}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Border Padding="{TemplateBinding Padding}">
- <Grid Background="Transparent" SnapsToDevicePixels="False">
- <Grid.RowDefinitions>
- <RowDefinition Height="19" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid>
- <Grid.LayoutTransform>
- <TransformGroup>
- <TransformGroup.Children>
- <TransformCollection>
- <RotateTransform Angle="90" />
- </TransformCollection>
- </TransformGroup.Children>
- </TransformGroup>
- </Grid.LayoutTransform>
- <Ellipse
- x:Name="circle"
- Width="19"
- Height="19"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Fill="{StaticResource Expander.Static.Circle.Fill}"
- Stroke="{StaticResource Expander.Static.Circle.Stroke}" />
- <Path
- x:Name="arrow"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M 1,1.5 L 4.5,5 L 8,1.5"
- SnapsToDevicePixels="false"
- Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
- StrokeThickness="2" />
- </Grid>
- <ContentPresenter
- Grid.Row="1"
- Margin="0,4,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="True" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
- <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
- <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
- <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
- <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
- <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
- <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
- <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Border Padding="{TemplateBinding Padding}">
- <Grid Background="Transparent" SnapsToDevicePixels="False">
- <Grid.RowDefinitions>
- <RowDefinition Height="19" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid>
- <Grid.LayoutTransform>
- <TransformGroup>
- <TransformGroup.Children>
- <TransformCollection>
- <RotateTransform Angle="-90" />
- </TransformCollection>
- </TransformGroup.Children>
- </TransformGroup>
- </Grid.LayoutTransform>
- <Ellipse
- x:Name="circle"
- Width="19"
- Height="19"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Fill="{StaticResource Expander.Static.Circle.Fill}"
- Stroke="{StaticResource Expander.Static.Circle.Stroke}" />
- <Path
- x:Name="arrow"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M 1,1.5 L 4.5,5 L 8,1.5"
- SnapsToDevicePixels="false"
- Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
- StrokeThickness="2" />
- </Grid>
- <ContentPresenter
- Grid.Row="1"
- Margin="0,4,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="True" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
- <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
- <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
- <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
- <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
- <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
- <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
- <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="{x:Type Expander}">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="VerticalContentAlignment" Value="Stretch" />
- <Setter Property="BorderBrush" Value="Transparent" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Expander}">
- <Border
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="3"
- SnapsToDevicePixels="true">
- <DockPanel>
- <ToggleButton
- x:Name="HeaderSite"
- MinWidth="0"
- MinHeight="0"
- Margin="1"
- Padding="{TemplateBinding Padding}"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding Header}"
- ContentTemplate="{TemplateBinding HeaderTemplate}"
- ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
- DockPanel.Dock="Top"
- FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
- FontFamily="{TemplateBinding FontFamily}"
- FontSize="{TemplateBinding FontSize}"
- FontStretch="{TemplateBinding FontStretch}"
- FontStyle="{TemplateBinding FontStyle}"
- FontWeight="{TemplateBinding FontWeight}"
- Foreground="{TemplateBinding Foreground}"
- IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
- Style="{StaticResource ExpanderDownHeaderStyle}" />
- <ContentPresenter
- x:Name="ExpandSite"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- DockPanel.Dock="Bottom"
- Focusable="false"
- Visibility="Collapsed" />
- </DockPanel>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsExpanded" Value="true">
- <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
- </Trigger>
- <Trigger Property="ExpandDirection" Value="Right">
- <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Right" />
- <Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Left" />
- <Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderRightHeaderStyle}" />
- </Trigger>
- <Trigger Property="ExpandDirection" Value="Up">
- <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Top" />
- <Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Bottom" />
- <Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderUpHeaderStyle}" />
- </Trigger>
- <Trigger Property="ExpandDirection" Value="Left">
- <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Left" />
- <Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Right" />
- <Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderLeftHeaderStyle}" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="{x:Type Menu}">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MenuFontFamilyKey}}" />
- <Setter Property="FontSize" Value="16" />
- <Setter Property="FontStyle" Value="{DynamicResource {x:Static SystemFonts.MenuFontStyleKey}}" />
- <Setter Property="FontWeight" Value="{DynamicResource {x:Static SystemFonts.MenuFontWeightKey}}" />
- <Setter Property="HorizontalAlignment" Value="Left" />
- <Setter Property="VerticalAlignment" Value="Top" />
- <Setter Property="Margin" Value="10,10,0,0" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Menu}">
- <Border
- Padding="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="true">
- <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
- <!--#region PasswordBox-->
- <Style TargetType="{x:Type PasswordBox}">
- <!-- ✹✬✮✭✱✷✸❆❊☯☧☬♆➵➶➷➸➻➼➫➬➩➪➭➯➱➽⊙◎▧▨◐◑▒◊▣●♒☺❤☻✿☢ -->
- <Setter Property="PasswordChar" Value="❤" />
- <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
- <Setter Property="BorderBrush" Value="{StaticResource TextBox.Static.Border}" />
- <Setter Property="Foreground" Value="{DynamicResource foreground}" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
- <Setter Property="HorizontalContentAlignment" Value="Left" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="AllowDrop" Value="true" />
- <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
- <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
- <Setter Property="CaretBrush" Value="White" />
- <Setter Property="Height" Value="24" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type PasswordBox}">
- <Border
- x:Name="border"
- BorderBrush="{DynamicResource borderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="True">
- <ScrollViewer
- x:Name="PART_ContentHost"
- Focusable="false"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="border" Property="Opacity" Value="0.56" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <!--<Setter TargetName="border" Property="BorderBrush" Value="{StaticResource TextBox.MouseOver.Border}" />-->
- </Trigger>
- <Trigger Property="IsKeyboardFocused" Value="true">
- <!--<Setter TargetName="border" Property="BorderBrush" Value="{StaticResource TextBox.Focus.Border}" />-->
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
- <Condition Property="IsSelectionActive" Value="false" />
- </MultiTrigger.Conditions>
- <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
- </MultiTrigger>
- </Style.Triggers>
- </Style>
- <!--#endregion-->
-
- <!--#region DatePicker-->
- <Style x:Key="DatePickerCalendarStyle_1" TargetType="{x:Type Calendar}">
- <Setter Property="Foreground" Value="{DynamicResource foreground}" />
- <Setter Property="CalendarButtonStyle" Value="{DynamicResource ButtonStyle_Calendar}" />
- <Setter Property="CalendarDayButtonStyle" Value="{DynamicResource DayButtonStyle_Calendar}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Calendar}">
- <StackPanel x:Name="PART_Root" HorizontalAlignment="Center">
- <CalendarItem
- x:Name="PART_CalendarItem"
- BorderBrush="#FF051532"
- BorderThickness="{TemplateBinding BorderThickness}"
- Style="{TemplateBinding CalendarItemStyle}"
- Template="{DynamicResource CalendarItemTemplate1}">
- <CalendarItem.Background>
- <ImageBrush />
- </CalendarItem.Background>
- </CalendarItem>
- </StackPanel>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="{x:Type DatePickerTextBox}">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
- <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
- <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
- <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type DatePickerTextBox}">
- <Grid>
- <Grid.Resources>
- <SolidColorBrush x:Key="WatermarkBrush" Color="#FFAAAAAA" />
- </Grid.Resources>
- <Border
- x:Name="Border"
- Padding="{TemplateBinding Padding}"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="1"
- Opacity="1">
- <Grid
- x:Name="WatermarkContent"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
- <Border x:Name="ContentElement" BorderThickness="1" />
- <Border x:Name="watermark_decorator" BorderThickness="1">
- <ContentControl
- x:Name="PART_Watermark"
- Padding="2"
- Focusable="False"
- IsHitTestVisible="False"
- Opacity="0" />
- </Border>
- <ScrollViewer
- x:Name="PART_ContentHost"
- Margin="0"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
- <Border
- x:Name="FocusVisual"
- BorderBrush="#FF45D6FA"
- CornerRadius="1"
- IsHitTestVisible="False"
- Opacity="0" />
- </Grid>
- </Border>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="CommonStates">
- <VisualStateGroup.Transitions>
- <VisualTransition GeneratedDuration="0" />
- <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
- </VisualStateGroup.Transitions>
- <VisualState x:Name="Normal" />
- <VisualState x:Name="MouseOver" />
- </VisualStateGroup>
- <VisualStateGroup x:Name="WatermarkStates">
- <VisualStateGroup.Transitions>
- <VisualTransition GeneratedDuration="0" />
- </VisualStateGroup.Transitions>
- <VisualState x:Name="Unwatermarked" />
- <VisualState x:Name="Watermarked">
- <Storyboard>
- <DoubleAnimation
- Storyboard.TargetName="ContentElement"
- Storyboard.TargetProperty="Opacity"
- To="0"
- Duration="0" />
- <DoubleAnimation
- Storyboard.TargetName="PART_Watermark"
- Storyboard.TargetProperty="Opacity"
- To="1"
- Duration="0" />
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- <VisualStateGroup x:Name="FocusStates">
- <VisualStateGroup.Transitions>
- <VisualTransition GeneratedDuration="0" />
- </VisualStateGroup.Transitions>
- <VisualState x:Name="Unfocused" />
- <VisualState x:Name="Focused">
- <Storyboard>
- <DoubleAnimation
- Storyboard.TargetName="FocusVisual"
- Storyboard.TargetProperty="Opacity"
- To="1"
- Duration="0" />
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="{x:Type DatePicker}">
- <Setter Property="Foreground" Value="{DynamicResource foreground}" />
- <Setter Property="IsTodayHighlighted" Value="True" />
- <Setter Property="SelectedDateFormat" Value="Short" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Padding" Value="2" />
- <Setter Property="Height" Value="24" />
- <Setter Property="CalendarStyle" Value="{DynamicResource DatePickerCalendarStyle_1}" />
- <Setter Property="BorderBrush" Value="{DynamicResource borderBrush}" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="FontFamily" Value="../Fonts/#Quartz M" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type DatePicker}">
- <Border
- Padding="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <Grid
- x:Name="PART_Root"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
- <Grid.Resources>
- <SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF" />
- <ControlTemplate x:Key="DropDownButtonTemplate" TargetType="{x:Type Button}">
- <Grid>
- <Grid
- Width="15"
- Height="15"
- Margin="0,2,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- Background="#11FFFFFF"
- FlowDirection="LeftToRight">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="20*" />
- <ColumnDefinition Width="20*" />
- <ColumnDefinition Width="20*" />
- <ColumnDefinition Width="20*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="23*" />
- <RowDefinition Height="19*" />
- <RowDefinition Height="19*" />
- <RowDefinition Height="19*" />
- </Grid.RowDefinitions>
- <Border
- x:Name="Highlight"
- Grid.Row="0"
- Grid.RowSpan="4"
- Grid.ColumnSpan="4"
- Margin="-1"
- BorderBrush="#FF45D6FA"
- BorderThickness="1"
- CornerRadius="0,0,1,1"
- Opacity="0"
- Visibility="Hidden" />
- <Border
- x:Name="Background"
- Grid.Row="1"
- Grid.RowSpan="3"
- Grid.ColumnSpan="4"
- Margin="0,-1,0,0"
- Background="#FF1F3B53"
- BorderBrush="#FFFFFFFF"
- BorderThickness="1"
- CornerRadius=".5"
- Opacity="1"
- Visibility="Hidden" />
- <Border
- x:Name="BackgroundGradient"
- Grid.Row="1"
- Grid.RowSpan="3"
- Grid.ColumnSpan="4"
- Margin="0,-1,0,0"
- BorderBrush="#BF000000"
- BorderThickness="1"
- CornerRadius=".5"
- Opacity="1"
- Visibility="Hidden">
- <Border.Background>
- <LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
- <GradientStop Offset="0" Color="#FFFFFFFF" />
- <GradientStop Offset="0.375" Color="#F9FFFFFF" />
- <GradientStop Offset="0.625" Color="#E5FFFFFF" />
- <GradientStop Offset="1" Color="#C6FFFFFF" />
- </LinearGradientBrush>
- </Border.Background>
- </Border>
- <Rectangle
- Grid.RowSpan="1"
- Grid.ColumnSpan="4"
- StrokeThickness="1"
- Visibility="Hidden">
- <Rectangle.Fill>
- <LinearGradientBrush StartPoint="0.46,1.6" EndPoint="0.3,-1.1">
- <GradientStop Color="#FF4084BD" />
- <GradientStop Offset="1" Color="#FFAFCFEA" />
- </LinearGradientBrush>
- </Rectangle.Fill>
- <Rectangle.Stroke>
- <LinearGradientBrush StartPoint="0.48,1.25" EndPoint="0.48,-1">
- <GradientStop Color="#FF494949" />
- <GradientStop Offset="1" Color="#FF9F9F9F" />
- </LinearGradientBrush>
- </Rectangle.Stroke>
- </Rectangle>
- <Path
- Grid.Row="1"
- Grid.RowSpan="3"
- Grid.Column="0"
- Grid.ColumnSpan="4"
- Margin="4,3,4,3"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M11.426758,8.4305077 L11.749023,8.4305077 L11.749023,16.331387 L10.674805,16.331387 L10.674805,10.299648 L9.0742188,11.298672 L9.0742188,10.294277 C9.4788408,10.090176 9.9094238,9.8090878 10.365967,9.4510155 C10.82251,9.0929432 11.176106,8.7527733 11.426758,8.4305077 z M14.65086,8.4305077 L18.566387,8.4305077 L18.566387,9.3435936 L15.671368,9.3435936 L15.671368,11.255703 C15.936341,11.058764 16.27293,10.960293 16.681133,10.960293 C17.411602,10.960293 17.969301,11.178717 18.354229,11.615566 C18.739157,12.052416 18.931622,12.673672 18.931622,13.479336 C18.931622,15.452317 18.052553,16.438808 16.294415,16.438808 C15.560365,16.438808 14.951641,16.234707 14.468243,15.826504 L14.881817,14.929531 C15.368796,15.326992 15.837872,15.525723 16.289043,15.525723 C17.298809,15.525723 17.803692,14.895514 17.803692,13.635098 C17.803692,12.460618 17.305971,11.873379 16.310528,11.873379 C15.83071,11.873379 15.399232,12.079271 15.016094,12.491055 L14.65086,12.238613 z"
- Fill="#FF2F2F2F"
- RenderTransformOrigin="0.5,0.5"
- Stretch="Fill"
- Visibility="Hidden" />
- <Ellipse
- Grid.ColumnSpan="4"
- Width="3"
- Height="3"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Fill="#FFFFFFFF"
- StrokeThickness="0"
- Visibility="Hidden" />
- <Border
- x:Name="DisabledVisual"
- Grid.Row="0"
- Grid.RowSpan="4"
- Grid.ColumnSpan="4"
- BorderBrush="#B2FFFFFF"
- BorderThickness="1"
- CornerRadius="0,0,.5,.5"
- Opacity="0"
- Visibility="Hidden" />
- <Image
- Grid.RowSpan="10"
- Grid.Column="0"
- Grid.ColumnSpan="10"
- Source="/BPASmartClient.CustomResource;component/Image/日历.png" />
-
- </Grid>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="CommonStates">
- <VisualStateGroup.Transitions>
- <VisualTransition GeneratedDuration="0" />
- <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
- <VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
- </VisualStateGroup.Transitions>
- <VisualState x:Name="Normal" />
- <VisualState x:Name="MouseOver">
- <Storyboard>
- <ColorAnimation
- Storyboard.TargetName="Background"
- Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
- To="#FF448DCA"
- Duration="0" />
- <ColorAnimationUsingKeyFrames
- BeginTime="0"
- Storyboard.TargetName="BackgroundGradient"
- Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
- Duration="00:00:00.001">
- <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF" />
- </ColorAnimationUsingKeyFrames>
- <ColorAnimationUsingKeyFrames
- BeginTime="0"
- Storyboard.TargetName="BackgroundGradient"
- Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
- Duration="00:00:00.001">
- <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF" />
- </ColorAnimationUsingKeyFrames>
- <ColorAnimationUsingKeyFrames
- BeginTime="0"
- Storyboard.TargetName="BackgroundGradient"
- Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
- Duration="00:00:00.001">
- <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF" />
- </ColorAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- <VisualState x:Name="Pressed">
- <Storyboard>
- <ColorAnimationUsingKeyFrames
- BeginTime="0"
- Storyboard.TargetName="Background"
- Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
- Duration="00:00:00.001">
- <SplineColorKeyFrame KeyTime="0" Value="#FF448DCA" />
- </ColorAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames
- BeginTime="0"
- Storyboard.TargetName="Highlight"
- Storyboard.TargetProperty="(UIElement.Opacity)"
- Duration="00:00:00.001">
- <SplineDoubleKeyFrame KeyTime="0" Value="1" />
- </DoubleAnimationUsingKeyFrames>
- <ColorAnimationUsingKeyFrames
- BeginTime="0"
- Storyboard.TargetName="BackgroundGradient"
- Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
- Duration="00:00:00.001">
- <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF" />
- </ColorAnimationUsingKeyFrames>
- <ColorAnimationUsingKeyFrames
- BeginTime="0"
- Storyboard.TargetName="BackgroundGradient"
- Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
- Duration="00:00:00.001">
- <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF" />
- </ColorAnimationUsingKeyFrames>
- <ColorAnimationUsingKeyFrames
- BeginTime="0"
- Storyboard.TargetName="BackgroundGradient"
- Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
- Duration="00:00:00.001">
- <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF" />
- </ColorAnimationUsingKeyFrames>
- <ColorAnimationUsingKeyFrames
- BeginTime="0"
- Storyboard.TargetName="BackgroundGradient"
- Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)"
- Duration="00:00:00.001">
- <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF" />
- </ColorAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- <VisualState x:Name="Disabled" />
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Grid>
- </ControlTemplate>
- </Grid.Resources>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <Button
- x:Name="PART_Button"
- Grid.Row="0"
- Grid.Column="1"
- Width="20"
- Margin="3,0,3,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Focusable="False"
- Foreground="{TemplateBinding Foreground}"
- Template="{StaticResource DropDownButtonTemplate}" />
- <DatePickerTextBox
- x:Name="PART_TextBox"
- Grid.Row="0"
- Grid.Column="0"
- HorizontalContentAlignment="Stretch"
- VerticalContentAlignment="Stretch"
- Focusable="{TemplateBinding Focusable}" />
- <Grid
- x:Name="PART_DisabledVisual"
- Grid.Row="0"
- Grid.Column="0"
- Grid.ColumnSpan="2"
- IsHitTestVisible="False"
- Opacity="0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
-
- <Rectangle
- Grid.Row="0"
- Grid.Column="0"
- RadiusX="1"
- RadiusY="1" />
- <Rectangle
- Grid.Row="0"
- Grid.Column="1"
- Width="19"
- Height="18"
- Margin="3,0,3,0"
- Fill="#A5FFFFFF"
- RadiusX="1"
- RadiusY="1" />
-
- <Popup
- x:Name="PART_Popup"
- AllowsTransparency="True"
- Placement="Bottom"
- PlacementTarget="{Binding ElementName=PART_TextBox}"
- StaysOpen="False" />
- </Grid>
- </Grid>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="CommonStates">
- <VisualState x:Name="Normal" />
- <VisualState x:Name="Disabled">
- <Storyboard>
- <DoubleAnimation
- Storyboard.TargetName="PART_DisabledVisual"
- Storyboard.TargetProperty="Opacity"
- To="1"
- Duration="0" />
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Border>
- <ControlTemplate.Triggers>
- <DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="false">
- <Setter TargetName="PART_TextBox" Property="Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}}" />
- </DataTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="arrowPath" TargetType="Path">
- <Setter Property="Data" Value="M5.5555,8.4319998 L0.5,0.5 L10.611,0.5 z" />
- <Setter Property="Fill" Value="Gray" />
- <Setter Property="Stretch" Value="Fill" />
- <Setter Property="StrokeThickness" Value="1" />
- <Setter Property="Stroke" Value="Black" />
- <Setter Property="Width" Value="8" />
- <Setter Property="Height" Value="5" />
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="Cursor" Value="Hand" />
- </Style>
- <Style x:Key="DayButtonStyle_Calendar" TargetType="CalendarDayButton">
- <Setter Property="Background" Value="#063172" />
- <Setter Property="BorderBrush" Value="Transparent" />
- <Setter Property="FontSize" Value="12" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type CalendarDayButton}">
- <Grid x:Name="Grid" Margin="0">
- <Border
- x:Name="Bg"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="1" />
- <ContentPresenter
- x:Name="NormalText"
- Margin="5,2,5,2"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- TextElement.Foreground="{TemplateBinding Foreground}" />
- </Grid>
- <ControlTemplate.Triggers>
- <!-- 不在当月的日期 -->
- <Trigger Property="IsInactive" Value="True">
- <Setter TargetName="Grid" Property="Opacity" Value="0.4" />
- </Trigger>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Foreground" Value="Lime" />
- <Setter Property="Background">
- <Setter.Value>
- <RadialGradientBrush>
- <GradientStop Color="#04214e" />
- <GradientStop Offset="0.9" Color="#3051a6" />
- </RadialGradientBrush>
- </Setter.Value>
- </Setter>
- <Setter Property="BorderBrush" Value="#0765f7" />
- </Trigger>
- <Trigger Property="IsToday" Value="True">
- <Setter Property="Foreground" Value="White" />
- <Setter Property="Background">
- <Setter.Value>
- <RadialGradientBrush>
- <GradientStop Color="#04214e" />
- <GradientStop Offset="0.9" Color="#3051a6" />
- </RadialGradientBrush>
- </Setter.Value>
- </Setter>
- <Setter Property="BorderBrush" Value="#0765f7" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Foreground" Value="Yellow" />
- <Setter Property="Background">
- <Setter.Value>
- <RadialGradientBrush>
- <GradientStop Color="#04214e" />
- <GradientStop Offset="0.9" Color="#3051a6" />
- </RadialGradientBrush>
- </Setter.Value>
- </Setter>
- <Setter Property="BorderBrush" Value="#0765f7" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="ButtonStyle_Calendar" TargetType="Button">
- <Setter Property="Foreground" Value="{DynamicResource Titleforeground}" />
- <Setter Property="FontSize" Value="12" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border
- Name="TitleBarBr"
- Margin="5"
- Background="Transparent"
- BorderBrush="#0a60e6"
- BorderThickness="0.5"
- CornerRadius="4">
- <ContentPresenter
- Margin="{TemplateBinding Margin}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="False">
- <Setter TargetName="TitleBarBr" Property="Background">
- <Setter.Value>
- <RadialGradientBrush>
- <GradientStop Color="#04214e" />
- <GradientStop Offset="0.9" Color="#023051A6" />
- </RadialGradientBrush>
- </Setter.Value>
- </Setter>
- <Setter TargetName="TitleBarBr" Property="BorderThickness" Value="0.7" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="False">
- <Setter TargetName="TitleBarBr" Property="Background" Value="Transparent" />
- <Setter TargetName="TitleBarBr" Property="BorderThickness" Value="0" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <ControlTemplate x:Key="CalendarItemTemplate1" TargetType="{x:Type CalendarItem}">
- <ControlTemplate.Resources>
- <DataTemplate x:Key="{x:Static CalendarItem.DayTitleTemplateResourceKey}">
- <TextBlock
- Margin="0,6,0,6"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontFamily="Verdana"
- FontSize="14"
- FontWeight="Normal"
- Foreground="{DynamicResource foreground}"
- Text="{Binding}" />
- </DataTemplate>
- </ControlTemplate.Resources>
- <Grid x:Name="PART_Root">
- <Grid.Resources>
- <SolidColorBrush x:Key="DisabledColor" Color="#A5FFFFFF" />
- </Grid.Resources>
- <Border
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="1">
- <Border
- Background="#FF04214E"
- BorderBrush="#FF00499D"
- BorderThickness="1,1,1,1"
- CornerRadius="1,1,1,1">
- <Grid>
- <Grid.Resources>
- <ControlTemplate x:Key="PreviousButtonTemplate" TargetType="{x:Type Button}">
- <Grid Cursor="Hand">
- <Rectangle Opacity="1" Stretch="Fill" />
- <Grid>
- <Path
- x:Name="path"
- Width="6"
- Height="10"
- Margin="14,-6,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Data="M288.75,232.25 L288.75,240.625 L283,236.625 z"
- Fill="#FF1473E6"
- Stretch="Fill" />
- </Grid>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="CommonStates">
- <VisualState x:Name="Normal" />
- <VisualState x:Name="MouseOver" />
- <VisualState x:Name="Disabled" />
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Grid>
- </ControlTemplate>
- <ControlTemplate x:Key="NextButtonTemplate" TargetType="{x:Type Button}">
- <Grid Cursor="Hand">
- <Rectangle Opacity="1" Stretch="Fill" />
- <Grid>
- <Path
- x:Name="path"
- Width="6"
- Height="10"
- Margin="0,-6,14,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Data="M282.875,231.875 L282.875,240.375 L288.625,236 z"
- Fill="#FF1473E6"
- Stretch="Fill" />
- </Grid>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="CommonStates">
- <VisualState x:Name="Normal" />
- <VisualState x:Name="MouseOver" />
- <VisualState x:Name="Disabled" />
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Grid>
- </ControlTemplate>
- <ControlTemplate x:Key="HeaderButtonTemplate" TargetType="{x:Type Button}">
- <Grid Cursor="Hand">
- <ContentPresenter
- x:Name="buttonContent"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding Content}"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- TextElement.FontSize="14"
- TextElement.FontWeight="Normal"
- TextElement.Foreground="{DynamicResource Titleforeground}" />
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="CommonStates">
- <VisualState x:Name="Normal" />
- <VisualState x:Name="MouseOver">
- <Storyboard>
- <ColorAnimation
- Storyboard.TargetName="buttonContent"
- Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)"
- To="#FF73A9D8"
- Duration="0" />
- </Storyboard>
- </VisualState>
- <VisualState x:Name="Disabled">
- <Storyboard>
- <DoubleAnimation
- Storyboard.TargetName="buttonContent"
- Storyboard.TargetProperty="Opacity"
- To=".5"
- Duration="0" />
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Grid>
- </ControlTemplate>
- </Grid.Resources>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Button
- x:Name="PART_PreviousButton"
- Grid.Row="0"
- Grid.Column="0"
- Width="28"
- Height="20"
- HorizontalAlignment="Left"
- Focusable="False"
- Template="{StaticResource PreviousButtonTemplate}" />
- <Button
- x:Name="PART_HeaderButton"
- Grid.Row="0"
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Cursor="Hand"
- Focusable="False"
- FontSize="10.5"
- FontWeight="Bold"
- Template="{StaticResource HeaderButtonTemplate}" />
- <Button
- x:Name="PART_NextButton"
- Grid.Row="0"
- Grid.Column="2"
- Width="28"
- Height="20"
- HorizontalAlignment="Right"
- Focusable="False"
- Template="{StaticResource NextButtonTemplate}" />
- <Grid
- x:Name="PART_MonthView"
- Grid.Row="1"
- Grid.ColumnSpan="3"
- Margin="6,-1,6,6"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Visibility="Visible">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- </Grid>
- <Grid
- x:Name="PART_YearView"
- Grid.Row="1"
- Grid.ColumnSpan="3"
- Margin="6,-3,7,6"
- HorizontalAlignment="Center"
- Visibility="Hidden">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- </Grid>
- </Grid>
- </Border>
- </Border>
- <Rectangle
- x:Name="PART_DisabledVisual"
- Fill="{StaticResource DisabledColor}"
- Opacity="0"
- RadiusX="2"
- RadiusY="2"
- Stretch="Fill"
- Stroke="{StaticResource DisabledColor}"
- StrokeThickness="1"
- Visibility="Collapsed" />
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="CommonStates">
- <VisualState x:Name="Normal" />
- <VisualState x:Name="Disabled">
- <Storyboard>
- <DoubleAnimation
- Storyboard.TargetName="PART_DisabledVisual"
- Storyboard.TargetProperty="Opacity"
- To="1"
- Duration="0" />
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter TargetName="PART_DisabledVisual" Property="Visibility" Value="Visible" />
- </Trigger>
- <DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Year">
- <Setter TargetName="PART_MonthView" Property="Visibility" Value="Hidden" />
- <Setter TargetName="PART_YearView" Property="Visibility" Value="Visible" />
- </DataTrigger>
- <DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Decade">
- <Setter TargetName="PART_MonthView" Property="Visibility" Value="Hidden" />
- <Setter TargetName="PART_YearView" Property="Visibility" Value="Visible" />
- </DataTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <Style TargetType="{x:Type Calendar}">
- <Setter Property="Foreground" Value="{DynamicResource foreground}" />
- <Setter Property="CalendarButtonStyle" Value="{DynamicResource ButtonStyle_Calendar}" />
- <Setter Property="CalendarDayButtonStyle" Value="{DynamicResource DayButtonStyle_Calendar}" />
- <Setter Property="FontFamily" Value="../Fonts/#Quartz M" />
- <Setter Property="Background">
- <Setter.Value>
- <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStop Offset="0" Color="#FFE4EAF0" />
- <GradientStop Offset="0.16" Color="#FFECF0F4" />
- <GradientStop Offset="0.16" Color="#FFFCFCFD" />
- <GradientStop Offset="1" Color="#FFFFFFFF" />
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Setter Property="BorderBrush">
- <Setter.Value>
- <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStop Offset="0" Color="#FFA3AEB9" />
- <GradientStop Offset="0.375" Color="#FF8399A9" />
- <GradientStop Offset="0.375" Color="#FF718597" />
- <GradientStop Offset="1" Color="#FF617584" />
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Calendar}">
- <StackPanel x:Name="PART_Root" HorizontalAlignment="Center">
- <CalendarItem
- x:Name="PART_CalendarItem"
- BorderBrush="#FF051532"
- BorderThickness="{TemplateBinding BorderThickness}"
- Cursor="Hand"
- Style="{TemplateBinding CalendarItemStyle}"
- Template="{DynamicResource CalendarItemTemplate1}">
- <CalendarItem.Background>
- <ImageBrush />
- </CalendarItem.Background>
- </CalendarItem>
- </StackPanel>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
- <!--#region DataGrid-->
- <Style TargetType="{x:Type GridSplitter}">
- <Setter Property="Width" Value="1" />
- <Setter Property="Background" Value="#175c86" />
- <Setter Property="Cursor" Value="SizeWE" />
- <Setter Property="Margin" Value="0,0,0,0" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Thumb}">
- <Border
- Width="{TemplateBinding Width}"
- Margin="{TemplateBinding Margin}"
- Background="{TemplateBinding Background}"
- Opacity="0.4" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">
- <Setter Property="Width" Value="1" />
- <Setter Property="Background" Value="#175c86" />
- <Setter Property="Cursor" Value="SizeWE" />
- <Setter Property="Margin" Value="0,0,0,0" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Thumb}">
- <Border
- Width="{TemplateBinding Width}"
- Margin="{TemplateBinding Margin}"
- Background="{TemplateBinding Background}"
- Opacity="0.4" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="{x:Type DataGridColumnHeader}">
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Height" Value="30" />
- <Setter Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/表格标题背景2.png" Opacity="0.2" />
- <!--<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/datagrid/data_标题栏背景.png" Opacity="0.3"/>-->
-
- </Setter.Value>
- </Setter>
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="Foreground" Value="{DynamicResource DataGridColumnHeaderColor}" />
- <Setter Property="FontSize" Value="14" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
- <Grid>
- <Border
- Padding="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- <GridSplitter
- HorizontalAlignment="Right"
- Background="#FF0BAE3F"
- BorderBrush="#FFBD2A2A" />
- <Thumb
- x:Name="PART_RightHeaderGripper"
- Width="2"
- HorizontalAlignment="Right"
- Background="#FF1D9B9E"
- Style="{StaticResource ColumnHeaderGripperStyle}" />
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="DataGridColumnHeader" TargetType="{x:Type DataGridColumnHeader}">
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Height" Value="30" />
- <Setter Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/datagrid/data_标题栏背景.png" />
- </Setter.Value>
- </Setter>
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="Foreground" Value="White" />
- <Setter Property="FontSize" Value="10" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
- <Grid>
- <Border
- Padding="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
-
- <Thumb
- x:Name="PART_RightHeaderGripper"
- HorizontalAlignment="Right"
- Style="{StaticResource ColumnHeaderGripperStyle}" />
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="{x:Type DataGridRow}">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="SnapsToDevicePixels" Value="true" />
- <Setter Property="Foreground" Value="#abf4ff" />
- <Setter Property="BorderBrush" Value="#abf4ff" />
- <Setter Property="FontSize" Value="10" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type DataGridRow}">
- <Border
- x:Name="DGR_Border"
- BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="True">
- <SelectiveScrollingGrid x:Name="selectiveScrollingGrid">
- <SelectiveScrollingGrid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- </SelectiveScrollingGrid.ColumnDefinitions>
- <SelectiveScrollingGrid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- </SelectiveScrollingGrid.RowDefinitions>
- <DataGridCellsPresenter
- Grid.Column="1"
- ItemsPanel="{TemplateBinding ItemsPanel}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- <DataGridDetailsPresenter
- Grid.Row="1"
- Grid.Column="1"
- SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
- Visibility="{TemplateBinding DetailsVisibility}" />
- <DataGridRowHeader
- Grid.RowSpan="2"
- SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
- Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
- </SelectiveScrollingGrid>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="CommonStates">
- <VisualState x:Name="Normal" />
- <VisualState x:Name="MouseOver">
- <Storyboard>
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background)">
- <DiscreteObjectKeyFrame KeyTime="0">
- <DiscreteObjectKeyFrame.Value>
- <SolidColorBrush Color="#230077BC" />
- </DiscreteObjectKeyFrame.Value>
- </DiscreteObjectKeyFrame>
- </ObjectAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- <VisualState x:Name="Normal_Selected">
- <Storyboard>
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background)">
- <DiscreteObjectKeyFrame KeyTime="0">
- <DiscreteObjectKeyFrame.Value>
- <SolidColorBrush Color="#3D0077BC" />
- </DiscreteObjectKeyFrame.Value>
- </DiscreteObjectKeyFrame>
- </ObjectAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- <VisualStateGroup x:Name="ValidationStates">
- <VisualState x:Name="Valid" />
- <VisualState x:Name="InvalidFocused" />
- <VisualState x:Name="InvalidUnfocused" />
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="{x:Type DataGridCell}">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="BorderBrush" Value="#FF31879E" />
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type DataGridCell}">
- <Border
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="True">
- <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <!--<Setter Property="Background" Value="#FF2281EC"/>-->
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
- <!--<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>-->
- </Trigger>
- <!--<Trigger Property="IsKeyboardFocusWithin" Value="True">
- <Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
- </Trigger>-->
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </Style.Triggers>
- </Style>
-
- <Style TargetType="{x:Type DataGrid}">
- <Setter Property="AutoGenerateColumns" Value="False" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="CanUserAddRows" Value="False" />
- <Setter Property="CanUserDeleteRows" Value="False" />
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="HeadersVisibility" Value="Column" />
- <Setter Property="GridLinesVisibility" Value="None" />
- <Setter Property="SelectionMode" Value="Single" />
- <!--<Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="DataGrid">
- <Border BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
- <ScrollViewer x:Name="DG_ScrollViewer" Focusable="False">
- <ScrollViewer.Template>
- <ControlTemplate TargetType="{x:Type ScrollViewer}">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Button Command="ApplicationCommands.SelectAll" Focusable="False" Style="{DynamicResource {ComponentResourceKey ResourceId=DataGridSelectAllButtonStyle, TypeInTargetAssembly={x:Type DataGrid}}}" Width="{Binding CellsPanelHorizontalOffset, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}}">
- <Button.Visibility>
- <Binding Path="HeadersVisibility" RelativeSource="{RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}">
- <Binding.ConverterParameter>
- <DataGridHeadersVisibility>All</DataGridHeadersVisibility>
- </Binding.ConverterParameter>
- </Binding>
- </Button.Visibility>
- </Button>
- <DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter" Grid.Column="1">
- <DataGridColumnHeadersPresenter.Visibility>
- <Binding Path="HeadersVisibility" RelativeSource="{RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}">
- <Binding.ConverterParameter>
- <DataGridHeadersVisibility>Column</DataGridHeadersVisibility>
- </Binding.ConverterParameter>
- </Binding>
- </DataGridColumnHeadersPresenter.Visibility>
- </DataGridColumnHeadersPresenter>
- <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" Grid.ColumnSpan="2" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Grid.Row="1"/>
- <ScrollBar x:Name="PART_VerticalScrollBar" Grid.Column="2" Maximum="{TemplateBinding ScrollableHeight}" Orientation="Vertical" Grid.Row="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
- <Grid Grid.Column="1" Grid.Row="2" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="{Binding NonFrozenColumnsViewportHorizontalOffset, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}}"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <ScrollBar x:Name="PART_HorizontalScrollBar" Grid.Column="1" Maximum="{TemplateBinding ScrollableWidth}" Orientation="Horizontal" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
- </Grid>
-
- </Grid>
- </ControlTemplate>
- </ScrollViewer.Template>
- <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
- </ScrollViewer>
- </Border>
-
- </ControlTemplate>
- </Setter.Value>
- </Setter>-->
- <!--<Style.Triggers>
- <DataTrigger Binding="{Binding PZItems.Count}" Value="0">
- <Setter Property="Visibility" Value="Collapsed"></Setter>
- </DataTrigger>
-
- </Style.Triggers>-->
-
- </Style>
-
- <!--#endregion-->
-
- <!--#region ListBox-->
- <SolidColorBrush x:Key="ListBorder" Color="#828790" />
-
- <Style TargetType="{x:Type ListBox}">
- <!--<Setter Property="Background" >
- <Setter.Value>
- <ImageBrush ImageSource="Images/Pop_bg.png" Stretch="Fill" />
- </Setter.Value>
- </Setter>-->
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="BorderBrush" Value="{StaticResource ListBorder}" />
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="Padding" Value="10" />
- <Setter Property="Foreground" Value="White" />
- <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
- <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
- <Setter Property="ScrollViewer.PanningMode" Value="Both" />
- <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
-
- </Style>
- <!--#endregion-->
-
- <!--#region ListBoxItem-->
- <Style x:Key="baseListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
- <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
- <Setter Property="Padding" Value="2,0,0,0" />
- <Setter Property="Foreground" Value="#FF90C390" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border
- x:Name="Bd"
- Padding="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="true">
- <ContentPresenter
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected" Value="true">
- <Setter TargetName="Bd" Property="Background" Value="#230077BC" />
- <Setter TargetName="Bd" Property="Opacity" Value="0.8" />
- <Setter Property="Foreground" Value="Snow" />
- </Trigger>
- <!--<MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsSelected" Value="True"/>
- <Condition Property="Selector.IsSelectionActive" Value="False"/>
- </MultiTrigger.Conditions>
- <Setter Property="Background" TargetName="Bd" Value="#FFA7BB24"/>
- <Setter Property="Foreground" Value="Snow"/>
- </MultiTrigger>-->
- <!--<MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Binding="{Binding }" Value="true"/>
- <Condition Property="Selector.IsSelectionActive" Value="false"/>
- </MultiTrigger.Conditions>
- <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.InactiveCaptionTextColor}}"/>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}}"/>
- </MultiTrigger>
- <Trigger Property="IsEnabled" Value="true">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
- </Trigger>-->
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="baseListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
- <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
- <Setter Property="Padding" Value="2,0,0,0" />
- <Setter Property="Foreground" Value="#FF90C390" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border
- x:Name="Bd"
- Padding="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="true">
- <ContentPresenter
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsSelected" Value="True" />
- <Condition Property="Selector.IsSelectionActive" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Opacity" Value="0.6" />
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style BasedOn="{StaticResource baseListBoxItemStyle}" TargetType="{x:Type ListBoxItem}" />
-
- <Style
- x:Key="ListBoxItemStyle1"
- BasedOn="{StaticResource baseListBoxItemStyle}"
- TargetType="{x:Type ListBoxItem}">
- <Style.Triggers>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding DataContext.IsNotDeal, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}" Value="false" />
- <Condition Binding="{Binding IsDeal}" Value="0" />
- </MultiDataTrigger.Conditions>
- <Setter Property="Visibility" Value="Collapsed" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding DataContext.IsRecive, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}" Value="false" />
- <Condition Binding="{Binding IsDeal}" Value="1" />
- </MultiDataTrigger.Conditions>
- <Setter Property="Visibility" Value="Collapsed" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding DataContext.IsRefuse, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}" Value="false" />
- <Condition Binding="{Binding IsDeal}" Value="2" />
- </MultiDataTrigger.Conditions>
- <Setter Property="Visibility" Value="Collapsed" />
- </MultiDataTrigger>
- </Style.Triggers>
- </Style>
- <!--#endregion-->
-
- <!--#region TabControl-->
- <Style x:Key="borderTab4_No" TargetType="Border">
- <Style.Setters>
- <Setter Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
- </Setter.Value>
- </Setter>
- </Style.Setters>
- </Style>
-
- <Style x:Key="borderTab4_Select" TargetType="Border">
- <Style.Setters>
- <Setter Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
- </Setter.Value>
- </Setter>
- </Style.Setters>
- </Style>
-
- <Style x:Key="TabItemFocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle
- Margin="4,4,4,2"
- SnapsToDevicePixels="true"
- Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
- StrokeDashArray="1 2"
- StrokeThickness="1" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="{x:Type TabControl}">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TabControl}">
- <Grid
- ClipToBounds="true"
- KeyboardNavigation.TabNavigation="Local"
- SnapsToDevicePixels="true">
- <Grid.ColumnDefinitions>
- <ColumnDefinition x:Name="ColumnDefinition0" />
- <ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition x:Name="RowDefinition0" Height="Auto" />
- <RowDefinition x:Name="RowDefinition1" Height="*" />
- </Grid.RowDefinitions>
- <TabPanel
- x:Name="HeaderPanel"
- Grid.Row="0"
- Grid.Column="0"
- Margin="2,2,2,0"
- Panel.ZIndex="1"
- IsItemsHost="true"
- KeyboardNavigation.TabIndex="1" />
- <Border
- x:Name="ContentPanel"
- Grid.Row="1"
- Grid.Column="0"
- BorderBrush="{x:Null}"
- BorderThickness="{TemplateBinding BorderThickness}"
- KeyboardNavigation.DirectionalNavigation="Contained"
- KeyboardNavigation.TabIndex="2"
- KeyboardNavigation.TabNavigation="Local">
- <ContentPresenter
- x:Name="PART_SelectedContentHost"
- Margin="{TemplateBinding Padding}"
- ContentSource="SelectedContent"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="TabStripPlacement" Value="Bottom">
- <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="1" />
- <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
- <Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
- <Setter TargetName="HeaderPanel" Property="Margin" Value="2,0,2,2" />
- </Trigger>
- <Trigger Property="TabStripPlacement" Value="Left">
- <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="0" />
- <Setter TargetName="ContentPanel" Property="Grid.Column" Value="1" />
- <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
- <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
- <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
- <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
- <Setter TargetName="HeaderPanel" Property="Margin" Value="2,2,0,2" />
- </Trigger>
- <Trigger Property="TabStripPlacement" Value="Right">
- <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="1" />
- <Setter TargetName="ContentPanel" Property="Grid.Column" Value="0" />
- <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
- <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
- <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
- <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
- <Setter TargetName="HeaderPanel" Property="Margin" Value="0,2,2,2" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="{x:Type TabItem}">
- <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
- <Setter Property="Foreground">
- <Setter.Value>
- #A5FFFFFF
- </Setter.Value>
- </Setter>
- <Setter Property="Padding" Value="6,1,6,1" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="VerticalContentAlignment" Value="Stretch" />
- <Setter Property="Cursor" Value="Hand" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TabItem}">
- <Border
- x:Name="Bd"
- Height="35"
- Margin="5"
- Padding="{TemplateBinding Padding}"
- BorderThickness="1"
- CornerRadius="2">
- <ContentPresenter
- x:Name="Content"
- HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
- VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
- ContentSource="Header"
- Cursor="Hand"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected" Value="true">
- <Setter Property="Foreground" Value="{DynamicResource MeunSelectForeground}" />
- <Setter TargetName="Bd" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
- </Setter.Value>
- </Setter>
- </Trigger>
- <Trigger Property="IsSelected" Value="False">
- <Setter Property="Foreground" Value="{DynamicResource MeunUnSelectForeground}" />
- <Setter TargetName="Bd" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
- </Setter.Value>
- </Setter>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Foreground" Value="#8f723c" />
- <Setter TargetName="Bd" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
- </Setter.Value>
- </Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="TabItem样式1" TargetType="{x:Type TabItem}">
- <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
- <Setter Property="Foreground" Value="#A5FFFFFF" />
- <Setter Property="Padding" Value="6,1,6,1" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="VerticalContentAlignment" Value="Stretch" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TabItem}">
- <Border
- x:Name="Bd"
- Height="60"
- Margin="2"
- Padding="{TemplateBinding Padding}"
- BorderThickness="1"
- CornerRadius="2">
- <ContentPresenter
- x:Name="Content"
- HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
- VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
- ContentSource="Header"
- Cursor="Hand"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected" Value="true">
- <Setter Property="Foreground" Value="#8f723c" />
- <Setter TargetName="Bd" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab3_Select.png" />
- </Setter.Value>
- </Setter>
- </Trigger>
- <Trigger Property="IsSelected" Value="False">
- <Setter Property="Foreground" Value="#134278" />
- <Setter TargetName="Bd" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab3_No.png" />
- </Setter.Value>
- </Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="TabItem样式2" TargetType="{x:Type TabItem}">
- <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
- <Setter Property="Foreground">
- <Setter.Value>
- #A5FFFFFF
- </Setter.Value>
- </Setter>
- <Setter Property="Padding" Value="6,1,6,1" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="VerticalContentAlignment" Value="Stretch" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TabItem}">
- <Border
- x:Name="Bd"
- Height="60"
- Margin="2"
- Padding="{TemplateBinding Padding}"
- BorderThickness="1"
- CornerRadius="2">
- <ContentPresenter
- x:Name="Content"
- HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
- VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
- ContentSource="Header"
- Cursor="Hand"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected" Value="true">
- <Setter Property="Foreground" Value="#8f723c" />
- <Setter TargetName="Bd" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab_SelectBJ.png" />
- </Setter.Value>
- </Setter>
- </Trigger>
- <Trigger Property="IsSelected" Value="False">
- <Setter Property="Foreground" Value="#134278" />
- <Setter TargetName="Bd" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab_NoBJ.png" />
- </Setter.Value>
- </Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
- <!--#region ProgressBar圆形统计图-->
-
- <SolidColorBrush x:Key="ProgressBar.Progress.圆形蓝.Text" Color="#FF0089E6" />
- <SolidColorBrush x:Key="ProgressBar.Progress.圆形蓝.UnSelect" Color="#330089E6" />
- <SolidColorBrush x:Key="ProgressBar.Progress.圆形蓝.Select" Color="#FF0089E6" />
- <LinearGradientBrush x:Key="ProgressBar.Progress.动画蓝" StartPoint="1,0" EndPoint="0,0">
- <GradientStop Offset="0" Color="#00000000" />
- <GradientStop Offset="0.4" Color="#4C57B9FB" />
- <GradientStop Offset="0.6" Color="#FF57B9FB" />
- <GradientStop Offset="0.8" Color="#4C57B9FB" />
- <GradientStop Offset="1" Color="#00000000" />
- </LinearGradientBrush>
-
- <SolidColorBrush x:Key="ProgressBar.Progress.圆形绿.Text" Color="#FF00DC00" />
- <SolidColorBrush x:Key="ProgressBar.Progress.圆形绿.UnSelect" Color="#3300DC00" />
- <SolidColorBrush x:Key="ProgressBar.Progress.圆形绿.Select" Color="#FF00DC00" />
- <LinearGradientBrush x:Key="ProgressBar.Progress.动画绿" StartPoint="1,0" EndPoint="0,0">
- <GradientStop Offset="0" Color="#00000000" />
- <GradientStop Offset="0.4" Color="#4C72F972" />
- <GradientStop Offset="0.6" Color="#FF72F972" />
- <GradientStop Offset="0.8" Color="#4C72F972" />
- <GradientStop Offset="1" Color="#00000000" />
- </LinearGradientBrush>
-
- <SolidColorBrush x:Key="ProgressBar.Progress.圆形红.Text" Color="#FFF10000" />
- <SolidColorBrush x:Key="ProgressBar.Progress.圆形红.UnSelect" Color="#33F10000" />
- <SolidColorBrush x:Key="ProgressBar.Progress.圆形红.Select" Color="#FFF10000" />
- <LinearGradientBrush x:Key="ProgressBar.Progress.动画红" StartPoint="1,0" EndPoint="0,0">
- <GradientStop Offset="0" Color="#00000000" />
- <GradientStop Offset="0.4" Color="#4CFF5858" />
- <GradientStop Offset="0.6" Color="#FFFF5858" />
- <GradientStop Offset="0.8" Color="#4CFF5858" />
- <GradientStop Offset="1" Color="#00000000" />
- </LinearGradientBrush>
- <LinearGradientBrush x:Key="ProgressBar.动画" StartPoint="1,0" EndPoint="0,0">
- <GradientStop Offset="0" Color="#00000000" />
- <GradientStop Offset="0.4" Color="#6F06F11F" />
- <GradientStop Offset="0.6" Color="LightBlue" />
- <GradientStop Offset="0.8" Color="#6F06F11F" />
- <GradientStop Offset="1" Color="#00000000" />
- </LinearGradientBrush>
- <LinearGradientBrush x:Key="ProgressBar.Progress" StartPoint="0,0" EndPoint="1,0">
- <GradientStop Offset="0" Color="#4F05CE10" />
- <GradientStop Offset="1" Color="#6F06F11F" />
- </LinearGradientBrush>
- <SolidColorBrush x:Key="ProgressBar.Background" Color="#072a56" />
- <SolidColorBrush x:Key="ProgressBar.Border" Color="#072a56" />
-
-
- <local:Style3DashConverter x:Key="Style3Dash" />
- <local:Style3ArcConverter x:Key="Style3Arc" />
- <Style x:Key="CircleProgressBar蓝" TargetType="{x:Type ProgressBar}">
- <Setter Property="Width" Value="100" />
- <Setter Property="Height" Value="100" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ProgressBar}">
- <ControlTemplate.Resources>
- <Storyboard x:Key="maindh" RepeatBehavior="Forever">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ell动画" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
- <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
- <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
- <EasingDoubleKeyFrame KeyTime="0:0:2" Value="90" />
- </DoubleAnimationUsingKeyFrames>
-
- </Storyboard>
- </ControlTemplate.Resources>
- <Grid>
- <Rectangle
- Fill="#ef426f"
- RadiusX="5"
- RadiusY="5"
- Visibility="Collapsed" />
- <Ellipse
- x:Name="ell动画"
- Width="80"
- Height="80"
- RenderTransformOrigin="0.5,0.5"
- Stroke="{DynamicResource ProgressBar.Progress.动画蓝}"
- StrokeDashCap="Flat"
- StrokeThickness="10">
- <Ellipse.RenderTransform>
- <TransformGroup>
- <!-- 旋转变换 -->
- <RotateTransform Angle="-90" />
- <!-- 缩放变换 -->
- <ScaleTransform ScaleX="1" ScaleY="1" />
- <!-- 倾斜变换 -->
- <SkewTransform AngleX="0" AngleY="0" />
- <!-- 移动变换 -->
- <TranslateTransform X="0" Y="0" />
- </TransformGroup>
- </Ellipse.RenderTransform>
- <Ellipse.StrokeDashArray>
- <MultiBinding Converter="{StaticResource Style3Arc}">
- <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
- <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
- </MultiBinding>
- </Ellipse.StrokeDashArray>
- </Ellipse>
- <Ellipse
- Width="80"
- Height="80"
- Stroke="{DynamicResource ProgressBar.Progress.圆形蓝.UnSelect}"
- StrokeThickness="10" />
- <Ellipse
- Width="80"
- Height="80"
- RenderTransformOrigin="0.5,0.5"
- Stroke="{DynamicResource ProgressBar.Progress.圆形蓝.Select}"
- StrokeDashCap="Flat"
- StrokeThickness="10">
- <Ellipse.RenderTransform>
- <RotateTransform Angle="-90" />
- </Ellipse.RenderTransform>
- <Ellipse.StrokeDashArray>
- <MultiBinding Converter="{StaticResource Style3Arc}">
- <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
- <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
- </MultiBinding>
- </Ellipse.StrokeDashArray>
- </Ellipse>
-
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontFamily="../Fonts/#Quartz M"
- FontSize="20"
- Foreground="{DynamicResource ProgressBar.Progress.圆形蓝.Text}"
- Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}" />
- </Grid>
- <ControlTemplate.Triggers>
- <EventTrigger RoutedEvent="Loaded">
- <BeginStoryboard Storyboard="{StaticResource maindh}" />
- </EventTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="CircleProgressBar绿" TargetType="{x:Type ProgressBar}">
- <Setter Property="Width" Value="100" />
- <Setter Property="Height" Value="100" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ProgressBar}">
- <ControlTemplate.Resources>
- <Storyboard x:Key="maindh" RepeatBehavior="Forever">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ell动画" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
- <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
- <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
- <EasingDoubleKeyFrame KeyTime="0:0:2" Value="90" />
- </DoubleAnimationUsingKeyFrames>
-
- </Storyboard>
- </ControlTemplate.Resources>
- <Grid>
- <Rectangle
- Fill="#ef426f"
- RadiusX="5"
- RadiusY="5"
- Visibility="Collapsed" />
- <Ellipse
- x:Name="ell动画"
- Width="80"
- Height="80"
- RenderTransformOrigin="0.5,0.5"
- Stroke="{DynamicResource ProgressBar.Progress.动画绿}"
- StrokeDashCap="Flat"
- StrokeThickness="10">
- <Ellipse.RenderTransform>
- <TransformGroup>
- <!-- 旋转变换 -->
- <RotateTransform Angle="-90" />
- <!-- 缩放变换 -->
- <ScaleTransform ScaleX="1" ScaleY="1" />
- <!-- 倾斜变换 -->
- <SkewTransform AngleX="0" AngleY="0" />
- <!-- 移动变换 -->
- <TranslateTransform X="0" Y="0" />
- </TransformGroup>
- </Ellipse.RenderTransform>
- <Ellipse.StrokeDashArray>
- <MultiBinding Converter="{StaticResource Style3Arc}">
- <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
- <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
- </MultiBinding>
- </Ellipse.StrokeDashArray>
- </Ellipse>
- <Ellipse
- Width="80"
- Height="80"
- Stroke="{DynamicResource ProgressBar.Progress.圆形绿.UnSelect}"
- StrokeThickness="10" />
- <Ellipse
- Width="80"
- Height="80"
- RenderTransformOrigin="0.5,0.5"
- Stroke="{DynamicResource ProgressBar.Progress.圆形绿.Select}"
- StrokeDashCap="Flat"
- StrokeThickness="10">
- <Ellipse.RenderTransform>
- <RotateTransform Angle="-90" />
- </Ellipse.RenderTransform>
- <Ellipse.StrokeDashArray>
- <MultiBinding Converter="{StaticResource Style3Arc}">
- <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
- <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
- </MultiBinding>
- </Ellipse.StrokeDashArray>
- </Ellipse>
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontFamily="../Fonts/#Quartz M"
- FontSize="20"
- Foreground="{DynamicResource ProgressBar.Progress.圆形绿.Text}"
- Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}" />
- </Grid>
- <ControlTemplate.Triggers>
- <EventTrigger RoutedEvent="Loaded">
- <BeginStoryboard Storyboard="{StaticResource maindh}" />
- </EventTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="CircleProgressBar红" TargetType="{x:Type ProgressBar}">
- <Setter Property="Width" Value="100" />
- <Setter Property="Height" Value="100" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ProgressBar}">
- <ControlTemplate.Resources>
- <Storyboard x:Key="maindh" RepeatBehavior="Forever">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ell动画" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
- <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
- <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
- <EasingDoubleKeyFrame KeyTime="0:0:2" Value="90" />
- </DoubleAnimationUsingKeyFrames>
-
- </Storyboard>
- </ControlTemplate.Resources>
- <Grid>
- <Rectangle
- Fill="#ef426f"
- RadiusX="5"
- RadiusY="5"
- Visibility="Collapsed" />
- <Ellipse
- x:Name="ell动画"
- Width="80"
- Height="80"
- RenderTransformOrigin="0.5,0.5"
- Stroke="{DynamicResource ProgressBar.Progress.动画红}"
- StrokeDashCap="Flat"
- StrokeThickness="10">
- <Ellipse.RenderTransform>
- <TransformGroup>
- <!-- 旋转变换 -->
- <RotateTransform Angle="-90" />
- <!-- 缩放变换 -->
- <ScaleTransform ScaleX="1" ScaleY="1" />
- <!-- 倾斜变换 -->
- <SkewTransform AngleX="0" AngleY="0" />
- <!-- 移动变换 -->
- <TranslateTransform X="0" Y="0" />
- </TransformGroup>
- </Ellipse.RenderTransform>
- <Ellipse.StrokeDashArray>
- <MultiBinding Converter="{StaticResource Style3Arc}">
- <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
- <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
- </MultiBinding>
- </Ellipse.StrokeDashArray>
- </Ellipse>
- <Ellipse
- Width="80"
- Height="80"
- Stroke="{DynamicResource ProgressBar.Progress.圆形红.UnSelect}"
- StrokeThickness="10" />
- <Ellipse
- Width="80"
- Height="80"
- RenderTransformOrigin="0.5,0.5"
- Stroke="{DynamicResource ProgressBar.Progress.圆形红.Select}"
- StrokeDashCap="Flat"
- StrokeThickness="10">
- <Ellipse.RenderTransform>
- <RotateTransform Angle="-90" />
- </Ellipse.RenderTransform>
- <Ellipse.StrokeDashArray>
- <MultiBinding Converter="{StaticResource Style3Arc}">
- <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
- <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
- </MultiBinding>
- </Ellipse.StrokeDashArray>
- </Ellipse>
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontFamily="../Fonts/#Quartz M"
- FontSize="20"
- Foreground="{DynamicResource ProgressBar.Progress.圆形红.Text}"
- Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}" />
- </Grid>
- <ControlTemplate.Triggers>
- <EventTrigger RoutedEvent="Loaded">
- <BeginStoryboard Storyboard="{StaticResource maindh}" />
- </EventTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
-
-
- <Style TargetType="{x:Type ProgressBar}">
- <Setter Property="Foreground" Value="{StaticResource ProgressBar.Progress}" />
- <Setter Property="Background" Value="{StaticResource ProgressBar.Background}" />
- <Setter Property="BorderBrush" Value="{StaticResource ProgressBar.Border}" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Height" Value="16" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ProgressBar}">
- <ControlTemplate.Resources>
- <Storyboard x:Key="maindh" RepeatBehavior="Forever">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetName="dh" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
- <EasingDoubleKeyFrame KeyTime="0" Value="0.25" />
- <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.25" />
- <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.25" />
- </DoubleAnimationUsingKeyFrames>
- <PointAnimationUsingKeyFrames Storyboard.TargetName="dh" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
- <EasingPointKeyFrame KeyTime="0" Value="-0.5,0.5" />
- <EasingPointKeyFrame KeyTime="0:0:1" Value="0.5,0.5" />
- <EasingPointKeyFrame KeyTime="0:0:2" Value="1.5,0.5" />
- </PointAnimationUsingKeyFrames>
- </Storyboard>
- </ControlTemplate.Resources>
- <Grid x:Name="TemplateRoot">
- <Border
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- Opacity="0.3" />
- <Rectangle x:Name="PART_Track" />
- <Grid
- x:Name="PART_Indicator"
- HorizontalAlignment="Left"
- ClipToBounds="true">
- <Rectangle x:Name="dh" Fill="{DynamicResource ProgressBar.动画}">
- <Rectangle.RenderTransform>
- <TransformGroup>
- <!-- 缩放变换 -->
- <ScaleTransform ScaleX="1" ScaleY="1" />
- <!-- 倾斜变换 -->
- <SkewTransform AngleX="-45" AngleY="0" />
- <!-- 旋转变换 -->
- <RotateTransform Angle="0" />
- <!-- 移动变换 -->
- <TranslateTransform X="0" Y="0" />
- </TransformGroup>
- </Rectangle.RenderTransform>
- </Rectangle>
- <Rectangle
- x:Name="Indicator"
- Fill="{TemplateBinding Foreground}"
- Visibility="Collapsed" />
- <Rectangle
- x:Name="Animation"
- Fill="{DynamicResource ProgressBar.动画}"
- RenderTransformOrigin="0.5,0.5">
- <Rectangle.RenderTransform>
- <TransformGroup>
- <!-- 缩放变换 -->
- <ScaleTransform ScaleX="1" ScaleY="1" />
- <!-- 倾斜变换 -->
- <SkewTransform AngleX="-45" AngleY="0" />
- <!-- 旋转变换 -->
- <RotateTransform Angle="0" />
- <!-- 移动变换 -->
- <TranslateTransform X="0" Y="0" />
- </TransformGroup>
- </Rectangle.RenderTransform>
- </Rectangle>
- </Grid>
- <TextBlock
- x:Name="textBlock"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontFamily="../Fonts/#Quartz M"
- FontSize="12"
- Foreground="{DynamicResource Titleforeground}"
- Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Value, StringFormat={}百分比: {0} %}"
- Visibility="Visible" />
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="CommonStates">
- <VisualState x:Name="Determinate" />
- <VisualState x:Name="Indeterminate">
- <Storyboard RepeatBehavior="Forever">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Animation" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
- <EasingDoubleKeyFrame KeyTime="0" Value="0.25" />
- <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.25" />
- <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.25" />
- </DoubleAnimationUsingKeyFrames>
- <PointAnimationUsingKeyFrames Storyboard.TargetName="Animation" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
- <EasingPointKeyFrame KeyTime="0" Value="-0.5,0.5" />
- <EasingPointKeyFrame KeyTime="0:0:1" Value="0.5,0.5" />
- <EasingPointKeyFrame KeyTime="0:0:2" Value="1.5,0.5" />
- </PointAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="Orientation" Value="Vertical">
- <Setter TargetName="TemplateRoot" Property="LayoutTransform">
- <Setter.Value>
- <RotateTransform Angle="90" />
- </Setter.Value>
- </Setter>
- </Trigger>
- <Trigger Property="IsIndeterminate" Value="true">
- <Setter TargetName="Indicator" Property="Visibility" Value="Collapsed" />
- <Setter TargetName="dh" Property="Visibility" Value="Collapsed" />
- <Setter TargetName="Animation" Property="Visibility" Value="Visible" />
- </Trigger>
- <Trigger Property="IsIndeterminate" Value="False">
- <Setter TargetName="Indicator" Property="Visibility" Value="Visible" />
- <Setter TargetName="dh" Property="Visibility" Value="Visible" />
- <Setter TargetName="Animation" Property="Visibility" Value="Collapsed" />
-
- </Trigger>
- <EventTrigger RoutedEvent="Loaded">
- <BeginStoryboard Storyboard="{StaticResource maindh}" />
- </EventTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
- <!--#region Expander-->
- <ImageBrush x:Key="leftImage" ImageSource="/BPASmartClient.CustomResource;component/Image/leftImage.png" />
- <ImageBrush x:Key="leftImageSub" ImageSource="/BPASmartClient.CustomResource;component/Image/leftImageSub.png" />
- <ImageBrush x:Key="topImage" ImageSource="/BPASmartClient.CustomResource;component/Image/topImage.png" />
- <Style x:Key="ToggleButtonStyle" TargetType="{x:Type ToggleButton}">
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Height" Value="80" />
- <Setter Property="HorizontalContentAlignment" Value="Right" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Padding" Value="10,10" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Grid>
- <Border
- x:Name="border2"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Background="{TemplateBinding Background}">
- <ContentPresenter
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- </Grid>
-
- <ControlTemplate.Triggers>
- <Trigger Property="IsPressed" Value="true">
- <Setter Property="Background" Value="#FFd2e7f4" />
- </Trigger>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="border2" Property="Background" Value="{StaticResource ResourceKey=leftImage}" />
- </Trigger>
- <Trigger Property="IsChecked" Value="false">
- <Setter TargetName="border2" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/矩形样式.png" />
- </Setter.Value>
- </Setter>
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="White" />
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsChecked" Value="false" />
- <Condition Property="IsMouseOver" Value="True" />
- </MultiTrigger.Conditions>
- <MultiTrigger.Setters>
- <Setter TargetName="border2" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
- </Setter.Value>
- </Setter>
- </MultiTrigger.Setters>
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="ExpanderStyle" TargetType="{x:Type Expander}">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="VerticalContentAlignment" Value="Stretch" />
- <Setter Property="BorderBrush" Value="Transparent" />
- <Setter Property="BorderThickness" Value="1" />
-
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Expander}">
- <DockPanel Cursor="Hand">
- <ToggleButton
- x:Name="HeaderSite"
- Height="60"
- MinWidth="0"
- MinHeight="0"
- Margin="1"
- Padding="{TemplateBinding Padding}"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding Header}"
- ContentTemplate="{TemplateBinding HeaderTemplate}"
- ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
- DockPanel.Dock="Top"
- FontFamily="{TemplateBinding FontFamily}"
- FontSize="{TemplateBinding FontSize}"
- FontStretch="{TemplateBinding FontStretch}"
- FontStyle="{TemplateBinding FontStyle}"
- FontWeight="{TemplateBinding FontWeight}"
- Foreground="{TemplateBinding Foreground}"
- IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
- Style="{StaticResource ToggleButtonStyle}" />
- <ContentPresenter
- x:Name="ExpandSite"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- DockPanel.Dock="Left"
- Focusable="false"
- Visibility="Collapsed" />
- </DockPanel>
- <ControlTemplate.Triggers>
- <Trigger Property="IsExpanded" Value="true">
- <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
- <!--#region RadioButton-->
- <Style x:Key="RadioMiniButtonStyle" TargetType="{x:Type RadioButton}">
- <Setter Property="Margin" Value="5,10,1,0" />
- <Setter Property="Width" Value="160" />
- <Setter Property="Height" Value="30" />
- <Setter Property="Cursor" Value="Hand" />
- <Setter Property="FontSize" Value="14" />
- <Setter Property="FontFamily" Value="粗体" />
- <Setter Property="Foreground" Value="#DDD" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="BorderBrush" Value="Transparent" />
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="Background" Value="#DDD" />
- <Setter Property="HorizontalAlignment" Value="Right" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RadioButton}">
- <Grid
- x:Name="templateRoot"
- Background="Transparent"
- SnapsToDevicePixels="True">
- <Border x:Name="border2" />
- <ContentPresenter
- x:Name="contentPresenter"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding Content}"
- ContentStringFormat="{TemplateBinding ContentStringFormat}"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- Focusable="False"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
-
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="HasContent" Value="True">
- <Setter Property="FocusVisualStyle">
- <Setter.Value>
- <Style>
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle
- Margin="14,0,0,0"
- SnapsToDevicePixels="True"
- Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
- StrokeDashArray="1 2"
- StrokeThickness="1" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Setter.Value>
- </Setter>
- <Setter Property="Padding" Value="4,-1,0,0" />
- </Trigger>
- <Trigger Property="IsChecked" Value="{x:Null}" />
-
- <Trigger Property="IsChecked" Value="true">
- <Setter Property="Foreground" Value="White" />
- <Setter TargetName="border2" Property="Background" Value="{StaticResource ResourceKey=leftImageSub}" />
- </Trigger>
-
- <Trigger Property="IsChecked" Value="false">
- <Setter TargetName="border2" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/矩形样式.png" />
- </Setter.Value>
- </Setter>
- <Setter Property="Foreground" Value="#4B8EC4" />
- </Trigger>
-
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsChecked" Value="false" />
- <Condition Property="IsMouseOver" Value="True" />
- </MultiTrigger.Conditions>
- <MultiTrigger.Setters>
- <Setter TargetName="border2" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/leftImageSub.png" />
- </Setter.Value>
- </Setter>
- </MultiTrigger.Setters>
- </MultiTrigger>
-
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <!--#endregion-->
-
- <!--#region ContextMenu-->
- <!-- 自定义ContextMenu的外观样式 -->
- <Style TargetType="{x:Type ContextMenu}">
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="OverridesDefaultStyle" Value="True" />
- <Setter Property="Grid.IsSharedSizeScope" Value="True" />
- <Setter Property="Focusable" Value="False" />
- <Setter Property="HasDropShadow" Value="True" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ContextMenu}">
- <Border
- Name="Border"
- Background="#6EA0B0"
- BorderBrush="#888888"
- BorderThickness="1">
- <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="HasDropShadow" Value="true">
- <Setter TargetName="Border" Property="Padding" Value="0,3,0,3" />
- <Setter TargetName="Border" Property="CornerRadius" Value="4" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <!-- 自定义菜单项之间的分隔符的样式 -->
- <Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="{x:Type Separator}">
- <Setter Property="Height" Value="1" />
- <Setter Property="Margin" Value="0,4,0,4" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Separator}">
- <Border>
- <Border.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/顶部线条.png" />
- </Border.Background>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="Separator1" TargetType="{x:Type Separator}">
- <Setter Property="Height" Value="1" />
- <Setter Property="Margin" Value="0,4,0,4" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Separator}">
- <Border>
- <Border.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/顶部线条.png" />
- </Border.Background>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <!-- TopLevelHeader -->
- <ControlTemplate x:Key="{x:Static MenuItem.TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
- <Border Name="Border" Cursor="Hand">
- <Grid Margin="30,10,30,5">
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- ContentSource="Header"
- RecognizesAccessKey="True" />
- <Popup
- Name="Popup"
- AllowsTransparency="True"
- Focusable="False"
- HorizontalOffset="-30"
- IsOpen="{TemplateBinding IsSubmenuOpen}"
- Placement="Bottom"
- PopupAnimation="Slide"
- VerticalOffset="10">
- <Border
- Name="SubmenuBorder"
- Background="#7F0E4E8D"
- BorderBrush="Transparent"
- BorderThickness="1"
- SnapsToDevicePixels="True">
- <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
- </Border>
- </Popup>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSuspendingPopupAnimation" Value="true">
- <Setter TargetName="Popup" Property="PopupAnimation" Value="None" />
- </Trigger>
- <Trigger Property="IsHighlighted" Value="true">
- <Setter TargetName="Border" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
- </Setter.Value>
- </Setter>
- <Setter Property="Foreground" Value="{DynamicResource MeunSelectForeground}" />
- <Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
- <Setter TargetName="SubmenuBorder" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png" />
- </Setter.Value>
- </Setter>
- </Trigger>
- <Trigger Property="IsHighlighted" Value="false">
- <Setter TargetName="Border" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
- </Setter.Value>
- </Setter>
- <Setter Property="Foreground" Value="{DynamicResource MeunUnSelectForeground}" />
- <Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
- <Setter TargetName="SubmenuBorder" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png" />
- </Setter.Value>
- </Setter>
- </Trigger>
- <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True">
- <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="0" />
- <Setter TargetName="SubmenuBorder" Property="Padding" Value="5" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Foreground" Value="#ffffffff" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
-
- <!-- TopLevelItem -->
- <ControlTemplate x:Key="{x:Static MenuItem.TopLevelItemTemplateKey}" TargetType="{x:Type MenuItem}">
- <Border Name="Border" Margin="30,0,0,0">
- <Grid>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- ContentSource="Header"
- RecognizesAccessKey="True" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsHighlighted" Value="true">
- <Setter TargetName="Border" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/leftImage.png" />
- </Setter.Value>
- </Setter>
- <Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Foreground" Value="#ffffffff" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
-
- <!-- SubmenuItem 自定义菜单项的外观样式 -->
- <ControlTemplate x:Key="{x:Static MenuItem.SubmenuItemTemplateKey}" TargetType="{x:Type MenuItem}">
- <Border
- Name="Border"
- Margin="5"
- Cursor="Hand">
- <Grid Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" SharedSizeGroup="Icon" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut" />
- <ColumnDefinition Width="13" />
- </Grid.ColumnDefinitions>
- <ContentPresenter
- Name="Icon"
- Margin="6,2,6,2"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- ContentSource="Icon" />
- <Border
- Name="Check"
- Width="13"
- Height="13"
- Margin="6,0,6,0"
- Background="#331068A3"
- BorderBrush="#331068A3"
- BorderThickness="1"
- Visibility="Hidden">
- <Path
- Name="CheckMark"
- Width="7"
- Height="7"
- Data="M 0 0 L 7 7 M 0 7 L 7 0"
- SnapsToDevicePixels="False"
- Stroke="#331068A3"
- StrokeThickness="1"
- Visibility="Visible" />
- </Border>
- <ContentPresenter
- Name="HeaderHost"
- Grid.Column="1"
- ContentSource="Header"
- RecognizesAccessKey="True" />
- <TextBlock
- x:Name="InputGestureText"
- Grid.Column="2"
- Margin="5,2,0,-5"
- HorizontalAlignment="Center"
- VerticalAlignment="Bottom"
- Background="Transparent"
- Cursor="Hand"
- DockPanel.Dock="Right"
- Text="{TemplateBinding InputGestureText}" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="Icon" Value="{x:Null}">
- <Setter TargetName="Icon" Property="Visibility" Value="Hidden" />
- </Trigger>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="CheckMark" Property="Visibility" Value="Visible" />
- </Trigger>
- <Trigger Property="IsCheckable" Value="true">
- <Setter TargetName="Check" Property="Visibility" Value="Hidden" />
- <Setter TargetName="Icon" Property="Visibility" Value="Hidden" />
- </Trigger>
- <!-- 选中菜单项时的高亮颜色的trigger设置 -->
- <Trigger Property="IsHighlighted" Value="true">
- <Setter TargetName="Border" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
- </Setter.Value>
- </Setter>
- <Setter Property="Foreground" Value="{DynamicResource MeunSelectForeground}" />
- </Trigger>
- <Trigger Property="IsHighlighted" Value="false">
- <Setter TargetName="Border" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
- </Setter.Value>
- </Setter>
- <Setter Property="Foreground" Value="{DynamicResource MeunUnSelectForeground}" />
- </Trigger>
- <!--<Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="Yellow"/>
- </Trigger>-->
- </ControlTemplate.Triggers>
- </ControlTemplate>
-
- <!-- SubmenuHeader -->
-
- <ControlTemplate x:Key="{x:Static MenuItem.SubmenuHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
- <Border Name="Border">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" SharedSizeGroup="Icon" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut" />
- <ColumnDefinition Width="13" />
- </Grid.ColumnDefinitions>
- <ContentPresenter
- Name="Icon"
- Margin="6,0,6,0"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- ContentSource="Icon" />
- <ContentPresenter
- Name="HeaderHost"
- Grid.Column="1"
- ContentSource="Header"
- RecognizesAccessKey="True" />
- <TextBlock
- x:Name="InputGestureText"
- Grid.Column="2"
- Margin="5,2,2,2"
- DockPanel.Dock="Right"
- Text="{TemplateBinding InputGestureText}" />
- <Path
- Grid.Column="3"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M 0 0 L 0 7 L 4 3.5 Z"
- Fill="#331068A3" />
- <Popup
- Name="Popup"
- AllowsTransparency="True"
- Focusable="False"
- HorizontalOffset="-4"
- IsOpen="{TemplateBinding IsSubmenuOpen}"
- Placement="Left"
- PopupAnimation="Slide">
- <Border
- Name="SubmenuBorder"
- BorderBrush="Transparent"
- BorderThickness="1"
- SnapsToDevicePixels="True">
- <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
- </Border>
- </Popup>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="Icon" Value="{x:Null}">
- <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
- </Trigger>
- <Trigger Property="IsHighlighted" Value="true">
- <Setter TargetName="Border" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
- </Setter.Value>
- </Setter>
- </Trigger>
- <Trigger Property="IsHighlighted" Value="false">
- <Setter TargetName="Border" Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
- </Setter.Value>
- </Setter>
- </Trigger>
- <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True">
- <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="4" />
- <Setter TargetName="SubmenuBorder" Property="Padding" Value="0,3,0,3" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="#ffffffff" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
-
- <!-- MenuItem Style -->
-
- <Style x:Key="{x:Type MenuItem}" TargetType="{x:Type MenuItem}">
- <Setter Property="OverridesDefaultStyle" Value="True" />
- <Style.Triggers>
- <Trigger Property="Role" Value="TopLevelHeader">
- <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelHeaderTemplateKey}}" />
- <Setter Property="Grid.IsSharedSizeScope" Value="true" />
- </Trigger>
- <Trigger Property="Role" Value="TopLevelItem">
- <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelItemTemplateKey}}" />
- </Trigger>
- <!--<Trigger Property="Role" Value="SubmenuHeader">
- <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuHeaderTemplateKey}}"/>
- </Trigger>-->
- <Trigger Property="Role" Value="SubmenuItem">
- <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuItemTemplateKey}}" />
- </Trigger>
- </Style.Triggers>
- </Style>
- <!--#endregion-->
-
- <!--#region RadioButton-->
- <Style x:Key="CheckRadioFocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle
- Margin="14,0,0,0"
- SnapsToDevicePixels="true"
- Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
- StrokeDashArray="1 2"
- StrokeThickness="1" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="{x:Type RadioButton}">
- <Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}" />
- <Setter Property="Foreground" Value="{DynamicResource foreground}" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/btn_normal.png" />
- </Setter.Value>
- </Setter>
- <Setter Property="Padding" Value="2,0,0,0" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RadioButton}">
- <BulletDecorator VerticalAlignment="Center" Background="Transparent">
- <BulletDecorator.Bullet>
- <Grid>
- <Ellipse
- x:Name="Border"
- Width="10"
- Height="10"
- Fill="{TemplateBinding Background}" />
- <Ellipse
- x:Name="Dot"
- Width="5"
- Height="5"
- Fill="#ff8a03"
- Visibility="Hidden" />
- </Grid>
-
- </BulletDecorator.Bullet>
- <ContentPresenter
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- RecognizesAccessKey="True" />
- </BulletDecorator>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="Dot" Property="Visibility" Value="Visible" />
- </Trigger>
- <Trigger Property="IsChecked" Value="False">
- <Setter TargetName="Dot" Property="Visibility" Value="Collapsed" />
- </Trigger>
- <Trigger Property="IsChecked" Value="{x:Null}">
- <Setter TargetName="Dot" Property="Visibility" Value="Collapsed" />
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- <Setter TargetName="Dot" Property="Fill" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
- <!--#region CheckBox-->
- <Style TargetType="{x:Type CheckBox}">
- <Setter Property="Foreground" Value="{DynamicResource foreground}" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="FocusVisualStyle">
- <Setter.Value>
- <Style>
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle
- Margin="1"
- SnapsToDevicePixels="True"
- Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
- StrokeDashArray="1 2"
- StrokeThickness="1" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Setter.Value>
- </Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type CheckBox}">
- <StackPanel
- Background="Transparent"
- Orientation="Horizontal"
- SnapsToDevicePixels="True">
- <Grid>
- <Image
- Width="12"
- Height="14"
- Source="/BPASmartClient.CustomResource;component/Image/Cb_HalfChecked.png" />
- <Image
- x:Name="image1"
- Width="12"
- Height="14"
- Source="/BPASmartClient.CustomResource;component/Image/Cb_HalfChecked.png" />
- </Grid>
- <ContentPresenter
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding Content}"
- ContentStringFormat="{TemplateBinding ContentStringFormat}"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </StackPanel>
- <ControlTemplate.Triggers>
- <Trigger Property="HasContent" Value="True">
- <Setter Property="FocusVisualStyle">
- <Setter.Value>
- <Style>
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle
- Margin="14,0,0,0"
- SnapsToDevicePixels="True"
- Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
- StrokeDashArray="1 2"
- StrokeThickness="1" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Setter.Value>
- </Setter>
- <Setter Property="Padding" Value="4,0,0,0" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="image1" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/Cb_Checked.png" />
- </Trigger>
- <Trigger Property="IsChecked" Value="{x:Null}">
- <Setter TargetName="image1" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/Cb_HalfChecked.png" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
- <!--#region TextBox-->
- <Style TargetType="{x:Type TextBox}">
- <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Padding" Value="0" />
- <Setter Property="Foreground" Value="{DynamicResource foreground}" />
- <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Height" Value="24" />
- <Setter Property="CaretBrush" Value="White" />
- <Setter Property="Padding" Value="0" />
- <Setter Property="HorizontalContentAlignment" Value="Left" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="AllowDrop" Value="true" />
- <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
- <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TextBox}">
- <Themes1:ClassicBorderDecorator
- x:Name="Bd"
- BorderBrush="{DynamicResource borderBrush}"
- BorderStyle="None"
- BorderThickness="1">
- <ScrollViewer x:Name="PART_ContentHost" />
- </Themes1:ClassicBorderDecorator>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
- <Condition Property="IsSelectionActive" Value="false" />
- </MultiTrigger.Conditions>
- <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
- </MultiTrigger>
- </Style.Triggers>
- </Style>
-
- <!--#endregion-->
-
- <!--#region ComboBox-->
- <Style x:Key="ComboBoxFocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle
- Margin="4,4,21,4"
- SnapsToDevicePixels="true"
- Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
- StrokeDashArray="1 2"
- StrokeThickness="1" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
- <Style x:Key="ComboBoxTransparentButtonStyle" TargetType="{x:Type ToggleButton}">
- <Setter Property="MinWidth" Value="0" />
- <Setter Property="MinHeight" Value="0" />
- <Setter Property="Width" Value="Auto" />
- <Setter Property="Height" Value="Auto" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Foreground" Value="White" />
- <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" />
- <Setter Property="BorderThickness" Value="2" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <DockPanel
- Background="{TemplateBinding Background}"
- LastChildFill="false"
- SnapsToDevicePixels="true">
- <Themes1:ClassicBorderDecorator
- x:Name="Border"
- Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderStyle="None"
- BorderThickness="{TemplateBinding BorderThickness}"
- DockPanel.Dock="Right">
- <Path
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="{StaticResource DownArrowGeometry}"
- Fill="{TemplateBinding Foreground}" />
- </Themes1:ClassicBorderDecorator>
- </DockPanel>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="Border" Property="BorderStyle" Value="AltPressed" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
- </Trigger>
- </Style.Triggers>
- </Style>
- <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
- <Setter Property="OverridesDefaultStyle" Value="true" />
- <Setter Property="AllowDrop" Value="true" />
- <Setter Property="MinWidth" Value="0" />
- <Setter Property="Foreground" Value="{DynamicResource foreground}" />
- <Setter Property="MinHeight" Value="0" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
- <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TextBox}">
- <ScrollViewer
- x:Name="PART_ContentHost"
- Background="Transparent"
- Focusable="false"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
- <Border
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="true">
- <Grid>
- <Themes1:ClassicBorderDecorator
- x:Name="Border"
- BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
- BorderStyle="None"
- BorderThickness="2">
- <Popup
- x:Name="PART_Popup"
- AllowsTransparency="true"
- Focusable="False"
- IsOpen="{TemplateBinding IsDropDownOpen}"
- Placement="Bottom"
- PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
- <Themes1:SystemDropShadowChrome
- x:Name="Shdw"
- MinWidth="{Binding ActualWidth, ElementName=Border}"
- MaxHeight="{TemplateBinding MaxDropDownHeight}"
- Color="Transparent">
- <Border
- x:Name="DropDownBorder"
- BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
- BorderThickness="1">
- <Border.Background>
- <ImageBrush
- ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png"
- Opacity="0.5"
- Stretch="Fill" />
- </Border.Background>
- <ScrollViewer x:Name="DropDownScrollViewer">
- <Grid RenderOptions.ClearTypeHint="Enabled">
- <Canvas
- Width="0"
- Height="0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top">
- <Rectangle
- x:Name="OpaqueRect"
- Width="{Binding ActualWidth, ElementName=DropDownBorder}"
- Height="{Binding ActualHeight, ElementName=DropDownBorder}"
- Fill="{Binding Background, ElementName=DropDownBorder}" />
- </Canvas>
- <ItemsPresenter
- x:Name="ItemsPresenter"
- KeyboardNavigation.DirectionalNavigation="Contained"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
- </ScrollViewer>
- </Border>
- </Themes1:SystemDropShadowChrome>
- </Popup>
- </Themes1:ClassicBorderDecorator>
- <ToggleButton
- Width="Auto"
- MinWidth="0"
- MinHeight="0"
- ClickMode="Press"
- Focusable="false"
- IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
- Style="{StaticResource ComboBoxTransparentButtonStyle}" />
- <DockPanel>
- <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
- <TextBox
- x:Name="PART_EditableTextBox"
- Margin="{TemplateBinding Padding}"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- CaretBrush="White"
- IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
- Style="{StaticResource ComboBoxEditableTextBox}" />
- </DockPanel>
-
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="HasItems" Value="false">
- <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
- </Trigger>
- <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
- <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
- <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsGrouping" Value="true" />
- <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
- </MultiTrigger.Conditions>
- <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
- </MultiTrigger>
- <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
- <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
- <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <Style x:Key="BaseComboBoxStyle" TargetType="{x:Type ComboBox}">
- <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
- <Setter Property="Foreground" Value="{DynamicResource foreground}" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="BorderBrush" Value="{DynamicResource borderBrush}" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Margin" Value="0,0,0,0" />
- <Setter Property="Padding" Value="0" />
- <Setter Property="Height" Value="24" />
- <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
- <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
- <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
- <Setter Property="ScrollViewer.PanningMode" Value="Both" />
- <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="IsTextSearchCaseSensitive" Value="true" />
- <Setter Property="IsEditable" Value="true" />
- <Setter Property="StaysOpenOnEdit" Value="true" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ComboBox}">
-
- <Border
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="true">
- <Grid>
- <Themes1:ClassicBorderDecorator
- x:Name="Border"
- BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
- BorderStyle="None"
- BorderThickness="2">
- <Popup
- x:Name="PART_Popup"
- AllowsTransparency="true"
- Focusable="False"
- IsOpen="{TemplateBinding IsDropDownOpen}"
- Placement="Bottom"
- PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
- <Themes1:SystemDropShadowChrome
- x:Name="Shdw"
- MinWidth="{Binding ActualWidth, ElementName=Border}"
- MaxHeight="{TemplateBinding MaxDropDownHeight}"
- Color="Transparent">
- <Border
- x:Name="DropDownBorder"
- BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
- BorderThickness="1">
- <Border.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png" />
- </Border.Background>
- <ScrollViewer x:Name="DropDownScrollViewer">
- <Grid RenderOptions.ClearTypeHint="Enabled">
- <Canvas
- Width="0"
- Height="0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top">
- <Rectangle
- x:Name="OpaqueRect"
- Width="{Binding ActualWidth, ElementName=DropDownBorder}"
- Height="{Binding ActualHeight, ElementName=DropDownBorder}"
- Fill="{Binding Background, ElementName=DropDownBorder}" />
- </Canvas>
- <ItemsPresenter
- x:Name="ItemsPresenter"
- KeyboardNavigation.DirectionalNavigation="Contained"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
- </ScrollViewer>
- </Border>
- </Themes1:SystemDropShadowChrome>
- </Popup>
- </Themes1:ClassicBorderDecorator>
- <DockPanel Margin="2">
- <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
- <Border x:Name="SelectedItemBorder" Margin="{TemplateBinding Padding}">
- <ContentPresenter
- Margin="1,1,1,1"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding SelectionBoxItem}"
- ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
- ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
- ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- </DockPanel>
- <ToggleButton
- Width="Auto"
- MinWidth="0"
- MinHeight="0"
- Margin="2"
- ClickMode="Press"
- Focusable="false"
- IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
- Style="{StaticResource ComboBoxTransparentButtonStyle}" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <!--<Condition Property="IsSelectionBoxHighlighted" Value="true"/>-->
- <Condition Property="IsDropDownOpen" Value="false" />
- </MultiTrigger.Conditions>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
- </MultiTrigger>
- <!--<Trigger Property="IsSelectionBoxHighlighted" Value="true">
- <Setter Property="Background" TargetName="SelectedItemBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
- </Trigger>-->
- <Trigger Property="HasItems" Value="false">
- <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsGrouping" Value="true" />
- <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
- </MultiTrigger.Conditions>
- <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
- </MultiTrigger>
- <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
- <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
- <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
- </Trigger>
- <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
- <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
- <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsEditable" Value="true">
- <Setter Property="IsTabStop" Value="false" />
- <Setter Property="Padding" Value="1" />
- <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
- </Trigger>
- </Style.Triggers>
-
- </Style>
- <Style BasedOn="{StaticResource BaseComboBoxStyle}" TargetType="ComboBox" />
- <!--#endregion-->
-
- <!--#region ColorCommboxStyle-->
- <ObjectDataProvider
- x:Key="colorPropertieOdp"
- MethodName="GetProperties"
- ObjectInstance="{x:Type Colors}" />
- <Style
- x:Key="ColorCommboxStyle"
- BasedOn="{StaticResource BaseComboBoxStyle}"
- TargetType="ComboBox">
- <Setter Property="IsTextSearchCaseSensitive" Value="False" />
- <Setter Property="IsEditable" Value="False" />
- <Setter Property="StaysOpenOnEdit" Value="False" />
- <Setter Property="ItemsSource" Value="{Binding Source={StaticResource colorPropertieOdp}}" />
- <Setter Property="ItemTemplate">
- <Setter.Value>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <Rectangle
- Width="40"
- Height="10"
- Fill="{Binding Name}" />
- <TextBlock Text="{Binding Name}" />
- </StackPanel>
- </DataTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
- </ResourceDictionary>
|