<!--
    This code was generated by a tool.
    
    Changes to this file may cause incorrect behavior and will be lost if
    the code is regenerated.
-->
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:converter="clr-namespace:HandyControl.Tools.Converter"
    xmlns:ex="clr-namespace:HandyControl.Tools.Extension"
    xmlns:hc="clr-namespace:HandyControl.Controls"
    xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
    xmlns:langs="clr-namespace:HandyControl.Properties.Langs"
    xmlns:o="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
    xmlns:shapes="clr-namespace:HandyControl.Expression.Shapes"
    xmlns:system="clr-namespace:System;assembly=mscorlib"
    xmlns:tools="clr-namespace:HandyControl.Tools">
    <langs:LangProvider x:Key="Langs" />
    <converter:Boolean2BooleanReConverter x:Key="Boolean2BooleanReConverter" />
    <converter:Boolean2VisibilityReConverter x:Key="Boolean2VisibilityReConverter" />
    <converter:BooleanArr2VisibilityConverter x:Key="BooleanArr2VisibilityConverter" />
    <converter:BooleanArr2BooleanConverter x:Key="BooleanArr2BooleanConverter" />
    <converter:Long2FileSizeConverter x:Key="Long2FileSizeConverter" />
    <converter:String2VisibilityConverter x:Key="String2VisibilityConverter" />
    <converter:String2VisibilityReConverter x:Key="String2VisibilityReConverter" />
    <BooleanToVisibilityConverter x:Key="Boolean2VisibilityConverter" />
    <converter:TreeViewItemMarginConverter x:Key="TreeViewItemMarginConverter" />
    <converter:Color2HexStringConverter x:Key="Color2HexStringConverter" />
    <converter:Object2BooleanConverter x:Key="Object2BooleanConverter" />
    <converter:Object2BooleanReConverter x:Key="Object2BooleanReConverter" />
    <converter:Boolean2StringConverter x:Key="Boolean2StringConverter" />
    <converter:Int2StringConverter x:Key="Int2StringConverter" />
    <converter:BorderClipConverter x:Key="BorderClipConverter" />
    <converter:CheckBoxAnimationLengthConverter x:Key="CheckBoxAnimationLengthConverter" />
    <converter:DoubleHalfwayConverter x:Key="DoubleHalfwayConverter" />
    <converter:DoubleSubtractConverter x:Key="DoubleSubtractConverter" />
    <converter:BorderCircularClipConverter x:Key="BorderCircularClipConverter" />
    <converter:BorderCircularConverter x:Key="BorderCircularConverter" />
    <converter:Object2VisibilityConverter x:Key="Object2VisibilityConverter" />
    <converter:Object2VisibilityReConverter x:Key="Object2VisibilityReConverter" />
    <converter:Number2PercentageConverter x:Key="Number2PercentageConverter" />
    <converter:RectangleCircularConverter x:Key="RectangleCircularConverter" />
    <converter:ThicknessSplitConverter x:Key="ThicknessSplitConverter" />
    <converter:CornerRadiusSplitConverter x:Key="CornerRadiusSplitConverter" />
    <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter" />
    <converter:Double2GridLengthConverter x:Key="Double2GridLengthConverter" />
    <converter:DoubleMinConverter x:Key="DoubleMinConverter" />
    <converter:Object2StringConverter x:Key="Object2StringConverter" />
    <converter:DataGridSelectAllButtonVisibilityConverter x:Key="DataGridSelectAllButtonVisibilityConverter" />
    <Color x:Key="EffectShadowColor">#88000000</Color>
    <system:Double x:Key="LargeFontSize">24</system:Double>
    <system:Double x:Key="HeadFontSize">20</system:Double>
    <system:Double x:Key="SubHeadFontSize">18</system:Double>
    <system:Double x:Key="TextFontSize">16</system:Double>
    <Geometry x:Key="CalendarGeometry" o:Freeze="True">M377.897477 116.291025l265.298718 0 0 47.459125-265.298718 0 0-47.459125ZM888.317416 116.291025 748.229288 116.291025l0 47.459125 123.54866 0c18.167626 0 32.894732 14.727106 32.894732 32.894732l0 92.92987L115.42936 289.574752l0-92.92987c0-18.167626 14.727106-32.894732 32.894732-32.894732l123.54866 0 0-47.459125L131.776437 116.291025c-35.244356 0-63.814389 28.571056-63.814389 63.815412l0.004093 713.966329c0 35.243333 28.571056 63.814389 63.814389 63.814389l756.540979 0c35.244356 0 63.814389-28.571056 63.814389-63.815412l-0.004093-713.966329C952.131805 144.861058 923.560749 116.291025 888.317416 116.291025zM904.67268 337.033877l0 540.498398c0 18.167626-14.727106 32.894732-32.894732 32.894732L148.324092 910.427007c-18.167626 0-32.894732-14.727106-32.894732-32.894732L115.42936 337.033877 904.67268 337.033877zM300.659736 64.801927l47.459125 0 0 170.241292-47.459125 0 0-170.241292ZM672.97481 64.801927l47.450938 0 0 170.241292-47.450938 0 0-170.241292ZM358.384138 547.939214l0 231.021432 52.863464 0L411.247602 459.226591l-34.580198 0-2.651514 3.804835c-18.000819 25.896006-41.448959 48.758786-69.681285 67.955908l-3.886703 2.643327 0 53.742526 13.441772-8.069156C330.690097 569.215794 345.588103 558.712075 358.384138 547.939214zM618.031888 726.552576c-10.287791 6.395971-24.435678 8.069156-42.059902 4.948946-16.094309-2.842881-27.898712-18.373321-35.082666-46.159464l-2.261615-8.753781-48.312603 13.424375 1.68956 8.129534c6.270098 30.168514 18.347737 52.052967 35.884976 65.017855 17.120734 12.705979 35.542152 19.777364 54.731087 21.043255 3.358652 0.225138 6.655903 0.337707 9.897892 0.337707 14.859119 0 28.430857-2.374184 40.452211-7.072408 14.417029-5.641758 26.88866-13.338413 37.076162-22.86278 10.365566-9.723922 18.230051-22.143362 23.378552-36.920612 4.918246-14.170401 7.739636-28.296797 8.385373-42.025108 0.60685-13.658723-0.667228-26.650218-3.791531-38.619382l-0.008187-0.017397c-3.111-11.777796-8.133628-23.738773-14.946104-35.551363-7.353831-12.679372-19.028268-22.750211-34.710165-29.952586-15.037183-6.872854-30.927843-10.685876-47.24729-11.32752-11.414505-0.415482-23.487027 1.386646-36.04462 5.434017 3.813022-14.568486 7.648557-31.884681 11.465673-51.775637l113.87693 0 0-49.357449L535.645647 464.492778l-1.495122 7.028404c-24.621928 115.77116-31.589954 145.497585-33.102473 150.039235l-3.432334 10.338958 45.829943 5.391036 3.054716-4.20292c8.146931-11.214951 18.247448-18.139996 30.879746-21.164011 13.004799-3.137607 24.743707-3.180588 34.879018-0.129966 9.857981 2.95545 17.822756 8.771178 24.327202 17.758284 6.512633 9.03111 10.084143 20.392401 10.617311 33.757421 0.519864 13.849067-1.603598 26.442477-6.314102 37.440476C636.315153 711.429431 628.843637 719.871089 618.031888 726.552576z</Geometry>
    <Geometry x:Key="DeleteGeometry" o:Freeze="True">M512 620.544l253.3376 253.3376a76.6976 76.6976 0 1 0 108.544-108.544L620.6464 512l253.2352-253.3376a76.6976 76.6976 0 1 0-108.544-108.544L512 403.3536 258.6624 150.1184a76.6976 76.6976 0 1 0-108.544 108.544L403.3536 512 150.1184 765.3376a76.6976 76.6976 0 1 0 108.544 108.544L512 620.6464z</Geometry>
    <Geometry x:Key="DeleteFillCircleGeometry" o:Freeze="True">M7.4038057,6.4038057 C7.1478834,6.4038057 6.8919611,6.5014372 6.6966991,6.6966991 6.3061748,7.0872235 6.3061748,7.7203884 6.6966991,8.1109123 L10.585787,12 6.6966991,15.889088 C6.3061748,16.279612 6.3061748,16.912777 6.6966991,17.303301 7.0872235,17.693825 7.7203879,17.693825 8.1109123,17.303301 L12,13.414213 15.889088,17.303301 C16.279612,17.693825 16.912777,17.693825 17.303301,17.303301 17.693825,16.912777 17.693825,16.279612 17.303301,15.889088 L13.414213,12 17.303301,8.1109123 C17.693825,7.7203884 17.693825,7.0872235 17.303301,6.6966991 16.912777,6.3061748 16.279612,6.3061748 15.889088,6.6966991 L12,10.585787 8.1109123,6.6966991 C7.9156504,6.5014372 7.6597281,6.4038057 7.4038057,6.4038057 z M12,0 C18.627417,0 24,5.3725829 24,12 24,18.627417 18.627417,24 12,24 5.3725829,24 0,18.627417 0,12 0,5.3725829 5.3725829,0 12,0 z</Geometry>
    <Geometry x:Key="CloseGeometry" o:Freeze="True">M0.7,0 L5,4.3 L9.3,0 L10,0.7 L5.7,5 L10,9.3 L9.3,10 L5,5.7 L0.7,10 L0,9.3 L4.3,5 L0,0.7 z</Geometry>
    <Geometry x:Key="DownGeometry" o:Freeze="True">M512 801.6896L5.12 282.0096l58.1632-59.5968L512 682.3936l448.7168-460.0832 58.1632 59.5968-506.88 519.7824z</Geometry>
    <Geometry x:Key="UpGeometry" o:Freeze="True">M50.000001,0 L100,51.262779 94.262627,57.141584 50.000001,11.767713 5.7373757,57.151686 0,51.27288 z</Geometry>
    <Geometry x:Key="ClockGeometry" o:Freeze="True">M498.506684 256.571517 425.359734 256.571517 425.359734 622.190635 720.166063 622.190635 720.166063 549.725206 498.506684 549.725206ZM512.714268 80.162738c-245.740844 0-445.181175 197.577914-445.181175 441.024505s199.439308 441.024505 445.181175 441.024505c245.738797 0 445.178105-197.577914 445.178105-441.024505S758.453065 80.162738 512.714268 80.162738zM512.714268 874.005824c-195.880249 0-356.145349-158.768003-356.145349-352.818581s160.2651-352.821651 356.145349-352.821651c195.877179 0 356.14228 158.77005 356.14228 352.821651S708.591447 874.005824 512.714268 874.005824z</Geometry>
    <Geometry x:Key="LeftGeometry" o:Freeze="True">M394.24 512L683.52 248.32c10.24-10.24 10.24-25.6 0-35.84-10.24-10.24-25.6-10.24-35.84 0l-307.2 279.04c-5.12 5.12-7.68 12.8-7.68 20.48 0 7.68 2.56 15.36 7.68 20.48l307.2 279.04c10.24 10.24 25.6 10.24 35.84 0 10.24-10.24 10.24-25.6 0-35.84L394.24 512z</Geometry>
    <Geometry x:Key="RightGeometry" o:Freeze="True">M4.1666641,0 C5.2083321,0 6.25,0.41666794 7.0833321,1.25 L57.083331,46.666664 C57.916664,47.499998 58.33333,48.749998 58.333329,49.999998 58.33333,51.249997 57.916664,52.499997 57.083331,53.333331 L7.0833321,98.749996 C5.4166641,100.41666 2.9166641,100.41666 1.2499962,98.749996 -0.41666794,97.083328 -0.41666794,94.583328 1.2499962,92.916664 L48.333331,49.999998 1.2499962,7.0833321 C-0.41666794,5.4166641 -0.41666794,2.9166641 1.2499962,1.25 2.0833282,0.41666794 3.1249962,0 4.1666641,0 z</Geometry>
    <Geometry x:Key="RotateLeftGeometry" o:Freeze="True">M165.238899 508.178506C164.450369 456.442676 171.767779 404.485842 187.244542 353.863631 266.138632 95.812692 533.436225-51.353028 784.380224 25.368251 1035.324219 102.08953 1174.62994 373.566359 1095.735851 631.617298 1016.84176 889.66824 749.544168 1036.833959 498.600172 960.11268 424.134741 937.346313 357.837833 896.870788 303.973868 842.276436 291.310328 829.441176 291.396506 808.495802 304.166356 795.493625 316.936205 782.491452 337.554042 782.356136 350.217582 795.191397 396.640587 842.243889 453.73137 877.098901 517.975091 896.740177 734.436966 962.919213 965.320335 835.802028 1033.557737 612.607541 1101.795139 389.413057 981.467179 154.919792 765.005305 88.740755 548.543428 22.561718 317.660056 149.678904 249.422655 372.873388 235.597198 418.094418 229.294871 464.461039 230.4403 510.559881L311.240978 429.759202C323.584094 417.416085 343.892513 417.712357 356.601099 430.420946 369.309686 443.129535 369.605959 463.437952 357.262842 475.781068L230.778782 602.265128C229.273826 605.769679 227.098877 609.041396 224.251145 611.889128 211.908029 624.232245 191.59961 623.935974 178.891024 611.227385L40.825428 473.16179C28.11684 460.453206 27.820569 440.144784 40.163685 427.801668 52.506801 415.458551 72.815218 415.754827 85.523806 428.463411L165.238899 508.178506Z</Geometry>
    <Geometry x:Key="RotateRightGeometry" o:Freeze="True">M13.1117823382705,0.00108644926083379C18.7165758868546,0.0742913923738762 23.9197352191299,3.84162509632329 25.6893389483779,9.62980814885544 26.1165926715226,11.0273168346189 26.3185999652236,12.461670228202 26.296833302626,13.8899238456496L28.4974711200089,11.6892569876356C28.8483088275283,11.3384168617557 29.4089472552627,11.330238049977 29.7496950885147,11.6709881771838 30.0904429217666,12.0117402117628 30.0822642108291,12.572387459387 29.7314265033096,12.923229492639L25.9199488421768,16.7347560556155C25.5691111346572,17.0855980888674 25.0084688922257,17.0937769006462 24.6677210589736,16.7530248660672 24.5891077777236,16.674408708165 24.5290644427627,16.5840870073788 24.4875185748428,16.4873374624474L20.9957621356339,12.9955379708416C20.6550143023818,12.6547878436347 20.6631930133193,12.0941405960106 21.0140307208389,11.7432985627585 21.3648684283584,11.3924565295065 21.9255068560928,11.3842777177278 22.2662546893447,11.7250297523068L24.4968645831436,13.9556652415401C24.5284846087783,12.6830303030582 24.3545000811904,11.4030042974954 23.9728319903702,10.1546044295501 22.0890505572647,3.99295504901009 15.7152140399307,0.483677352708723 9.73950221742095,2.3106585349176 3.76379420960845,4.13763876344051 0.441986348280352,10.6112083411418 2.32576778138575,16.7728577216819 4.20954921449125,22.9345051948497 10.5833819171279,26.4437838448372 16.5590937396377,24.6168036163144 18.3326227923721,24.0745720467974 19.9086878558486,23.1123447593618 21.1902544757217,21.8133823630949 21.5398485919327,21.4590441166922 22.1090319415421,21.4627806587338 22.4615595599502,21.8217271162507 22.8140871783584,22.1806735737676 22.8164675494522,22.7589048852417 22.4668734332412,23.1132431316444 20.9798891803115,24.6204085496776 19.1496775409072,25.7378005615073 17.0939638873428,26.3663063881084 10.1663286944717,28.484321088751 2.78723170960845,24.4215726325395 0.609260823377952,17.2976520950044 -1.56871387754975,10.1737353722136 2.27700069154205,2.6791733248245 9.20463588441315,0.561156716809679 10.5035670062393,0.164028483596132 11.8183710833877,-0.0158071458708005 13.1117823382705,0.00108644926083379z</Geometry>
    <Geometry x:Key="EnlargeGeometry" o:Freeze="True">M750.3 198.7C598 46.4 351.1 46.4 198.7 198.7s-152.3 399.2 0 551.5C345.1 896.6 578.8 902.3 732 767.3l172.1 172.1 35.4-35.4-172.1-171.9c135-153.2 129.3-387-17.1-533.4z m39.3 403.8c-17.1 42.1-42.2 80-74.7 112.4-32.5 32.5-70.3 57.6-112.4 74.7-40.7 16.5-83.8 24.9-128 24.9s-87.2-8.4-128-24.9c-42.1-17.1-80-42.2-112.4-74.7s-57.6-70.3-74.7-112.4c-16.5-40.7-24.9-83.8-24.9-128s8.4-87.2 24.9-128c17.1-42.1 42.2-80 74.7-112.4s70.3-57.6 112.4-74.7c40.7-16.5 83.8-24.9 128-24.9s87.2 8.4 128 24.9c42.1 17.1 80 42.2 112.4 74.7 32.5 32.5 57.6 70.3 74.7 112.4 16.5 40.7 24.9 83.8 24.9 128s-8.4 87.3-24.9 128zM671 502H496v175h-50V502H271v-50h175V277h50v175h175v50z</Geometry>
    <Geometry x:Key="ReduceGeometry" o:Freeze="True">M750.3 198.7C598 46.4 351.1 46.4 198.7 198.7s-152.3 399.2 0 551.5C345.1 896.6 578.8 902.3 732 767.3l172.1 172.1 35.4-35.4-172.1-171.9c135-153.2 129.3-387-17.1-533.4z m39.3 403.8c-17.1 42.1-42.2 80-74.7 112.4-32.5 32.5-70.3 57.6-112.4 74.7-40.7 16.5-83.8 24.9-128 24.9s-87.2-8.4-128-24.9c-42.1-17.1-80-42.2-112.4-74.7s-57.6-70.3-74.7-112.4c-16.5-40.7-24.9-83.8-24.9-128s8.4-87.2 24.9-128c17.1-42.1 42.2-80 74.7-112.4s70.3-57.6 112.4-74.7c40.7-16.5 83.8-24.9 128-24.9s87.2 8.4 128 24.9c42.1 17.1 80 42.2 112.4 74.7 32.5 32.5 57.6 70.3 74.7 112.4 16.5 40.7 24.9 83.8 24.9 128s-8.4 87.3-24.9 128zM671 502H271v-50h400v50z</Geometry>
    <Geometry x:Key="DownloadGeometry" o:Freeze="True">M868.100096 742.600704l-0.049152 0L216.246272 742.600704l-0.049152 0c-13.98784 0-25.327616 11.33568-25.327616 25.352192 0 13.993984 11.360256 25.327616 25.327616 25.327616l0.049152 0 651.804672 0 0.049152 0c13.996032 0 25.33376-11.333632 25.33376-25.327616C893.431808 753.936384 882.096128 742.600704 868.100096 742.600704L868.100096 742.600704 868.100096 742.600704M523.15136 688.433152c4.728832 4.757504 11.237376 7.733248 18.47296 7.733248l0 0 0 0c7.231488 0 13.740032-2.951168 18.42176-7.757824l314.836992-314.83904c4.732928-4.704256 7.714816-11.214848 7.7312-18.395136 0-14.342144-11.712512-25.9584-25.972736-25.9584-7.213056-0.02048-13.694976 2.930688-18.376704 7.636992L567.578624 607.51872 567.578624 117.52448c-0.024576-0.026624-0.024576-0.026624-0.024576-0.0512 0.024576-14.344192-11.59168-25.980928-25.901056-25.980928-14.348288 0-25.960448 11.634688-25.960448 25.980928 0 0 0 0.024576 0.024576 0.0512l0 489.967616L245.055488 336.826368c-4.683776-4.704256-11.2128-7.6288-18.374656-7.60832-14.342144-0.02048-25.954304 11.614208-26.005504 25.9072 0 7.20896 2.951168 13.768704 7.684096 18.423808L523.15136 688.433152 523.15136 688.433152 523.15136 688.433152M523.15136 688.433152 523.15136 688.433152z</Geometry>
    <Geometry x:Key="SaveGeometry" o:Freeze="True">M608 320C625.664 320 640 305.696 640 288L640 160C640 142.304 625.664 128 608 128 590.336 128 576 142.304 576 160L576 288C576 305.696 590.336 320 608 320L608 320ZM960 896C960 931.328 931.328 960 896 960L128 960C92.672 960 64 931.328 64 896L64 128C64 92.672 92.672 64 128 64L192 64 192 384C192 419.328 220.672 448 256 448L768 448C803.328 448 832 419.328 832 384L832 64 896 64C931.328 64 960 92.672 960 128L960 896 960 896ZM256 64 768 64 768 352C768 369.696 753.664 384 736 384L288 384C270.336 384 256 369.696 256 352L256 64 256 64ZM896 0 128 0C57.312 0 0 57.312 0 128L0 896C0 966.688 57.312 1024 128 1024L896 1024C966.688 1024 1024 966.688 1024 896L1024 128C1024 57.312 966.688 0 896 0L896 0Z</Geometry>
    <Geometry x:Key="WindowsGeometry" o:Freeze="True">M426.276571 574.829714l0 372.004571-389.705143-53.686857 0-318.317714 389.705143 0zM426.276571 150.308571l0 376.539429-389.705143 0 0-322.852571zM987.428571 574.829714l0 449.170286-518.290286-71.460571 0-377.709714 518.290286 0zM987.428571 73.142857l0 453.705143-518.290286 0 0-382.317714z</Geometry>
    <Geometry x:Key="FullScreenGeometry" o:Freeze="True">M942 82v320h-50V167.4l-274 274-35.4-35.4 274-274H622V82h320zM406 582.6l-274 274V622H82v320h320v-50H167.4l274-274-35.4-35.4zM132 132h302V82H82v352h50V132z m760 760H590v50h352V590h-50v302z</Geometry>
    <Geometry x:Key="FullScreenReturnGeometry" o:Freeze="True">M94.186081,59.07 L100,59.07 100,100 59.07,100 59.07,94.186081 94.186081,94.186081 z M4.5814285,58.208999 L41.791,58.208999 41.791,95.418571 35.977005,95.418571 35.977005,68.139304 4.1163101,100 0,95.88369 31.860695,64.022995 4.5814285,64.022995 z M95.88369,0 L100,4.1163101 68.139304,35.977005 95.418571,35.977005 95.418571,41.791 58.208999,41.791 58.208999,4.5814285 64.022995,4.5814285 64.022995,31.860695 z M0,0 L40.929998,0 40.929998,5.8139191 5.8139191,5.8139191 5.8139191,40.929998 0,40.929998 z</Geometry>
    <Geometry x:Key="SearchGeometry" o:Freeze="True">M716.6003 213.800623c-138.851102-138.915088-364.020238-138.915088-502.935326 0s-138.915088 364.084225 0 502.935326a355.573996 355.573996 0 0 0 502.935326 0 355.573996 355.573996 0 0 0 0-502.935326z m-580.359212 580.359212a465.183184 465.183184 0 1 1 657.783099 0 465.183184 465.183184 0 0 1-657.783099 0z m868.939152 211.156054a63.474789 63.474789 0 0 1-89.837303 0l-89.773316-89.837303a63.410803 63.410803 0 1 1 89.773316-89.773316l89.837303 89.773316a63.346816 63.346816 0 0 1 0 89.837303z</Geometry>
    <Geometry x:Key="UpDownGeometry" o:Freeze="True">M454.464 143.68l-253.44 253.44c-12.032 12.032-12.032 31.36 0 43.392 11.968 11.968 31.36 11.968 43.328 0l237.376-237.376 237.376 237.376c11.968 11.968 31.36 11.968 43.328 0 12.032-12.032 12.032-31.36 0-43.392l-253.44-253.44C491.264 126.016 478.016 124.032 454.464 143.68zM507.968 947.648l252.48-253.376c11.968-11.968 11.968-31.36 0-43.392-11.968-11.968-31.296-11.968-43.264 0l-236.48 237.376L244.16 650.88c-11.968-11.968-31.296-11.968-43.264 0-11.968 12.032-11.968 31.424 0 43.392l252.48 253.376C465.984 960 491.136 964.48 507.968 947.648z</Geometry>
    <Geometry x:Key="WindowMinGeometry" o:Freeze="True">M0,4 L10,4 L10,5 L0,5 z</Geometry>
    <Geometry x:Key="WindowRestoreGeometry" o:Freeze="True">M1,3 L1,9 L7,9 L7,3 z M3,1 L3,2 L8,2 L8,7 L9,7 L9,1 z M2,0 L10,0 L10,8 L8,8 L8,10 L0,10 L0,2 L2,2 z</Geometry>
    <Geometry x:Key="WindowMaxGeometry" o:Freeze="True">M1,1 L1,9 L9,9 L9,1 z M0,0 L10,0 L10,10 L0,10 z</Geometry>
    <Geometry x:Key="CheckedGeometry" o:Freeze="True">M 0,2 3,5 8,0</Geometry>
    <Geometry x:Key="AlignLeftGeometry" o:Freeze="True">M0,8 L4,8 4,10 0,10 z M0,4 L8,4 8,6 0,6 z M0,0 L12,0 12,2 0,2 z</Geometry>
    <Geometry x:Key="AlignRightGeometry" o:Freeze="True">M8,8 L12,8 12,10 8,10 z M4,4 L12,4 12,6 4,6 z M0,0 L12,0 12,2 0,2 z</Geometry>
    <Geometry x:Key="AlignHCenterGeometry" o:Freeze="True">M4,8 L8,8 8,10 4,10 z M2,4 L10,4 10,6 2,6 z M0,0 L12,0 12,2 0,2 z</Geometry>
    <Geometry x:Key="AlignHStretchGeometry" o:Freeze="True">M0,8 L12,8 12,10 0,10 z M0,4 L12,4 12,6 0,6 z M0,0 L12,0 12,2 0,2 z</Geometry>
    <Geometry x:Key="AlignTopGeometry" o:Freeze="True">M8,0 L10,0 10,4 8,4 z M4,0 L6,0 6,8 4,8 z M0,0 L2,0 2,12 0,12 z</Geometry>
    <Geometry x:Key="AlignBottomGeometry" o:Freeze="True">M8,8 L10,8 10,12 8,12 z M4,4 L6,4 6,12 4,12 z M0,0 L2,0 2,12 0,12 z</Geometry>
    <Geometry x:Key="AlignVCenterGeometry" o:Freeze="True">M8,4 L10,4 10,8 8,8 z M4,2 L6,2 6,10 4,10 z M0,0 L2,0 2,12 0,12 z</Geometry>
    <Geometry x:Key="AlignVStretchGeometry" o:Freeze="True">M8,0 L10,0 10,12 8,12 z M4,0 L6,0 6,12 4,12 z M0,0 L2,0 2,12 0,12 z</Geometry>
    <Geometry x:Key="PageModeGeometry" o:Freeze="True">M1.0000002,12 L1.0000002,13 11,13 11,12 z M1.0000002,10 L1.0000002,11 11,11 11,10 z M1.0000002,8 L1.0000002,9 11,9 11,8 z M1.0000002,6 L1.0000002,7 11,7 11,6 z M1.0000002,4 L1.0000002,5 11,5 11,4 z M1.0000002,2 L1.0000002,3 11,3 11,2 z M0,0 L12,0 12,14 0,14 z</Geometry>
    <Geometry x:Key="TwoPageModeGeometry" o:Freeze="True">M8.99999988079071,12L8.99999988079071,13 13,13 13,12z M1,12L1,13 5,13 5,12z M9.00000011920929,10L9.00000011920929,11 13,11 13,10z M1,10L1,11 5,11 5,10z M9.00000011920929,8L9.00000011920929,9 13,9 13,8z M1,8L1,9 5,9 5,8z M9.00000011920929,6L9.00000011920929,7 13,7 13,6z M1,6L1,7 5,7 5,6z M9.00000011920929,4L9.00000011920929,5 13,5 13,4z M1,4L1,5 5,5 5,4z M8.99999988079071,2L8.99999988079071,3 13,3 13,2z M1,2L1,3 5,3 5,2z M7.99999994039536,0L14,0 14,14 7.99999994039536,14z M0,0L6,0 6,14 0,14z</Geometry>
    <Geometry x:Key="ScrollModeGeometry" o:Freeze="True">M1,12L1,13 8,13 8,12z M1,10L1,11 8,11 8,10z M1,8L1,9 8,9 8,8z M1,6L1,7 8,7 8,6z M11.0000002384186,5L11.0000002384186,9 13,9 13,5z M1,4L1,5 8,5 8,4z M1,2L1,3 8,3 8,2z M10.0000000298023,0L14,0 14,14 10.0000000298023,14z M0,0L9.00000011920929,0 9.00000011920929,14 0,14z</Geometry>
    <Geometry x:Key="EyeOpenGeometry" o:Freeze="True">M928 406.4c-100.8-137.6-249.6-224-416-224s-315.2 86.4-416 224c-44.8 60.8-44.8 150.4 0 211.2 102.4 137.6 251.2 224 416 224 166.4 0 315.2-86.4 416-224 46.4-60.8 46.4-150.4 0-211.2zM512 721.6c-115.2 0-209.6-94.4-209.6-209.6 0-115.2 94.4-209.6 209.6-209.6 115.2 0 209.6 94.4 209.6 209.6 1.6 115.2-92.8 209.6-209.6 209.6z m0-360c-83.2 0-150.4 67.2-150.4 150.4s67.2 150.4 150.4 150.4 150.4-67.2 150.4-150.4-67.2-150.4-150.4-150.4z m0 0</Geometry>
    <Geometry x:Key="EyeCloseGeometry" o:Freeze="True">M950.4 361.6c8-20.8 0-43.2-19.2-54.4-9.6-4.8-20.8-6.4-32-3.2s-19.2 11.2-24 22.4c-56 132.8-208 228.8-361.6 228.8-155.2 0-307.2-97.6-363.2-232-4.8-11.2-12.8-19.2-24-24-9.6-4.8-20.8-3.2-32 0-20.8 9.6-30.4 35.2-20.8 56 25.6 60.8 67.2 118.4 123.2 164.8l-67.2 70.4c-14.4 16-14.4 40 0 57.6 8 8 17.6 14.4 28.8 14.4s22.4-3.2 30.4-11.2l76.8-81.6c35.2 20.8 73.6 38.4 113.6 49.6l-28.8 83.2c-8 22.4 3.2 46.4 24 54.4 4.8 1.6 9.6 3.2 14.4 3.2 6.4 0 11.2-1.6 17.6-3.2 9.6-4.8 17.6-12.8 22.4-24l33.6-96c41.6 4.8 81.6 3.2 123.2-3.2l32 94.4c3.2 11.2 11.2 19.2 22.4 24 9.6 4.8 20.8 4.8 32 1.6 20.8-8 32-32 24-54.4l-28.8-84.8c30.4-9.6 59.2-22.4 86.4-38.4l62.4 65.6c14.4 16 43.2 16 57.6 0 16-16 16-43.2 0-60.8l-51.2-54.4c56-43.2 100.8-100.8 128-164.8z</Geometry>
    <Geometry x:Key="AudioGeometry" o:Freeze="True">M627.52666696 962L550.66666696 890.47999971c116.82-92.99999971 191.09999971-230.94 191.09999971-385.2 0-146.99999971-67.61999971-279-174.96-371.57999942L643.84666667 62C770.86666638 172.99999971 850.66666667 330.2 850.66666667 505.09999971c0 182.27999971-86.58 345.42-223.13999971 456.90000029zM405.64666638 782l-76.32-77.22a227.88 227.88 0 0 0 116.40000058-199.26A228.06 228.06 0 0 0 347.86666638 317.84000029L422.86666696 242A334.37999971 334.37999971 0 0 1 550.66666696 505.52 334.62 334.62 0 0 1 405.64666638 782zM205.66666638 596.6C164.26666638 596.6 130.66666667 562.51999971 130.66666667 520.64 130.66666667 478.76000029 164.26666638 444.79999971 205.66666638 444.79999971s74.99999971 33.95999971 75.00000058 75.90000058c0 41.87999971-33.59999971 75.84000029-75.00000058 75.83999942z</Geometry>
    <Geometry x:Key="BubbleTailGeometry" o:Freeze="True">M0,0L28,0 28,14.0000006258488 28,15.0010000765324 28.0151405334473,15.0010000765324 28.0455417633057,15.8010965883732C28.4084091186524,22.9596563875675,30.92209815979,29.5507589876652,34.9532623291016,34.9410597383976L34.9984359741211,34.9999815523624 34.0966339111328,34.9885679781437C15.1841707229614,34.5094191133976,2.0535663480814E-07,19.0279375612736,0,0z</Geometry>
    <Geometry x:Key="StarGeometry" o:Freeze="True">M535.9 165.2l96.5 195.4c3.9 7.9 11.4 13.3 20.1 14.6l215.7 31.3c21.9 3.2 30.6 30 14.8 45.5L726.8 604.1c-6.3 6.1-9.1 14.9-7.7 23.6L756 842.5c3.7 21.8-19.1 38.4-38.7 28.1L524.4 769.2c-7.8-4.1-17-4.1-24.8 0L306.7 870.6c-19.6 10.3-42.4-6.3-38.7-28.1l36.8-214.8c1.5-8.6-1.4-17.5-7.7-23.6L141.1 452c-15.8-15.4-7.1-42.3 14.8-45.5l215.7-31.3c8.7-1.3 16.2-6.7 20.1-14.6l96.5-195.4c9.7-19.9 37.9-19.9 47.7 0z</Geometry>
    <Geometry x:Key="AddGeometry" o:Freeze="True">M8,0 C8.5522847,0 9,0.44771525 9,1 L9,7 15,7 C15.552285,7 16,7.4477153 16,8 16,8.5522852 15.552285,9 15,9 L9,9 9,15 C9,15.552285 8.5522847,16 8,16 7.4477153,16 7,15.552285 7,15 L7,9 1,9 C0.44771528,9 0,8.5522852 0,8 0,7.4477153 0.44771528,7 1,7 L7,7 7,1 C7,0.44771525 7.4477153,0 8,0 z</Geometry>
    <Geometry x:Key="RemoveGeometry" o:Freeze="True">M10.899495,0 C11.155417,0 11.411339,0.097630501 11.606602,0.29289246 11.997126,0.68341732 11.997126,1.3165817 11.606602,1.7071066 L7.3639612,5.9497471 11.606602,10.192388 C11.997126,10.582912 11.997126,11.216077 11.606602,11.606601 11.216077,11.997126 10.582912,11.997126 10.192388,11.606601 L5.9497476,7.3639607 1.7071068,11.606601 C1.3165827,11.997126 0.68341756,11.997126 0.29289341,11.606601 -0.097630978,11.216077 -0.097630978,10.582912 0.29289341,10.192388 L4.5355338,5.9497471 0.29289341,1.7071066 C-0.097630978,1.3165817 -0.097630978,0.68341732 0.29289341,0.29289246 0.48815536,0.097630501 0.74407768,0 1,0 1.2559223,0 1.5118446,0.097630501 1.7071068,0.29289246 L5.9497476,4.5355334 10.192388,0.29289246 C10.38765,0.097630501 10.643572,0 10.899495,0 z</Geometry>
    <Geometry x:Key="SubGeometry" o:Freeze="True">M62.5797 488.9508c0.2632 42.5185 34.985 77.2116 77.5035 77.5035l743.0216-0.6728c42.5185 0.3215 76.7437-33.9333 76.4518-76.4805l0 0c-0.2918-42.5175-34.985-77.2106-77.5045-77.5035l-743.0216-0.087C96.513 411.4473 62.2879 446.4323 62.5797 488.9508L62.5797 488.9508z</Geometry>
    <Geometry x:Key="WarningGeometry" o:Freeze="True">M943.644188 827.215696l-351.176649-608.204749c-42.945473-74.36249-113.147387-74.36249-156.092861 0l-351.176649 608.204749c-42.946498 74.431167-7.811716 135.14955 78.012605 135.14955l702.420949 0C951.455904 962.36422 986.555836 901.645838 943.644188 827.215696zM466.187532 391.579035c12.621133-13.644108 28.66175-20.466675 48.233578-20.466675 19.580028 0 35.612444 6.75389 48.241778 20.194018 12.544256 13.473954 18.820484 30.325365 18.820484 50.587035 0 17.430551-26.19759 145.621205-34.929778 238.882082l-63.105666 0c-7.666162-93.259852-36.090106-221.450507-36.090106-238.882082C447.358847 421.938226 453.643275 405.155491 466.187532 391.579035zM561.76804 835.026386c-13.268949 12.928641-29.062535 19.375023-47.345906 19.375023-18.275171 0-34.076957-6.447407-47.346931-19.375023-13.235123-12.89379-19.818859-28.517221-19.818859-46.869269 0-18.249546 6.583736-34.043131 19.818859-47.278254 13.268949-13.235123 29.07176-19.852685 47.346931-19.852685 18.283371 0 34.076957 6.617562 47.345906 19.852685 13.235123 13.235123 19.827059 29.028709 19.827059 47.278254C581.595099 806.51019 575.003163 822.132597 561.76804 835.026386z</Geometry>
    <Geometry x:Key="InfoGeometry" o:Freeze="True">M505.6512 39.0144c-261.2224 3.4816-470.1184 218.112-466.6368 479.4368 3.4816 261.12 218.112 470.1184 479.3344 466.6368 261.2224-3.4816 470.1184-218.112 466.7392-479.3344C981.504 244.4288 766.8736 35.5328 505.6512 39.0144zM558.08 196.608c48.128 0 62.2592 27.9552 62.2592 59.8016 0 39.8336-31.9488 76.6976-86.3232 76.6976-45.568 0-67.1744-22.9376-65.9456-60.8256C468.0704 240.4352 494.7968 196.608 558.08 196.608zM434.7904 807.6288c-32.8704 0-56.9344-19.968-33.8944-107.6224l37.6832-155.5456c6.5536-24.8832 7.68-34.9184 0-34.9184-9.8304 0-52.5312 17.2032-77.7216 34.2016l-16.384-26.9312c79.9744-66.7648 171.8272-105.8816 211.2512-105.8816 32.8704 0 38.2976 38.912 21.9136 98.6112l-43.2128 163.5328c-7.68 28.8768-4.4032 38.912 3.2768 38.912 9.9328 0 42.1888-11.9808 73.9328-36.9664l18.6368 24.8832C552.5504 777.728 467.6608 807.6288 434.7904 807.6288z</Geometry>
    <Geometry x:Key="ErrorGeometry" o:Freeze="True">M495.469714 0C224.621714 0 0 224.621714 0 495.469714c0 270.884571 224.621714 495.506286 495.469714 495.506286 270.884571 0 495.506286-224.621714 495.506286-495.506286C990.976 224.621714 766.354286 0 495.469714 0z m211.419429 634.221714c19.821714 19.821714 19.821714 46.226286 0 66.048s-46.226286 19.821714-66.048 0l-138.752-138.715428-145.334857 145.334857a51.858286 51.858286 0 0 1-72.667429 0 51.858286 51.858286 0 0 1 0-72.667429l145.334857-145.334857-138.752-138.752c-19.821714-19.821714-19.821714-46.226286 0-66.048s46.262857-19.821714 66.084572 0l138.715428 138.715429 145.371429-145.334857a51.858286 51.858286 0 0 1 72.667428 0 51.858286 51.858286 0 0 1 0 72.667428l-145.371428 145.334857 138.752 138.752z</Geometry>
    <Geometry x:Key="SuccessGeometry" o:Freeze="True">M512.66048 64.64c-247.424 0-448 200.57728-448 448s200.576 448 448 448 448-200.57728 448-448c0-247.424-200.57728-448-448-448z m250.71232 334.86336L480.98176 681.89312c-15.49568 15.49696-40.61952 15.49696-56.11648 0l-162.9184-162.9184c-15.49568-15.49568-15.49568-40.61824 0-56.1152s40.61952-15.49568 56.11648 0l134.85952 134.85952L707.25504 343.3856c15.49568-15.49568 40.61952-15.49568 56.11648 0s15.49696 40.6208 0.00128 56.11776z</Geometry>
    <Geometry x:Key="FatalGeometry" o:Freeze="True">M716.8 375.466667l34.133333 34.133333c17.066667 17.066667 42.666667 17.066667 59.733334 0 17.066667-17.066667 17.066667-42.666667 0-59.733333l-34.133334-34.133334 34.133334-34.133333c17.066667-17.066667 17.066667-42.666667 0-59.733333-17.066667-17.066667-42.666667-17.066667-59.733334 0l-34.133333 34.133333-34.133333-34.133333c-17.066667-17.066667-42.666667-17.066667-59.733334 0-17.066667 17.066667-17.066667 42.666667 0 59.733333l34.133334 34.133333-34.133334 34.133334c-17.066667 17.066667-17.066667 42.666667 0 59.733333 17.066667 17.066667 42.666667 17.066667 59.733334 0l34.133333-34.133333z m-426.666667 0l34.133334 34.133333c17.066667 17.066667 42.666667 17.066667 59.733333 0 17.066667-17.066667 17.066667-42.666667 0-59.733333l-34.133333-34.133334 34.133333-34.133333c17.066667-17.066667 17.066667-42.666667 0-59.733333-17.066667-17.066667-42.666667-17.066667-59.733333 0l-34.133334 34.133333-34.133333-34.133333c-17.066667-17.066667-42.666667-17.066667-59.733333 0-17.066667 17.066667-17.066667 42.666667 0 59.733333l34.133333 34.133333-34.133333 34.133334c-17.066667 17.066667-17.066667 42.666667 0 59.733333 17.066667 17.066667 42.666667 17.066667 59.733333 0l34.133333-34.133333zM0 85.333333c0-51.2 42.666667-85.333333 85.333333-85.333333h853.333334c51.2 0 85.333333 42.666667 85.333333 85.333333v853.333334c0 51.2-42.666667 85.333333-85.333333 85.333333H85.333333c-51.2 0-85.333333-42.666667-85.333333-85.333333V85.333333z m512 469.333334c-136.533333 0-230.4 68.266667-290.133333 196.266666-8.533333 17.066667 0 42.666667 17.066666 59.733334s42.666667 0 59.733334-17.066667c51.2-93.866667 110.933333-145.066667 221.866666-145.066667 102.4 0 170.666667 51.2 221.866667 145.066667 8.533333 17.066667 34.133333 25.6 59.733333 17.066667 17.066667-8.533333 25.6-34.133333 17.066667-59.733334-76.8-128-170.666667-196.266667-307.2-196.266666z</Geometry>
    <Geometry x:Key="AskGeometry" o:Freeze="True">M512 0 30.11843 240.941297l0 542.117406 481.88157 240.941297 481.88157-240.941297L993.88157 240.941297 512 0zM575.776472 768.799969 460.188012 768.799969 460.188012 656.222073l115.588459 0L575.776472 768.799969zM623.335603 509.329685c-52.375829 36.723353-59.600363 55.988096-59.600363 84.885211l0 19.866447L468.616977 614.081343l0-26.489278c0-45.754021 13.846342-80.67124 61.406497-116.791866 46.957428-36.723353 57.79423-62.0082 57.79423-84.282484 0-25.284848-21.67258-54.181962-55.386393-54.181962-42.743457 0-70.436142 26.489278-82.477374 85.486914l-105.956088-21.67258c24.683144-111.976192 82.477374-157.127486 205.289345-157.127486 98.12985 0 157.72919 63.212631 157.72919 131.842639C707.017407 423.240044 688.956071 461.76953 623.335603 509.329685z</Geometry>
    <Geometry x:Key="AllGeometry" o:Freeze="True">M 721.005 638.949 C 758.74 638.949 789.333 669.56 789.333 707.312 C 789.333 745.047 758.74 775.657 721.005 775.657 C 683.253 775.657 652.66 745.047 652.66 707.312 C 652.66 669.56 683.253 638.949 721.005 638.949 Z M 512.017 638.949 C 549.77 638.949 580.38 669.56 580.38 707.312 C 580.38 745.047 549.77 775.657 512.017 775.657 C 474.265 775.657 443.672 745.047 443.672 707.312 C 443.672 669.56 474.265 638.949 512.017 638.949 Z M 303.029 638.949 C 340.781 638.949 371.392 669.56 371.392 707.312 C 371.392 745.047 340.781 775.657 303.029 775.657 C 265.277 775.657 234.667 745.047 234.667 707.312 C 234.667 669.56 265.277 638.949 303.029 638.949 Z M 721.005 443.655 C 758.74 443.655 789.333 474.265 789.333 512.017 C 789.333 549.769 758.74 580.363 721.005 580.363 C 683.253 580.363 652.66 549.769 652.66 512.017 C 652.66 474.265 683.253 443.655 721.005 443.655 Z M 512.017 443.655 C 549.77 443.655 580.38 474.265 580.38 512.017 C 580.38 549.769 549.77 580.363 512.017 580.363 C 474.265 580.363 443.672 549.769 443.672 512.017 C 443.672 474.265 474.265 443.655 512.017 443.655 Z M 303.029 443.655 C 340.781 443.655 371.392 474.265 371.392 512.017 C 371.392 549.769 340.781 580.363 303.029 580.363 C 265.277 580.363 234.667 549.769 234.667 512.017 C 234.667 474.265 265.277 443.655 303.029 443.655 Z M 721.005 248.343 C 758.74 248.343 789.333 278.953 789.333 316.688 C 789.333 354.44 758.74 385.051 721.005 385.051 C 683.253 385.051 652.66 354.44 652.66 316.688 C 652.66 278.953 683.253 248.343 721.005 248.343 Z M 512.017 248.343 C 549.77 248.343 580.38 278.953 580.38 316.688 C 580.38 354.44 549.77 385.051 512.017 385.051 C 474.265 385.051 443.672 354.44 443.672 316.688 C 443.672 278.953 474.265 248.343 512.017 248.343 Z M 303.029 248.343 C 340.781 248.343 371.392 278.953 371.392 316.688 C 371.392 354.44 340.781 385.051 303.029 385.051 C 265.277 385.051 234.667 354.44 234.667 316.688 C 234.667 278.953 265.277 248.343 303.029 248.343 Z</Geometry>
    <Geometry x:Key="DragVerticalGeometry" o:Freeze="True">M2,12 C3.1045694,12 4,12.895431 4,14 4,15.104569 3.1045694,16 2,16 0.89543051,16 0,15.104569 0,14 0,12.895431 0.89543051,12 2,12 z M2,6 C3.1045694,6 4,6.8954306 4,8 4,9.1045694 3.1045694,10 2,10 0.89543051,10 0,9.1045694 0,8 0,6.8954306 0.89543051,6 2,6 z M2,0 C3.1045694,0 4,0.89543056 4,2 4,3.1045694 3.1045694,4 2,4 0.89543051,4 0,3.1045694 0,2 0,0.89543056 0.89543051,0 2,0 z</Geometry>
    <Geometry x:Key="DragHorizontalGeometry" o:Freeze="True">M14,0 C15.104569,0 16,0.89543051 16,2 16,3.1045694 15.104569,4 14,4 12.895431,4 12,3.1045694 12,2 12,0.89543051 12.895431,0 14,0 z M8,0 C9.1045694,0 10,0.89543051 10,2 10,3.1045694 9.1045694,4 8,4 6.8954306,4 6,3.1045694 6,2 6,0.89543051 6.8954306,0 8,0 z M2,0 C3.1045694,0 4,0.89543051 4,2 4,3.1045694 3.1045694,4 2,4 0.89543056,4 0,3.1045694 0,2 0,0.89543051 0.89543056,0 2,0 z</Geometry>
    <Geometry x:Key="DropperGeometry" o:Freeze="True">M798.165333 97.834667a42.624 42.624 0 0 0-60.330666 0l-140.629334 140.629333-55.381333-55.296-60.330667 60.330667 55.381334 55.296-353.706667 353.706666a42.709333 42.709333 0 0 0-11.221333 19.84l-42.666667 170.666667a42.538667 42.538667 0 0 0 51.712 51.712l170.666667-42.666667c7.509333-1.877333 14.378667-5.76 19.84-11.221333l353.792-353.792 55.210666 55.125333 60.330667-60.330666-55.210667-55.125334 140.544-140.544a42.624 42.624 0 0 0 0-60.330666l-128-128zM319.488 772.138667l-90.197333 22.570666 22.570666-90.197333 345.386667-345.386667 67.669333 67.584-345.429333 345.429334z</Geometry>
    <Style x:Key="PathBaseStyle" TargetType="Path">
        <Setter Property="Stretch" Value="Uniform" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="FlowDirection" Value="LeftToRight" />
    </Style>
    <system:Double x:Key="DefaultControlHeight">28</system:Double>
    <system:Double x:Key="SmallControlHeight">20</system:Double>
    <Thickness x:Key="DefaultControlPadding">10,5</Thickness>
    <Thickness x:Key="DefaultInputPadding">8,0</Thickness>
    <CornerRadius x:Key="DefaultCornerRadius">4</CornerRadius>
    <system:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">30</system:Double>
    <interactivity:FluidMoveBehavior
        x:Key="BehaviorXY200"
        x:Shared="False"
        AppliesTo="Children"
        Duration="0:0:.2">
        <interactivity:FluidMoveBehavior.EaseX>
            <PowerEase />
        </interactivity:FluidMoveBehavior.EaseX>
        <interactivity:FluidMoveBehavior.EaseY>
            <PowerEase />
        </interactivity:FluidMoveBehavior.EaseY>
    </interactivity:FluidMoveBehavior>
    <interactivity:FluidMoveBehavior
        x:Key="BehaviorX200"
        x:Shared="False"
        AppliesTo="Children"
        Duration="0:0:.2">
        <interactivity:FluidMoveBehavior.EaseX>
            <PowerEase />
        </interactivity:FluidMoveBehavior.EaseX>
    </interactivity:FluidMoveBehavior>
    <interactivity:FluidMoveBehavior
        x:Key="BehaviorY200"
        x:Shared="False"
        AppliesTo="Children"
        Duration="0:0:.2">
        <interactivity:FluidMoveBehavior.EaseY>
            <PowerEase />
        </interactivity:FluidMoveBehavior.EaseY>
    </interactivity:FluidMoveBehavior>
    <interactivity:FluidMoveBehavior
        x:Key="BehaviorXY400"
        x:Shared="False"
        AppliesTo="Children"
        Duration="0:0:.4">
        <interactivity:FluidMoveBehavior.EaseX>
            <PowerEase />
        </interactivity:FluidMoveBehavior.EaseX>
        <interactivity:FluidMoveBehavior.EaseY>
            <PowerEase />
        </interactivity:FluidMoveBehavior.EaseY>
    </interactivity:FluidMoveBehavior>
    <interactivity:FluidMoveBehavior
        x:Key="BehaviorX400"
        x:Shared="False"
        AppliesTo="Children"
        Duration="0:0:.4">
        <interactivity:FluidMoveBehavior.EaseX>
            <PowerEase />
        </interactivity:FluidMoveBehavior.EaseX>
    </interactivity:FluidMoveBehavior>
    <interactivity:FluidMoveBehavior
        x:Key="BehaviorY400"
        x:Shared="False"
        AppliesTo="Children"
        Duration="0:0:.4">
        <interactivity:FluidMoveBehavior.EaseY>
            <PowerEase />
        </interactivity:FluidMoveBehavior.EaseY>
    </interactivity:FluidMoveBehavior>
    <Style TargetType="hc:BlendEffectBox">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:BlendEffectBox">
                    <ContentPresenter ContentSource="ActualContent" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="BorderCircular" TargetType="Border">
        <Setter Property="hc:BorderElement.Circular" Value="True" />
    </Style>
    <Style TargetType="hc:Col">
        <Setter Property="Focusable" Value="False" />
    </Style>
    <Style TargetType="ContentControl">
        <Setter Property="Focusable" Value="False" />
    </Style>
    <Style TargetType="hc:FlipClock">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:FlipClock">
                    <StackPanel Orientation="Horizontal">
                        <hc:FlipNumber Margin="-20" Number="{Binding NumberList[0], RelativeSource={RelativeSource TemplatedParent}}" />
                        <hc:FlipNumber Margin="-20" Number="{Binding NumberList[1], RelativeSource={RelativeSource TemplatedParent}}" />
                        <hc:FlipNumber Margin="0,-20,-20,-20" Number="{Binding NumberList[2], RelativeSource={RelativeSource TemplatedParent}}" />
                        <hc:FlipNumber Margin="-20" Number="{Binding NumberList[3], RelativeSource={RelativeSource TemplatedParent}}" />
                        <hc:FlipNumber Margin="0,-20,-20,-20" Number="{Binding NumberList[4], RelativeSource={RelativeSource TemplatedParent}}" />
                        <hc:FlipNumber Margin="-20" Number="{Binding NumberList[5], RelativeSource={RelativeSource TemplatedParent}}" />
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type hc:Dashboard}">
        <Setter Property="Value" Value="0" />
        <Setter Property="Maximum" Value="120" />
        <Setter Property="Minimum" Value="0" />
        <Setter Property="PlateBackground" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type hc:Dashboard}">
                    <Grid>
                        <Viewbox>
                            <Border
                                Background="{TemplateBinding PlateBackground}"
                                BorderBrush="{TemplateBinding PlateBorderBrush}"
                                BorderThickness="{TemplateBinding PlateBorderThickness}"
                                ClipToBounds="True"
                                CornerRadius="200">
                                <Grid>
                                    <Canvas
                                        Name="canvasPlate"
                                        Width="400"
                                        Height="400"
                                        Margin="14"
                                        Background="Transparent">
                                        <Canvas.RenderTransform>
                                            <RotateTransform Angle="-45" CenterX="200" CenterY="200" />
                                        </Canvas.RenderTransform>
                                    </Canvas>
                                    <shapes:Arc
                                        ArcThickness="24"
                                        ArcThicknessUnit="Pixel"
                                        EndAngle="135.5"
                                        Fill="#45246B"
                                        Opacity="0.1"
                                        StartAngle="-135.5"
                                        Stretch="None"
                                        StrokeEndLineCap="Round"
                                        StrokeStartLineCap="Round" />
                                    <shapes:Arc
                                        x:Name="arckd"
                                        ArcThickness="24"
                                        ArcThicknessUnit="Pixel"
                                        EndAngle="50"
                                        Fill="#2E1C5C"
                                        Opacity="0.8"
                                        StartAngle="-135.5"
                                        Stretch="None"
                                        StrokeEndLineCap="Round"
                                        StrokeStartLineCap="Round" />
                                    <!--  刻度盘当前值对应的圆弧  -->

                                    <Border
                                        Width="240"
                                        Height="240"
                                        Margin="14"
                                        CornerRadius="120"
                                        Opacity="0.5">
                                        <Border.Background>
                                            <RadialGradientBrush RadiusX="1" RadiusY="1">
                                                <GradientStop Offset="0.2" Color="#45246B" />
                                                <GradientStop Offset="0.3" Color="#2E1C5C" />
                                                <GradientStop Offset="0.5" Color="#253192" />
                                            </RadialGradientBrush>
                                        </Border.Background>
                                    </Border>
                                    <Path
                                        Name="pointer"
                                        Margin="14"
                                        Data="M200 205,40 200,200 195,200 205"
                                        RenderTransformOrigin="0.5,0.5">
                                        <Path.Fill>
                                            <RadialGradientBrush RadiusX="1" RadiusY="1">
                                                <GradientStop Offset="0.3" Color="#00C9FF" />
                                                <GradientStop Offset="0.4" Color="#CE97EF" />
                                                <GradientStop Offset="1" Color="#091851" />
                                            </RadialGradientBrush>
                                        </Path.Fill>
                                        <Path.RenderTransform>
                                            <RotateTransform x:Name="rtPointer" Angle="-45" />
                                        </Path.RenderTransform>
                                    </Path>
                                    <Border
                                        Width="80"
                                        Height="80"
                                        Margin="14"
                                        CornerRadius="40">
                                        <Border.Background>
                                            <RadialGradientBrush RadiusX="1" RadiusY="1">
                                                <GradientStop Offset="0.2" Color="#45246B" />
                                                <GradientStop Offset="0.3" Color="#2E1C5C" />
                                                <GradientStop Offset="0.5" Color="#253192" />
                                            </RadialGradientBrush>
                                        </Border.Background>
                                        <StackPanel
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Orientation="Vertical">
                                            <TextBlock
                                                x:Name="valueTxt"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                FontSize="30" />
                                            <TextBlock
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                FontSize="12"
                                                Text="{TemplateBinding Unit}" />
                                        </StackPanel>
                                    </Border>
                                </Grid>
                            </Border>
                        </Viewbox>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:FloatingBlock">
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:FloatingBlock">
                    <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="GridSplitter">
        <Setter Property="Focusable" Value="False" />
    </Style>
    <Style TargetType="hc:Notification">
        <Setter Property="hc:WindowAttach.IgnoreAltF4" Value="True" />
        <Setter Property="hc:WindowAttach.ShowInTaskManager" Value="False" />
        <Setter Property="SizeToContent" Value="WidthAndHeight" />
        <Setter Property="ResizeMode" Value="NoResize" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="ShowActivated" Value="False" />
        <Setter Property="ShowInTaskbar" Value="False" />
        <Setter Property="Topmost" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Notification">
                    <ContentPresenter
                        Margin="{TemplateBinding Padding}"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RectangleCircular" TargetType="Rectangle">
        <Setter Property="hc:RectangleAttach.Circular" Value="True" />
    </Style>
    <Style x:Key="SnapRect4ScreenshotStyle" TargetType="Rectangle">
        <Setter Property="Height" Value="5" />
        <Setter Property="Width" Value="5" />
        <Setter Property="Fill" Value="DodgerBlue" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="Visibility" Value="Collapsed" />
        <Style.Triggers>
            <Trigger Property="hc:TipElement.Placement" Value="LeftTop">
                <Setter Property="Margin" Value="-3,-3,0,0" />
                <Setter Property="HorizontalAlignment" Value="Left" />
                <Setter Property="VerticalAlignment" Value="Top" />
            </Trigger>
            <Trigger Property="hc:TipElement.Placement" Value="Top">
                <Setter Property="Margin" Value="0,-3,0,0" />
                <Setter Property="HorizontalAlignment" Value="Center" />
                <Setter Property="VerticalAlignment" Value="Top" />
            </Trigger>
            <Trigger Property="hc:TipElement.Placement" Value="RightTop">
                <Setter Property="Margin" Value="0,-3,-3,0" />
                <Setter Property="HorizontalAlignment" Value="Right" />
                <Setter Property="VerticalAlignment" Value="Top" />
            </Trigger>
            <Trigger Property="hc:TipElement.Placement" Value="Right">
                <Setter Property="Margin" Value="0,0,-3,0" />
                <Setter Property="HorizontalAlignment" Value="Right" />
                <Setter Property="VerticalAlignment" Value="Center" />
            </Trigger>
            <Trigger Property="hc:TipElement.Placement" Value="RightBottom">
                <Setter Property="Margin" Value="0,0,-3,-3" />
                <Setter Property="HorizontalAlignment" Value="Right" />
                <Setter Property="VerticalAlignment" Value="Bottom" />
            </Trigger>
            <Trigger Property="hc:TipElement.Placement" Value="Bottom">
                <Setter Property="Margin" Value="0,0,0,-3" />
                <Setter Property="HorizontalAlignment" Value="Center" />
                <Setter Property="VerticalAlignment" Value="Bottom" />
            </Trigger>
            <Trigger Property="hc:TipElement.Placement" Value="LeftBottom">
                <Setter Property="Margin" Value="-3,0,0,-3" />
                <Setter Property="HorizontalAlignment" Value="Left" />
                <Setter Property="VerticalAlignment" Value="Bottom" />
            </Trigger>
            <Trigger Property="hc:TipElement.Placement" Value="Left">
                <Setter Property="Margin" Value="-3,0,0,0" />
                <Setter Property="HorizontalAlignment" Value="Left" />
                <Setter Property="VerticalAlignment" Value="Center" />
            </Trigger>
            <DataTrigger Binding="{Binding IsSelecting}" Value="True">
                <Setter Property="Visibility" Value="Visible" />
            </DataTrigger>
            <DataTrigger Binding="{Binding IsDrawing}" Value="True">
                <Setter Property="Visibility" Value="Visible" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="TargetArea4ScreenshotStyle" TargetType="Border">
        <Setter Property="IsHitTestVisible" Value="False" />
        <Setter Property="BorderThickness" Value="5" />
        <Setter Property="BorderBrush" Value="DodgerBlue" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsSelecting}" Value="True">
                <Setter Property="BorderThickness" Value="1" />
            </DataTrigger>
            <DataTrigger Binding="{Binding IsDrawing}" Value="True">
                <Setter Property="IsHitTestVisible" Value="True" />
                <Setter Property="BorderThickness" Value="1" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    <Style TargetType="hc:SimpleItemsControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:SimpleItemsControl">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <StackPanel x:Name="PART_Panel" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:Sprite">
        <Setter Property="hc:WindowAttach.IgnoreAltF4" Value="True" />
        <Setter Property="hc:WindowAttach.ShowInTaskManager" Value="False" />
        <Setter Property="SizeToContent" Value="WidthAndHeight" />
        <Setter Property="ResizeMode" Value="NoResize" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="ShowActivated" Value="False" />
        <Setter Property="ShowInTaskbar" Value="False" />
        <Setter Property="Topmost" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Sprite">
                    <ContentPresenter
                        Margin="{TemplateBinding Padding}"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        hc:WindowAttach.IsDragElement="True" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Storyboard x:Key="Right2LeftTransition" x:Shared="False">
        <DoubleAnimation
            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
            From="50"
            To="0"
            Duration="0:0:0.4">
            <DoubleAnimation.EasingFunction>
                <CubicEase EasingMode="EaseOut" />
            </DoubleAnimation.EasingFunction>
        </DoubleAnimation>
    </Storyboard>
    <Storyboard x:Key="Left2RightTransition" x:Shared="False">
        <DoubleAnimation
            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
            From="-50"
            To="0"
            Duration="0:0:0.4">
            <DoubleAnimation.EasingFunction>
                <CubicEase EasingMode="EaseOut" />
            </DoubleAnimation.EasingFunction>
        </DoubleAnimation>
    </Storyboard>
    <Storyboard x:Key="Bottom2TopTransition" x:Shared="False">
        <DoubleAnimation
            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
            From="50"
            To="0"
            Duration="0:0:0.4">
            <DoubleAnimation.EasingFunction>
                <CubicEase EasingMode="EaseOut" />
            </DoubleAnimation.EasingFunction>
        </DoubleAnimation>
    </Storyboard>
    <Storyboard x:Key="Top2BottomTransition" x:Shared="False">
        <DoubleAnimation
            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
            From="-50"
            To="0"
            Duration="0:0:0.4">
            <DoubleAnimation.EasingFunction>
                <CubicEase EasingMode="EaseOut" />
            </DoubleAnimation.EasingFunction>
        </DoubleAnimation>
    </Storyboard>
    <Storyboard x:Key="Right2LeftWithFadeTransition" x:Shared="False">
        <DoubleAnimation
            Storyboard.TargetProperty="(UIElement.Opacity)"
            From="0"
            To="1"
            Duration="0:0:0.4" />
        <DoubleAnimation
            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
            From="50"
            To="0"
            Duration="0:0:0.4">
            <DoubleAnimation.EasingFunction>
                <CubicEase EasingMode="EaseOut" />
            </DoubleAnimation.EasingFunction>
        </DoubleAnimation>
    </Storyboard>
    <Storyboard x:Key="Left2RightWithFadeTransition" x:Shared="False">
        <DoubleAnimation
            Storyboard.TargetProperty="(UIElement.Opacity)"
            From="0"
            To="1"
            Duration="0:0:0.4" />
        <DoubleAnimation
            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
            From="-50"
            To="0"
            Duration="0:0:0.4">
            <DoubleAnimation.EasingFunction>
                <CubicEase EasingMode="EaseOut" />
            </DoubleAnimation.EasingFunction>
        </DoubleAnimation>
    </Storyboard>
    <Storyboard x:Key="Bottom2TopWithFadeTransition" x:Shared="False">
        <DoubleAnimation
            Storyboard.TargetProperty="(UIElement.Opacity)"
            From="0"
            To="1"
            Duration="0:0:0.4" />
        <DoubleAnimation
            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
            From="50"
            To="0"
            Duration="0:0:0.4">
            <DoubleAnimation.EasingFunction>
                <CubicEase EasingMode="EaseOut" />
            </DoubleAnimation.EasingFunction>
        </DoubleAnimation>
    </Storyboard>
    <Storyboard x:Key="Top2BottomWithFadeTransition" x:Shared="False">
        <DoubleAnimation
            Storyboard.TargetProperty="(UIElement.Opacity)"
            From="0"
            To="1"
            Duration="0:0:0.4" />
        <DoubleAnimation
            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
            From="-50"
            To="0"
            Duration="0:0:0.4">
            <DoubleAnimation.EasingFunction>
                <CubicEase EasingMode="EaseOut" />
            </DoubleAnimation.EasingFunction>
        </DoubleAnimation>
    </Storyboard>
    <Storyboard x:Key="FadeTransition" x:Shared="False">
        <DoubleAnimation
            Storyboard.TargetProperty="(UIElement.Opacity)"
            From="0"
            To="1"
            Duration="0:0:0.4" />
    </Storyboard>
    <Style TargetType="hc:TransitioningContentControl">
        <Setter Property="Focusable" Value="False" />
    </Style>
    <Style x:Key="SliderRepeatButtonHorizontalStyle" TargetType="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="RepeatButton">
                    <Border
                        Width="{TemplateBinding Width}"
                        Height="{TemplateBinding Height}"
                        Background="Transparent">
                        <Rectangle
                            Height="2"
                            Fill="{TemplateBinding Background}"
                            StrokeThickness="0" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="SliderRepeatButtonVerticalStyle" TargetType="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="RepeatButton">
                    <Border
                        Width="{TemplateBinding Width}"
                        Height="{TemplateBinding Height}"
                        Background="Transparent">
                        <Rectangle
                            Width="2"
                            Fill="{TemplateBinding Background}"
                            StrokeThickness="0" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CompareSliderRepeatButtonTransparent" TargetType="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="RepeatButton">
                    <ContentPresenter
                        Width="{TemplateBinding ActualWidth}"
                        Height="{TemplateBinding ActualHeight}"
                        Content="{TemplateBinding Content}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="PreviewSliderRepeatButtonHorizontalStyle" TargetType="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="RepeatButton">
                    <Border
                        Width="{TemplateBinding Width}"
                        Height="{TemplateBinding Height}"
                        Background="Transparent">
                        <Rectangle Height="2" Fill="{TemplateBinding Background}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="PreviewSliderRepeatButtonVerticalStyle" TargetType="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="RepeatButton">
                    <Border
                        Width="{TemplateBinding Width}"
                        Height="{TemplateBinding Height}"
                        Background="Transparent">
                        <Rectangle Width="2" Fill="{TemplateBinding Background}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ScrollBarBaseRepeatButton" TargetType="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="RepeatButton">
                    <Rectangle
                        Width="{TemplateBinding Width}"
                        Height="{TemplateBinding Height}"
                        Fill="{TemplateBinding Background}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ToggleBlockBaseStyle" TargetType="hc:ToggleBlock">
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:ToggleBlock">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <hc:SimplePanel
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                            <ContentPresenter
                                Name="ContentPresenterChecked"
                                ContentSource="CheckedContent"
                                Visibility="Collapsed" />
                            <ContentPresenter Name="ContentPresenterUnChecked" ContentSource="UnCheckedContent" />
                            <ContentPresenter
                                Name="ContentPresenterIndeterminate"
                                ContentSource="IndeterminateContent"
                                Visibility="Collapsed" />
                        </hc:SimplePanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="ContentPresenterChecked" Property="Visibility" Value="Visible" />
                            <Setter TargetName="ContentPresenterUnChecked" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ContentPresenterIndeterminate" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="False">
                            <Setter TargetName="ContentPresenterChecked" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ContentPresenterUnChecked" Property="Visibility" Value="Visible" />
                            <Setter TargetName="ContentPresenterIndeterminate" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="{x:Null}">
                            <Setter TargetName="ContentPresenterChecked" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ContentPresenterUnChecked" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ContentPresenterIndeterminate" Property="Visibility" Value="Visible" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="GroupBoxBaseTopTemplate" TargetType="GroupBox">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Border
                MinHeight="{Binding Path=(hc:TitleElement.MinHeight), RelativeSource={RelativeSource TemplatedParent}}"
                Margin="0,0,0,6"
                Background="{Binding Path=(hc:TitleElement.Background), RelativeSource={RelativeSource TemplatedParent}}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                <ContentPresenter
                    Margin="{Binding Path=(hc:TitleElement.Padding), RelativeSource={RelativeSource TemplatedParent}}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentSource="Header"
                    RecognizesAccessKey="True"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    TextElement.Foreground="{TemplateBinding Foreground}" />
            </Border>
            <Border
                Grid.Row="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                <ContentPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
            </Border>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="GroupBoxBaseLeftTemplate" TargetType="GroupBox">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Border
                MinWidth="{Binding Path=(hc:TitleElement.MinWidth), RelativeSource={RelativeSource TemplatedParent}}"
                Margin="0,0,6,0"
                Background="{Binding Path=(hc:TitleElement.Background), RelativeSource={RelativeSource TemplatedParent}}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                ClipToBounds="False"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                <ContentPresenter
                    Margin="{Binding Path=(hc:TitleElement.Padding), RelativeSource={RelativeSource TemplatedParent}}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentSource="Header"
                    RecognizesAccessKey="True"
                    RenderTransformOrigin="0.5,0.5"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    TextElement.Foreground="{TemplateBinding Foreground}">
                    <ContentPresenter.LayoutTransform>
                        <TransformGroup>
                            <RotateTransform Angle="-90" />
                        </TransformGroup>
                    </ContentPresenter.LayoutTransform>
                </ContentPresenter>
            </Border>
            <Border
                Grid.Column="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                <ContentPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
            </Border>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="GroupBoxTabTopTemplate" TargetType="GroupBox">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Border
                Grid.Row="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='0,0,1,1'}">
                <ContentPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
            </Border>
            <Border
                Grid.Row="0"
                MinHeight="{Binding Path=(hc:TitleElement.MinHeight), RelativeSource={RelativeSource TemplatedParent}}"
                Background="{Binding Path=(hc:TitleElement.Background), RelativeSource={RelativeSource TemplatedParent}}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='1,1,1,0'}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='1,1,0,0'}">
                <ContentPresenter
                    Margin="{Binding Path=(hc:TitleElement.Padding), RelativeSource={RelativeSource TemplatedParent}}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentSource="Header"
                    RecognizesAccessKey="True"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    TextElement.Foreground="{TemplateBinding Foreground}" />
            </Border>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="GroupBoxTabLeftTemplate" TargetType="GroupBox">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Border
                Grid.Column="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='0,1,1,0'}">
                <ContentPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
            </Border>
            <Border
                Grid.Column="0"
                MinWidth="{Binding Path=(hc:TitleElement.MinWidth), RelativeSource={RelativeSource TemplatedParent}}"
                Background="{Binding Path=(hc:TitleElement.Background), RelativeSource={RelativeSource TemplatedParent}}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='1,1,0,1'}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='1,0,0,1'}">
                <ContentPresenter
                    Margin="{Binding Path=(hc:TitleElement.Padding), RelativeSource={RelativeSource TemplatedParent}}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentSource="Header"
                    RecognizesAccessKey="True"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    TextElement.Foreground="{TemplateBinding Foreground}">
                    <ContentPresenter.LayoutTransform>
                        <TransformGroup>
                            <RotateTransform Angle="-90" />
                        </TransformGroup>
                    </ContentPresenter.LayoutTransform>
                </ContentPresenter>
            </Border>
        </Grid>
    </ControlTemplate>
    <ItemsPanelTemplate x:Key="ButtonGroupHorizontalUniformItemsPanelTemplate">
        <UniformGrid FocusVisualStyle="{x:Null}" Rows="1" />
    </ItemsPanelTemplate>
    <ItemsPanelTemplate x:Key="ButtonGroupVerticalUniformItemsPanelTemplate">
        <UniformGrid Columns="1" FocusVisualStyle="{x:Null}" />
    </ItemsPanelTemplate>
    <ItemsPanelTemplate x:Key="ButtonGroupHorizontalStackItemsPanelTemplate">
        <StackPanel FocusVisualStyle="{x:Null}" Orientation="Horizontal" />
    </ItemsPanelTemplate>
    <ItemsPanelTemplate x:Key="ButtonGroupVerticalStackItemsPanelTemplate">
        <StackPanel FocusVisualStyle="{x:Null}" />
    </ItemsPanelTemplate>
    <tools:ButtonGroupItemStyleSelector x:Key="ButtonGroupItemStyleSelector" />
    <LinearGradientBrush x:Key="ProgressBarIndicatorAnimatedFill" StartPoint="0,0" EndPoint="1,0">
        <GradientStop Offset="0" Color="#00FFFFFF" />
        <GradientStop Offset="0.4" Color="#60FFFFFF" />
        <GradientStop Offset="0.6" Color="#60FFFFFF" />
        <GradientStop Offset="1" Color="#00FFFFFF" />
    </LinearGradientBrush>
    <ControlTemplate x:Key="CircleProgressBarTemplate" TargetType="hc:CircleProgressBar">
        <hc:SimplePanel x:Name="TemplateRoot">
            <shapes:Arc
                Width="{TemplateBinding ActualWidth}"
                Height="{TemplateBinding ActualHeight}"
                ArcThickness="{TemplateBinding ArcThickness}"
                EndAngle="360"
                Fill="{TemplateBinding Background}"
                Stretch="None"
                Stroke="{TemplateBinding BorderBrush}"
                StrokeThickness="0" />
            <shapes:Arc
                x:Name="PART_Indicator"
                Width="{TemplateBinding ActualWidth}"
                Height="{TemplateBinding ActualHeight}"
                ArcThickness="{TemplateBinding ArcThickness}"
                Fill="{TemplateBinding Foreground}"
                Stretch="None"
                StrokeThickness="0" />
            <TextBlock
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                Foreground="{TemplateBinding Foreground}"
                Text="{TemplateBinding Text}"
                Visibility="{Binding ShowText, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
        </hc:SimplePanel>
    </ControlTemplate>
    <ItemsPanelTemplate x:Key="UniformHorizontalItemsPanelTemplate">
        <UniformGrid FocusVisualStyle="{x:Null}" Rows="1" />
    </ItemsPanelTemplate>
    <ItemsPanelTemplate x:Key="UniformVerticalItemsPanelTemplate">
        <UniformGrid Columns="1" FocusVisualStyle="{x:Null}" />
    </ItemsPanelTemplate>
    <ItemsPanelTemplate x:Key="StackHorizontalItemsPanelTemplate">
        <StackPanel FocusVisualStyle="{x:Null}" Orientation="Horizontal" />
    </ItemsPanelTemplate>
    <ItemsPanelTemplate x:Key="StackVerticalItemsPanelTemplate">
        <StackPanel FocusVisualStyle="{x:Null}" />
    </ItemsPanelTemplate>
    <ItemsPanelTemplate x:Key="VirtualizingStackHorizontalItemsPanelTemplate">
        <VirtualizingStackPanel FocusVisualStyle="{x:Null}" Orientation="Horizontal" />
    </ItemsPanelTemplate>
    <ItemsPanelTemplate x:Key="VirtualizingStackVerticalItemsPanelTemplate">
        <VirtualizingStackPanel FocusVisualStyle="{x:Null}" />
    </ItemsPanelTemplate>
    <ItemsPanelTemplate x:Key="WrapHorizontalItemsPanelTemplate">
        <WrapPanel
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            FocusVisualStyle="{x:Null}" />
    </ItemsPanelTemplate>
    <ItemsPanelTemplate x:Key="WrapVerticalItemsPanelTemplate">
        <WrapPanel
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            FocusVisualStyle="{x:Null}"
            Orientation="Vertical" />
    </ItemsPanelTemplate>
    <ItemsPanelTemplate x:Key="DockItemsPanelTemplate">
        <DockPanel FocusVisualStyle="{x:Null}" LastChildFill="True" />
    </ItemsPanelTemplate>
    <LinearGradientBrush x:Key="ResizeGripperForeground" StartPoint="0,0.25" EndPoint="1,0.75">
        <GradientStop Offset="0.3" Color="#FFFFFF" />
        <GradientStop Offset="0.75" Color="#BBC5D7" />
        <GradientStop Offset="1" Color="#6D83A9" />
    </LinearGradientBrush>
    <SineEase x:Key="SineEaseOut" EasingMode="EaseOut" />
    <ControlTemplate x:Key="BadgeDotTemplate" TargetType="hc:Badge">
        <hc:SimplePanel>
            <ContentPresenter />
            <Border
                Width="10"
                Height="10"
                Margin="{TemplateBinding BadgeMargin}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="5"
                Visibility="{TemplateBinding ShowBadge,
                                             Converter={StaticResource Boolean2VisibilityConverter}}" />
        </hc:SimplePanel>
    </ControlTemplate>
    <Style x:Key="ColorPickerSliderRepeatButtonBaseStyle" TargetType="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="RepeatButton">
                    <Rectangle
                        Width="{TemplateBinding Width}"
                        Height="{TemplateBinding Height}"
                        Fill="{TemplateBinding Background}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="ColorPickerSliderThumbTemplate" TargetType="Thumb">
        <Border
            Width="13"
            Height="13"
            Background="White"
            CornerRadius="6.5" />
    </ControlTemplate>
    <LinearGradientBrush x:Key="ColorPickerRainbowBrush">
        <GradientStop Color="#ff0000" />
        <GradientStop Offset="0.167" Color="#ff00ff" />
        <GradientStop Offset="0.334" Color="#0000ff" />
        <GradientStop Offset="0.501" Color="#00ffff" />
        <GradientStop Offset="0.668" Color="#00ff00" />
        <GradientStop Offset="0.835" Color="#ffff00" />
        <GradientStop Offset="1" Color="#ff0000" />
    </LinearGradientBrush>
    <DrawingBrush
        x:Key="ColorPickerOpacityBrush"
        Stretch="None"
        TileMode="Tile"
        Viewport="0,0,12,11"
        ViewportUnits="Absolute">
        <DrawingBrush.Drawing>
            <DrawingGroup>
                <GeometryDrawing Brush="#d0cec7">
                    <GeometryDrawing.Geometry>
                        <GeometryGroup>
                            <RectangleGeometry Rect="0,0,6,5" />
                            <RectangleGeometry Rect="6,6,6,5" />
                        </GeometryGroup>
                    </GeometryDrawing.Geometry>
                </GeometryDrawing>
                <GeometryDrawing Brush="#e7e7e2">
                    <GeometryDrawing.Geometry>
                        <RectangleGeometry Rect="0,5,12,1" />
                    </GeometryDrawing.Geometry>
                </GeometryDrawing>
            </DrawingGroup>
        </DrawingBrush.Drawing>
    </DrawingBrush>
    <Style x:Key="CoverFlowBaseStyle" TargetType="hc:CoverFlow">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:CoverFlow">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <Viewport3D x:Name="PART_Viewport3D">
                            <Viewport3D.Camera>
                                <PerspectiveCamera
                                    x:Name="PART_Camera"
                                    FieldOfView="90"
                                    LookDirection="0,0,-1"
                                    Position="0,0,3"
                                    UpDirection="0,1,0" />
                            </Viewport3D.Camera>
                            <Viewport3D.Children>
                                <ModelVisual3D>
                                    <ModelVisual3D.Content>
                                        <DirectionalLight Direction="1,0,-4" Color="White" />
                                    </ModelVisual3D.Content>
                                </ModelVisual3D>
                                <ModelVisual3D>
                                    <ModelVisual3D.Content>
                                        <DirectionalLight Direction="-1,0,-4" Color="White" />
                                    </ModelVisual3D.Content>
                                </ModelVisual3D>
                                <ModelVisual3D x:Name="PART_VisualParent" />
                            </Viewport3D.Children>
                        </Viewport3D>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CoverViewItemBaseStyle" TargetType="hc:CoverViewItem">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:CoverViewItem">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <ContentPresenter
                            Margin="{TemplateBinding Padding}"
                            ContentSource="Header"
                            ContentTemplate="{TemplateBinding HeaderTemplate}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="GridViewColumnHeaderGripper" TargetType="Thumb">
        <Setter Property="Canvas.Right" Value="-9" />
        <Setter Property="Width" Value="18" />
        <Setter Property="Height" Value="{Binding ActualHeight, RelativeSource={RelativeSource TemplatedParent}}" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Border Padding="{TemplateBinding Padding}" Background="Transparent">
                        <Rectangle
                            Width="1"
                            HorizontalAlignment="Center"
                            Fill="{TemplateBinding Background}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <DrawingBrush x:Key="SortByCategoryDrawingBrush" o:Freeze="True">
        <DrawingBrush.Drawing>
            <DrawingGroup o:Freeze="True">
                <GeometryDrawing
                    o:Freeze="True"
                    Brush="#00FFFFFF"
                    Geometry="F1M16,16L0,16 0,0 16,0z" />
                <GeometryDrawing
                    o:Freeze="True"
                    Brush="#FFF6F6F6"
                    Geometry="F1M0.9999,-0.000199999999999534L0.9999,15.9998 10.9999,15.9998 10.9999,13.4148 11.9999,14.4138 15.9999,10.4138 15.9999,5.5858 14.0009,7.5858 14.0009,3.0008 10.9999,3.0008 10.9999,-0.000199999999999534z" />
                <GeometryDrawing
                    o:Freeze="True"
                    Brush="#FF424242"
                    Geometry="F1M10,12.4141L10,15.0001 2,15.0001 2,1.0001 10,1.0001 10,3.0001 10,7.5861 8.414,6.0001 9,6.0001 9,3.0001 3,3.0001 3,6.0001 8,6.0001 8,7.0001 3,7.0001 3,10.0001 8,10.0001 8,10.4141 8.586,11.0001 3,11.0001 3,14.0001 9,14.0001 9,11.4141z" />
                <GeometryDrawing
                    o:Freeze="True"
                    Brush="#FFEFEFF0"
                    Geometry="F1M8.5859,11L2.9999,11 2.9999,14 8.9999,14 8.9999,11.414z M7.9999,7L2.9999,7 2.9999,10 7.9999,10z M7.9999,6L2.9999,6 2.9999,3 8.9999,3 8.9999,6 8.4139,6 7.9999,5.586z" />
                <GeometryDrawing
                    o:Freeze="True"
                    Brush="#FF00529C"
                    Geometry="F1M13,10L13,4 11,4 11,10 9,8 9,10 12,13 15,10 15,8z" />
            </DrawingGroup>
        </DrawingBrush.Drawing>
    </DrawingBrush>
    <DrawingBrush x:Key="SortByNameDrawingBrush" o:Freeze="True">
        <DrawingBrush.Drawing>
            <DrawingGroup o:Freeze="True">
                <GeometryDrawing
                    o:Freeze="True"
                    Brush="#00FFFFFF"
                    Geometry="F1M16,16L0,16 0,0 16,0z" />
                <GeometryDrawing
                    o:Freeze="True"
                    Brush="#FFF6F6F6"
                    Geometry="F1M0,-0.000199999999999534L0,8.9998 1,8.9998 1,12.0008 2.586,12.0008 1,13.5858 1,15.9998 8,15.9998 8,13.0008 6.449,13.0008 8,12.0008 8,10.9998 12,14.9998 16,10.9998 16,4.9998 14,6.9998 14,3.0008 10,3.0008 10,6.9998 9,5.9998 9,-0.000199999999999534z" />
                <GeometryDrawing
                    o:Freeze="True"
                    Brush="#FF424242"
                    Geometry="F1M7,7L5,2 4,2 2,7 3,7 3.399,6 5.601,6 6,7z M8,8L1,8 1,1 8,1z M4.5,3.25L5.2,5 3.8,5z M2,11L5,11 2,14 2,15 7,15 7,14 4.013,14 7,11.051 6.952,11 7,11 7,10 2,10z" />
                <GeometryDrawing
                    o:Freeze="True"
                    Brush="#FFEFEFF0"
                    Geometry="F1M3.7998,5L4.4998,3.25 5.1998,5z M5.9998,7L6.9998,7 4.9998,2 3.9998,2 1.9998,7 2.9998,7 3.3998,6 5.6008,6z" />
                <GeometryDrawing
                    o:Freeze="True"
                    Brush="#FF00529C"
                    Geometry="F1M15,8L15,10 12,13 9,10 9,8 11,10 11,4 13,4 13,10z" />
            </DrawingGroup>
        </DrawingBrush.Drawing>
    </DrawingBrush>
    <ContextMenu x:Key="TabItemMenu" x:Shared="False">
        <MenuItem Command="interactivity:ControlCommands.Close" Header="{x:Static langs:Lang.Close}" />
        <MenuItem Command="interactivity:ControlCommands.CloseAll" Header="{x:Static langs:Lang.CloseAll}" />
        <MenuItem Command="interactivity:ControlCommands.CloseOther" Header="{x:Static langs:Lang.CloseOther}" />
    </ContextMenu>
    <Style x:Key="ToolBarTrayBaseStyle" TargetType="ToolBarTray">
        <Setter Property="Background" Value="Transparent" />
    </Style>
    <PathGeometry x:Key="TreeArrow" Figures="M508.893248 762.931659a65.039498 65.039498 0 0 1-46.420659-19.485839L97.125746 371.004022c-25.143018-25.634319-24.752868-66.816849 0.881451-91.959868 25.648769-25.164693 66.809624-24.745643 91.959867 0.881451l318.933409 325.125238 318.933408-325.125238a65.025048 65.025048 0 0 1 92.841318 91.078417L555.313907 743.44582a65.025048 65.025048 0 0 1-46.420659 19.485839z" />
    <Style x:Key="RowHeaderGripperStyle" TargetType="Thumb">
        <Setter Property="Height" Value="8" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Cursor" Value="SizeNS" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Border Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ColumnHeaderGripperStyle" TargetType="Thumb">
        <Setter Property="Width" Value="8" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Cursor" Value="SizeWE" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Border Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="DataGridComboBoxColumnStyle" TargetType="ComboBox">
        <Setter Property="Focusable" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ComboBox">
                    <TextBlock
                        IsHitTestVisible="False"
                        Text="{TemplateBinding Text}"
                        TextTrimming="CharacterEllipsis" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="DataGridTextColumnStyle" TargetType="TextBlock">
        <Setter Property="TextTrimming" Value="CharacterEllipsis" />
    </Style>
    <Style x:Key="CarouselItemBaseStyle" TargetType="hc:CarouselItem">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:CarouselItem">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <ContentPresenter Margin="{TemplateBinding Padding}" ContentTemplate="{Binding ItemTemplate, RelativeSource={RelativeSource AncestorType=hc:Carousel}}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:GrowlWindow">
        <Setter Property="hc:WindowAttach.IgnoreAltF4" Value="True" />
        <Setter Property="hc:WindowAttach.ShowInTaskManager" Value="False" />
        <Setter Property="Width" Value="340" />
        <Setter Property="MaxWidth" Value="340" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="ShowActivated" Value="False" />
        <Setter Property="ShowInTaskbar" Value="False" />
        <Setter Property="Topmost" Value="True" />
    </Style>
    <Style x:Key="ListBoxItemCustom" TargetType="ListBoxItem">
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType=ItemsControl}}" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <ContentPresenter
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <tools:ComboBoxItemCapsuleStyleSelector x:Key="ComboBoxItemCapsuleStyleSelector" />
    <hc:HorizontalAlignmentPathTemplateSelector x:Key="HorizontalAlignmentPathTemplateSelector" />
    <hc:VerticalAlignmentPathTemplateSelector x:Key="VerticalAlignmentPathTemplateSelector" />
    <Geometry x:Key="NailGeometry">M956.553 366.486L657.514 67.447c-7.888-7.888-18.204-11.772-28.52-11.772s-20.632 3.884-28.52 11.772L404.958 263.085c-14.806-1.7-29.734-2.428-44.662-2.428-88.837 0-177.675 29.249-250.614 87.746-18.69 14.927-20.268 42.962-3.277 59.953l220.516 220.517L65.506 890.046c-3.156 3.155-5.219 7.403-5.583 11.893l-4.126 45.147c-1.093 11.408 8.01 21.117 19.296 21.117 0.607 0 1.214 0 1.82-0.121l45.148-4.126c4.49-0.364 8.738-2.428 11.893-5.583L395.37 696.957l220.517 220.517c7.888 7.888 18.204 11.772 28.52 11.772 11.772 0 23.423-5.097 31.433-15.05 68.327-85.317 96.726-192.117 85.197-295.397l195.516-195.515c15.655-15.535 15.655-41.021 0-56.798zM699.142 557.268l-29.734 29.734 4.612 41.75c4.49 40.898 1.213 81.555-9.952 120.998-6.554 23.059-15.535 45.026-26.943 65.779L208.593 386.753c15.655-8.616 31.918-15.898 48.909-21.724 33.01-11.408 67.599-17.112 102.794-17.112 11.651 0 23.423 0.607 35.074 1.942l41.75 4.612 29.733-29.734 162.262-162.262 232.41 232.41-162.383 162.383z</Geometry>
    <Geometry x:Key="DialogBoxLauncherGeometry">M0,0 8,0 8,1 1,1 1,8 0,8 M 3.7,3 8,7.3 8,4 9,4 9,9 4,9 4,8 7.3,8 3,3.7</Geometry>
    <Style TargetType="hc:RibbonTab">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:RibbonTab">
                    <hc:SimplePanel x:Name="PART_RootContainer" Visibility="Collapsed">
                        <Border
                            x:Name="mainBorder"
                            Margin="0"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="0,0,0,3" />
                        <ScrollViewer
                            hc:ScrollViewerAttach.Orientation="Horizontal"
                            HorizontalScrollBarVisibility="Hidden"
                            VerticalScrollBarVisibility="Disabled">
                            <ItemsPresenter />
                        </ScrollViewer>
                    </hc:SimplePanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <SolidColorBrush
        x:Key="LightPrimaryBrush"
        o:Freeze="True"
        Color="{DynamicResource LightPrimaryColor}" />
    <LinearGradientBrush x:Key="PrimaryBrush" o:Freeze="True" StartPoint="0,0" EndPoint="1,0">
        <GradientStop o:Freeze="True" Offset="0" Color="{DynamicResource PrimaryColor}" />
        <GradientStop o:Freeze="True" Offset="1" Color="{DynamicResource DarkPrimaryColor}" />
    </LinearGradientBrush>
    <SolidColorBrush
        x:Key="DarkPrimaryBrush"
        o:Freeze="True"
        Color="{DynamicResource DarkPrimaryColor}" />
    <SolidColorBrush
        x:Key="PrimaryTextBrush"
        o:Freeze="True"
        Color="{DynamicResource PrimaryTextColor}" />
    <SolidColorBrush
        x:Key="SecondaryTextBrush"
        o:Freeze="True"
        Color="{DynamicResource SecondaryTextColor}" />
    <SolidColorBrush
        x:Key="ThirdlyTextBrush"
        o:Freeze="True"
        Color="{DynamicResource ThirdlyTextColor}" />
    <SolidColorBrush
        x:Key="ReverseTextBrush"
        o:Freeze="True"
        Color="{DynamicResource ReverseTextColor}" />
    <SolidColorBrush
        x:Key="TextIconBrush"
        o:Freeze="True"
        Color="{DynamicResource TextIconColor}" />
    <SolidColorBrush
        x:Key="BorderBrush"
        o:Freeze="True"
        Color="{DynamicResource BorderColor}" />
    <SolidColorBrush
        x:Key="SecondaryBorderBrush"
        o:Freeze="True"
        Color="{DynamicResource SecondaryBorderColor}" />
    <SolidColorBrush
        x:Key="BackgroundBrush"
        o:Freeze="True"
        Color="{DynamicResource BackgroundColor}" />
    <SolidColorBrush
        x:Key="RegionBrush"
        o:Freeze="True"
        Color="{DynamicResource RegionColor}" />
    <SolidColorBrush
        x:Key="SecondaryRegionBrush"
        o:Freeze="True"
        Color="{DynamicResource SecondaryRegionColor}" />
    <SolidColorBrush
        x:Key="ThirdlyRegionBrush"
        o:Freeze="True"
        Color="{DynamicResource ThirdlyRegionColor}" />
    <LinearGradientBrush x:Key="TitleBrush" o:Freeze="True" StartPoint="0,0" EndPoint="1,0">
        <GradientStop o:Freeze="True" Offset="0" Color="{DynamicResource TitleColor}" />
        <GradientStop o:Freeze="True" Offset="1" Color="{DynamicResource SecondaryTitleColor}" />
    </LinearGradientBrush>
    <SolidColorBrush
        x:Key="DefaultBrush"
        o:Freeze="True"
        Color="{DynamicResource DefaultColor}" />
    <SolidColorBrush
        x:Key="DarkDefaultBrush"
        o:Freeze="True"
        Color="{DynamicResource DarkDefaultColor}" />
    <SolidColorBrush
        x:Key="LightDangerBrush"
        o:Freeze="True"
        Color="{DynamicResource LightDangerColor}" />
    <LinearGradientBrush x:Key="DangerBrush" o:Freeze="True" StartPoint="0,0" EndPoint="1,0">
        <GradientStop o:Freeze="True" Offset="0" Color="{DynamicResource DangerColor}" />
        <GradientStop o:Freeze="True" Offset="1" Color="{DynamicResource DarkDangerColor}" />
    </LinearGradientBrush>
    <SolidColorBrush
        x:Key="DarkDangerBrush"
        o:Freeze="True"
        Color="{DynamicResource DarkDangerColor}" />
    <SolidColorBrush
        x:Key="LightWarningBrush"
        o:Freeze="True"
        Color="{DynamicResource LightWarningColor}" />
    <LinearGradientBrush x:Key="WarningBrush" o:Freeze="True" StartPoint="0,0" EndPoint="1,0">
        <GradientStop o:Freeze="True" Offset="0" Color="{DynamicResource WarningColor}" />
        <GradientStop o:Freeze="True" Offset="1" Color="{DynamicResource DarkWarningColor}" />
    </LinearGradientBrush>
    <SolidColorBrush
        x:Key="DarkWarningBrush"
        o:Freeze="True"
        Color="{DynamicResource DarkWarningColor}" />
    <SolidColorBrush
        x:Key="LightInfoBrush"
        o:Freeze="True"
        Color="{DynamicResource LightInfoColor}" />
    <LinearGradientBrush x:Key="InfoBrush" o:Freeze="True" StartPoint="0,0" EndPoint="1,0">
        <GradientStop o:Freeze="True" Offset="0" Color="{DynamicResource InfoColor}" />
        <GradientStop o:Freeze="True" Offset="1" Color="{DynamicResource DarkInfoColor}" />
    </LinearGradientBrush>
    <SolidColorBrush
        x:Key="DarkInfoBrush"
        o:Freeze="True"
        Color="{DynamicResource DarkInfoColor}" />
    <SolidColorBrush
        x:Key="LightSuccessBrush"
        o:Freeze="True"
        Color="{DynamicResource LightSuccessColor}" />
    <LinearGradientBrush x:Key="SuccessBrush" o:Freeze="True" StartPoint="0,0" EndPoint="1,0">
        <GradientStop o:Freeze="True" Offset="0" Color="{DynamicResource SuccessColor}" />
        <GradientStop o:Freeze="True" Offset="1" Color="{DynamicResource DarkSuccessColor}" />
    </LinearGradientBrush>
    <SolidColorBrush
        x:Key="DarkSuccessBrush"
        o:Freeze="True"
        Color="{DynamicResource DarkSuccessColor}" />
    <SolidColorBrush
        x:Key="AccentBrush"
        o:Freeze="True"
        Color="{DynamicResource AccentColor}" />
    <SolidColorBrush
        x:Key="DarkAccentBrush"
        o:Freeze="True"
        Color="{DynamicResource DarkAccentColor}" />
    <SolidColorBrush
        x:Key="DarkMaskBrush"
        o:Freeze="True"
        Color="{DynamicResource DarkMaskColor}" />
    <SolidColorBrush
        x:Key="DarkOpacityBrush"
        o:Freeze="True"
        Color="{DynamicResource DarkOpacityColor}" />
    <DropShadowEffect
        x:Key="EffectShadow1"
        o:Freeze="True"
        BlurRadius="5"
        Direction="270"
        Opacity=".2"
        RenderingBias="Performance"
        ShadowDepth="1"
        Color="{StaticResource EffectShadowColor}" />
    <DropShadowEffect
        x:Key="EffectShadow2"
        o:Freeze="True"
        BlurRadius="8"
        Direction="270"
        Opacity=".2"
        RenderingBias="Performance"
        ShadowDepth="1.5"
        Color="{StaticResource EffectShadowColor}" />
    <DropShadowEffect
        x:Key="EffectShadow3"
        o:Freeze="True"
        BlurRadius="14"
        Direction="270"
        Opacity=".2"
        RenderingBias="Performance"
        ShadowDepth="4.5"
        Color="{StaticResource EffectShadowColor}" />
    <DropShadowEffect
        x:Key="EffectShadow4"
        o:Freeze="True"
        BlurRadius="25"
        Direction="270"
        Opacity=".2"
        RenderingBias="Performance"
        ShadowDepth="8"
        Color="{StaticResource EffectShadowColor}" />
    <DropShadowEffect
        x:Key="EffectShadow5"
        o:Freeze="True"
        BlurRadius="35"
        Direction="270"
        Opacity=".2"
        RenderingBias="Performance"
        ShadowDepth="13"
        Color="{StaticResource EffectShadowColor}" />
    <Style
        x:Key="SearchPathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource SearchGeometry}" />
    </Style>
    <Style
        x:Key="FullScreenReturnPathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource FullScreenReturnGeometry}" />
    </Style>
    <Style
        x:Key="FullScreenPathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource FullScreenGeometry}" />
    </Style>
    <Style
        x:Key="WindowsPathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource WindowsGeometry}" />
    </Style>
    <Style
        x:Key="SavePathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource SaveGeometry}" />
    </Style>
    <Style
        x:Key="DownloadPathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource DownloadGeometry}" />
    </Style>
    <Style
        x:Key="EnlargePathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource EnlargeGeometry}" />
    </Style>
    <Style
        x:Key="ReducePathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource ReduceGeometry}" />
    </Style>
    <Style
        x:Key="RotatePathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource RotateLeftGeometry}" />
    </Style>
    <Style
        x:Key="CalendarPathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource CalendarGeometry}" />
    </Style>
    <Style
        x:Key="DeletePathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource DeleteGeometry}" />
    </Style>
    <Style
        x:Key="ClosePathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource CloseGeometry}" />
    </Style>
    <Style
        x:Key="DownPathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource DownGeometry}" />
    </Style>
    <Style
        x:Key="ClockPathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource ClockGeometry}" />
    </Style>
    <Style
        x:Key="LeftPathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource LeftGeometry}" />
    </Style>
    <Style
        x:Key="RightPathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="RenderTransformOrigin" Value="0.5, 0.5" />
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform ScaleX="-1" ScaleY="1" />
                    <SkewTransform AngleX="0" AngleY="0" />
                    <RotateTransform Angle="0" />
                    <TranslateTransform />
                </TransformGroup>
            </Setter.Value>
        </Setter>
        <Setter Property="Data" Value="{StaticResource LeftGeometry}" />
    </Style>
    <Style
        x:Key="UpDownPathStyle"
        TargetType="Path"
        BasedOn="{StaticResource PathBaseStyle}">
        <Setter Property="Data" Value="{StaticResource UpDownGeometry}" />
    </Style>
    <Style x:Key="BorderRegion" TargetType="Border">
        <Setter Property="CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Padding" Value="10" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
    </Style>
    <Style x:Key="BorderTipBaseStyle" TargetType="Border">
        <Setter Property="CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Padding" Value="10" />
        <Setter Property="BorderThickness" Value="5,0,0,0" />
    </Style>
    <Style
        x:Key="BorderTipPrimary"
        TargetType="Border"
        BasedOn="{StaticResource BorderTipBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource LightPrimaryBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="BorderTipDanger"
        TargetType="Border"
        BasedOn="{StaticResource BorderTipBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource LightDangerBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style
        x:Key="BorderTipWarning"
        TargetType="Border"
        BasedOn="{StaticResource BorderTipBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource LightWarningBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="BorderTipInfo"
        TargetType="Border"
        BasedOn="{StaticResource BorderTipBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource LightInfoBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="BorderTipSuccess"
        TargetType="Border"
        BasedOn="{StaticResource BorderTipBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource LightSuccessBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style x:Key="BorderVerticallySplitter" TargetType="Border">
        <Setter Property="Width" Value="1" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="Background" Value="{DynamicResource ThirdlyTextBrush}" />
    </Style>
    <Style x:Key="BorderHorizontallySplitter" TargetType="Border">
        <Setter Property="Height" Value="1" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="Background" Value="{DynamicResource ThirdlyTextBrush}" />
    </Style>
    <Style x:Key="BorderClip" TargetType="Border">
        <Setter Property="Clip">
            <Setter.Value>
                <MultiBinding Converter="{StaticResource BorderClipConverter}">
                    <Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
                    <Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
                    <Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" />
                </MultiBinding>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="BorderCircularClip"
        TargetType="Border"
        BasedOn="{StaticResource BorderCircular}">
        <Setter Property="Clip">
            <Setter.Value>
                <MultiBinding Converter="{StaticResource BorderCircularClipConverter}">
                    <Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
                    <Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
                    <Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" />
                </MultiBinding>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:FlipNumber">
        <Setter Property="FontSize" Value="70" />
        <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
        <Setter Property="Background" Value="{DynamicResource TitleBrush}" />
        <Setter Property="Width" Value="120" />
        <Setter Property="Height" Value="180" />
        <Setter Property="Camera">
            <Setter.Value>
                <PerspectiveCamera LookDirection="0 0 -1" Position="0 0 120" />
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RectangleFocusVisual" TargetType="Rectangle">
        <Setter Property="Margin" Value="-2" />
        <Setter Property="Opacity" Value=".6" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Stroke" Value="{DynamicResource SecondaryBorderBrush}" />
        <Setter Property="StrokeThickness" Value="2" />
        <Setter Property="StrokeDashArray" Value="1 1" />
    </Style>
    <Style
        x:Key="RectangleFocusVisualCircular"
        TargetType="Rectangle"
        BasedOn="{StaticResource RectangleFocusVisual}">
        <Setter Property="hc:RectangleAttach.Circular" Value="True" />
    </Style>
    <Style x:Key="TextBoxBaseBaseStyle" TargetType="TextBoxBase">
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="CaretBrush" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="Padding" Value="2,7" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBoxBase">
                    <Border
                        x:Name="border"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        SnapsToDevicePixels="True">
                        <ScrollViewer
                            x:Name="PART_ContentHost"
                            Padding="{TemplateBinding Padding}"
                            Focusable="false"
                            HorizontalScrollBarVisibility="{Binding Path=(ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                            VerticalScrollBarVisibility="{Binding Path=(ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="border" Property="Opacity" Value="0.4" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
                        </Trigger>
                        <Trigger Property="IsFocused" Value="true">
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="RichTextBoxBaseStyle"
        TargetType="RichTextBox"
        BasedOn="{StaticResource TextBoxBaseBaseStyle}">
        <Setter Property="MinWidth" Value="10" />
    </Style>
    <Style TargetType="RichTextBox" BasedOn="{StaticResource RichTextBoxBaseStyle}" />
    <Style x:Key="MaskRect4ScreenshotStyle" TargetType="Rectangle">
        <Setter Property="IsHitTestVisible" Value="False" />
        <Setter Property="Fill" Value="{DynamicResource DarkOpacityBrush}" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
    </Style>
    <Style x:Key="Window4ScreenshotStyle" TargetType="hc:ScreenshotWindow">
        <Setter Property="UseLayoutRounding" Value="True" />
        <Setter Property="WindowStyle" Value="None" />
        <Setter Property="WindowState" Value="Maximized" />
        <Setter Property="Topmost" Value="True" />
        <Setter Property="ResizeMode" Value="NoResize" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="hc:WindowAttach.IgnoreAltF4" Value="True" />
        <Setter Property="hc:WindowAttach.ShowInTaskManager" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:ScreenshotWindow">
                    <AdornerDecorator>
                        <hc:SimplePanel>
                            <InkCanvas
                                Name="PART_Canvas"
                                Background="Transparent"
                                EditingMode="None" />
                            <Rectangle Name="PART_MaskAreaLeft" Style="{StaticResource MaskRect4ScreenshotStyle}" />
                            <Rectangle Name="PART_MaskAreaTop" Style="{StaticResource MaskRect4ScreenshotStyle}" />
                            <Rectangle Name="PART_MaskAreaRight" Style="{StaticResource MaskRect4ScreenshotStyle}" />
                            <Rectangle Name="PART_MaskAreaBottom" Style="{StaticResource MaskRect4ScreenshotStyle}" />
                            <Border Name="PART_TargetArea" Style="{StaticResource TargetArea4ScreenshotStyle}">
                                <hc:SimplePanel>
                                    <Rectangle hc:TipElement.Placement="LeftTop" Style="{StaticResource SnapRect4ScreenshotStyle}" />
                                    <Rectangle hc:TipElement.Placement="Top" Style="{StaticResource SnapRect4ScreenshotStyle}" />
                                    <Rectangle hc:TipElement.Placement="RightTop" Style="{StaticResource SnapRect4ScreenshotStyle}" />
                                    <Rectangle hc:TipElement.Placement="Right" Style="{StaticResource SnapRect4ScreenshotStyle}" />
                                    <Rectangle hc:TipElement.Placement="RightBottom" Style="{StaticResource SnapRect4ScreenshotStyle}" />
                                    <Rectangle hc:TipElement.Placement="Bottom" Style="{StaticResource SnapRect4ScreenshotStyle}" />
                                    <Rectangle hc:TipElement.Placement="LeftBottom" Style="{StaticResource SnapRect4ScreenshotStyle}" />
                                    <Rectangle hc:TipElement.Placement="Left" Style="{StaticResource SnapRect4ScreenshotStyle}" />
                                    <TextBlock
                                        Padding="8,2"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Top"
                                        Background="#CC212121"
                                        Foreground="White"
                                        Text="{TemplateBinding SizeStr}" />
                                </hc:SimplePanel>
                            </Border>
                            <Border
                                x:Name="PART_Magnifier"
                                Width="122"
                                Height="122"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Top"
                                BorderBrush="#FF333333"
                                BorderThickness="1"
                                CornerRadius="1"
                                IsHitTestVisible="False"
                                Visibility="Collapsed">
                                <Border.Effect>
                                    <DropShadowEffect
                                        BlurRadius="2"
                                        Direction="-45"
                                        Opacity=".2"
                                        RenderingBias="Performance"
                                        ShadowDepth="3" />
                                </Border.Effect>
                                <hc:SimplePanel>
                                    <Border
                                        Margin="0,0,0,32"
                                        Background="{TemplateBinding PreviewBrush}"
                                        BorderBrush="White"
                                        BorderThickness="2">
                                        <hc:SimplePanel>
                                            <Path Data="M56,0 L60,0 60,40 116,40 116,44 60,44 60,84 56,84 56,44 0,44 0,40 56,40 z" Fill="#CC4CC6FF" />
                                        </hc:SimplePanel>
                                    </Border>
                                    <Border
                                        Height="32"
                                        VerticalAlignment="Bottom"
                                        Background="#CC000000">
                                        <StackPanel Margin="5,0,0,0" VerticalAlignment="Center">
                                            <TextBlock Foreground="White" Text="{TemplateBinding SizeStr}" />
                                        </StackPanel>
                                    </Border>
                                </hc:SimplePanel>
                            </Border>
                        </hc:SimplePanel>
                    </AdornerDecorator>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="FocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle
                        RadiusX="4"
                        RadiusY="4"
                        Style="{StaticResource RectangleFocusVisual}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="FocusVisualRadius0">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Style="{StaticResource RectangleFocusVisual}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="FocusVisualMargin0">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle
                        Opacity=".6"
                        RadiusX="4"
                        RadiusY="4"
                        SnapsToDevicePixels="true"
                        Stroke="{DynamicResource SecondaryBorderBrush}"
                        StrokeDashArray="1 1"
                        StrokeThickness="2" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="FocusVisualRadius0Margin0">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle
                        Opacity=".6"
                        SnapsToDevicePixels="true"
                        Stroke="{DynamicResource SecondaryBorderBrush}"
                        StrokeDashArray="1 1"
                        StrokeThickness="2" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="InputElementErrorTemplate">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <AdornedElementPlaceholder x:Name="adornedElementPlaceholder" />
            <hc:TransitioningContentControl
                Grid.Row="1"
                ClipToBounds="True"
                TransitionMode="Top2Bottom">
                <TextBlock
                    Margin="2,2,0,0"
                    Foreground="{DynamicResource DangerBrush}"
                    Text="{Binding Path=AdornedElement.(Validation.Errors)[0].ErrorContent, ElementName=adornedElementPlaceholder}" />
            </hc:TransitioningContentControl>
        </Grid>
    </ControlTemplate>
    <Style x:Key="InputElementBaseStyle" TargetType="Control">
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,7,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="8,0,0,5" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Padding" Value="{StaticResource DefaultInputPadding}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource InputElementErrorTemplate}" />
        <Style.Triggers>
            <Trigger Property="Validation.HasError" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style TargetType="{x:Type hc:BulletCheckBox}">
        <Setter Property="Background" Value="Red" />
        <Setter Property="Foreground" Value="#DDE8E1" />
        <Setter Property="CheckedForeground" Value="White" />
        <Setter Property="CheckedBackground" Value="#FF0CC50C" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <!--  控件模板  -->
                <ControlTemplate TargetType="{x:Type hc:BulletCheckBox}">

                    <Border
                        x:Name="PART_Root"
                        Width="{TemplateBinding Width}"
                        Height="{TemplateBinding Height}"
                        Margin="0"
                        Background="{TemplateBinding Background}"
                        CornerRadius="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Height, Converter={StaticResource DoubleHalfwayConverter}}"
                        SnapsToDevicePixels="True">
                        <StackPanel Orientation="Horizontal">
                            <!--  状态球  -->
                            <Border
                                x:Name="PART_StatusBall"
                                Width="{TemplateBinding Height,
                                                        Converter={StaticResource DoubleSubtractConverter},
                                                        ConverterParameter=4.0}"
                                Height="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Width}"
                                Margin="2"
                                Background="{TemplateBinding Foreground}"
                                CornerRadius="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Height, Converter={StaticResource DoubleHalfwayConverter}}"
                                SnapsToDevicePixels="True">
                                <Border.RenderTransform>
                                    <TranslateTransform x:Name="transState" X="0" />
                                </Border.RenderTransform>
                            </Border>
                            <!--  文本框  -->
                            <TextBlock
                                x:Name="PART_TXT"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Foreground="{TemplateBinding Foreground}"
                                Text="{TemplateBinding Text}"
                                TextAlignment="Center">
                                <TextBlock.RenderTransform>
                                    <TranslateTransform x:Name="transTxt" X="0" />
                                </TextBlock.RenderTransform>
                            </TextBlock>
                        </StackPanel>
                    </Border>

                    <!--  触发器：设置选中状态符号  -->
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="PART_TXT" Property="Text" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=CheckedText}" />
                            <Setter TargetName="PART_StatusBall" Property="Background" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=CheckedForeground}" />
                            <Setter TargetName="PART_TXT" Property="Foreground" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=CheckedForeground}" />
                            <Setter TargetName="PART_Root" Property="Background" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=CheckedBackground}" />

                        </Trigger>

                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="PART_Root" Property="Opacity" Value="0.5" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="BaseStyle" TargetType="Control">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="FontSize" Value="{StaticResource TextFontSize}" />
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
    </Style>
    <Style
        x:Key="ButtonBaseBaseStyle"
        TargetType="ButtonBase"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Height" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
    </Style>
    <Style
        x:Key="ButtonBaseStyle"
        TargetType="Button"
        BasedOn="{StaticResource ButtonBaseBaseStyle}">
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <hc:SimplePanel>
                        <Border Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                        <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Orientation="Horizontal">
                                <Path
                                    x:Name="PathMain"
                                    Width="{TemplateBinding hc:IconElement.Width}"
                                    Height="{TemplateBinding hc:IconElement.Height}"
                                    Data="{TemplateBinding hc:IconElement.Geometry}"
                                    Fill="{TemplateBinding Foreground}"
                                    SnapsToDevicePixels="True"
                                    Stretch="Uniform" />
                                <ContentPresenter
                                    x:Name="ContentPresenterMain"
                                    Margin="6,0,0,0"
                                    VerticalAlignment="Center"
                                    RecognizesAccessKey="True"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </StackPanel>
                        </Border>
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="ContentPresenterMain" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
                            <Setter TargetName="PathMain" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ContentPresenterMain" Property="Margin" Value="0" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Opacity" Value=".9" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Opacity" Value=".6" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="ButtonDashedBaseStyle"
        TargetType="Button"
        BasedOn="{StaticResource ButtonBaseStyle}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <hc:DashedBorder
                        Background="Transparent"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderDashArray="3,2"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <StackPanel
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Orientation="Horizontal">
                            <Path
                                x:Name="PathMain"
                                Width="{TemplateBinding hc:IconElement.Width}"
                                Height="{TemplateBinding hc:IconElement.Height}"
                                Data="{TemplateBinding hc:IconElement.Geometry}"
                                Fill="{TemplateBinding Foreground}"
                                SnapsToDevicePixels="True"
                                Stretch="Uniform" />
                            <ContentPresenter
                                x:Name="ContentPresenterMain"
                                Margin="6,0,0,0"
                                VerticalAlignment="Center"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </StackPanel>
                    </hc:DashedBorder>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="ContentPresenterMain" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
                            <Setter TargetName="PathMain" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ContentPresenterMain" Property="Margin" Value="0" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ButtonGroupItemBaseStyle"
        TargetType="Button"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
        <Setter Property="Height" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Padding" Value="10,0" />
        <Setter Property="Margin" Value="-1,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border
                        x:Name="BorderRoot"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <StackPanel
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Orientation="Horizontal">
                            <Path
                                x:Name="PathMain"
                                Width="{TemplateBinding hc:IconElement.Width}"
                                Height="{TemplateBinding hc:IconElement.Height}"
                                Data="{TemplateBinding hc:IconElement.Geometry}"
                                Fill="{TemplateBinding Foreground}"
                                SnapsToDevicePixels="True"
                                Stretch="Uniform" />
                            <ContentPresenter
                                x:Name="contentPresenter"
                                Margin="6,0,0,0"
                                VerticalAlignment="Center"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </StackPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="contentPresenter" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
                            <Setter TargetName="PathMain" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="contentPresenter" Property="Margin" Value="0" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
            <DataTrigger Binding="{Binding Orientation, RelativeSource={RelativeSource AncestorType=hc:ButtonGroup}}" Value="Vertical">
                <Setter Property="Margin" Value="0,-1,0,0" />
            </DataTrigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="TextBlockBaseStyle" TargetType="TextBlock">
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
    </Style>
    <Style
        x:Key="TextBlockBoldBaseStyle"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBaseStyle}">
        <Setter Property="FontWeight" Value="Bold" />
    </Style>
    <Style x:Key="HighlightTextBlockBaseStyle" TargetType="hc:HighlightTextBlock">
        <Setter Property="HighlightBrush" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="HighlightTextBrush" Value="{DynamicResource TextIconBrush}" />
    </Style>
    <Style x:Key="LabelBaseStyle" TargetType="Label">
        <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Height" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Label">
                    <Border
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        SnapsToDevicePixels="true">
                        <ContentPresenter
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="SliderThumb" TargetType="Thumb">
        <hc:AxleCanvas>
            <Border
                Name="BorderDot"
                Canvas.Bottom="0"
                Width="18"
                Height="18"
                Background="White"
                BorderBrush="{DynamicResource PrimaryBrush}"
                BorderThickness="0"
                CornerRadius="9"
                Effect="{StaticResource EffectShadow1}" />
        </hc:AxleCanvas>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Effect" Value="{StaticResource EffectShadow2}" />
            </Trigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonDown">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="2"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonUp">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="0"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="CompareSliderThumbHorizontal" TargetType="Thumb">
        <ControlTemplate.Resources>
            <Storyboard x:Key="Storyboard1">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PathLeft" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)">
                    <EasingDoubleKeyFrame KeyTime="0" Value="-2" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PathRight" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)">
                    <EasingDoubleKeyFrame KeyTime="0" Value="2" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="Storyboard2">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PathLeft" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PathRight" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <hc:SimplePanel>
            <Border Width="1" HorizontalAlignment="Center">
                <Border.Background>
                    <DrawingBrush
                        RenderOptions.CachingHint="Cache"
                        Stretch="None"
                        TileMode="Tile"
                        Viewport="0,0,1,8"
                        ViewportUnits="Absolute">
                        <DrawingBrush.Drawing>
                            <DrawingGroup>
                                <GeometryDrawing Brush="{DynamicResource BorderBrush}">
                                    <GeometryDrawing.Geometry>
                                        <GeometryGroup>
                                            <RectangleGeometry Rect="0,0,1,4" />
                                        </GeometryGroup>
                                    </GeometryDrawing.Geometry>
                                </GeometryDrawing>
                            </DrawingGroup>
                        </DrawingBrush.Drawing>
                    </DrawingBrush>
                </Border.Background>
            </Border>
            <Border
                x:Name="grip"
                Width="30"
                Height="30"
                Background="White"
                BorderBrush="{DynamicResource BorderBrush}"
                BorderThickness="1"
                CornerRadius="15">
                <hc:SimplePanel
                    Width="30"
                    Height="30"
                    Margin="-1,-1,0,0">
                    <Path
                        x:Name="PathLeft"
                        Width="12"
                        Height="12"
                        Margin="6,8"
                        HorizontalAlignment="Left"
                        Data="{StaticResource LeftGeometry}"
                        RenderTransformOrigin="0.5,0.5"
                        Stretch="Uniform"
                        Stroke="{DynamicResource PrimaryBrush}"
                        StrokeThickness="1">
                        <Path.RenderTransform>
                            <TransformGroup>
                                <TranslateTransform />
                            </TransformGroup>
                        </Path.RenderTransform>
                    </Path>
                    <Path
                        x:Name="PathRight"
                        Width="12"
                        Height="12"
                        Margin="6,8"
                        HorizontalAlignment="Right"
                        Data="{StaticResource RightGeometry}"
                        RenderTransformOrigin="0.5,0.5"
                        Stretch="Uniform"
                        Stroke="{DynamicResource PrimaryBrush}"
                        StrokeThickness="1">
                        <Path.RenderTransform>
                            <TransformGroup>
                                <TranslateTransform />
                            </TransformGroup>
                        </Path.RenderTransform>
                    </Path>
                </hc:SimplePanel>
            </Border>
        </hc:SimplePanel>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter TargetName="grip" Property="Background" Value="{DynamicResource PrimaryBrush}" />
                <Setter TargetName="PathLeft" Property="Stroke" Value="White" />
                <Setter TargetName="PathRight" Property="Stroke" Value="White" />
            </Trigger>
            <Trigger Property="IsDragging" Value="true">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource Storyboard1}" />
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource Storyboard2}" />
                </Trigger.ExitActions>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="CompareSliderHorizontal" TargetType="hc:CompareSlider">
        <Border
            x:Name="border"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            SnapsToDevicePixels="True">
            <hc:CompareTrack x:Name="PART_Track">
                <Track.DecreaseRepeatButton>
                    <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}">
                        <ContentPresenter
                            Width="{TemplateBinding ActualWidth}"
                            HorizontalAlignment="Left"
                            ContentSource="TargetContent" />
                    </RepeatButton>
                </Track.DecreaseRepeatButton>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}">
                        <ContentPresenter
                            Width="{TemplateBinding ActualWidth}"
                            HorizontalAlignment="Right"
                            ContentSource="SourceContent" />
                    </RepeatButton>
                </Track.IncreaseRepeatButton>
                <Track.Thumb>
                    <Thumb
                        x:Name="Thumb"
                        Width="30"
                        Margin="-15,0"
                        Focusable="False"
                        OverridesDefaultStyle="True"
                        Template="{StaticResource CompareSliderThumbHorizontal}" />
                </Track.Thumb>
            </hc:CompareTrack>
        </Border>
    </ControlTemplate>
    <ControlTemplate x:Key="CompareSliderThumbVertical" TargetType="Thumb">
        <ControlTemplate.Resources>
            <Storyboard x:Key="Storyboard1">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PathUp" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)">
                    <EasingDoubleKeyFrame KeyTime="0" Value="-2" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PathDown" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)">
                    <EasingDoubleKeyFrame KeyTime="0" Value="2" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="Storyboard2">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PathUp" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PathDown" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <hc:SimplePanel>
            <Border Height="1" VerticalAlignment="Center">
                <Border.Background>
                    <DrawingBrush
                        RenderOptions.CachingHint="Cache"
                        Stretch="None"
                        TileMode="Tile"
                        Viewport="0,0,8,1"
                        ViewportUnits="Absolute">
                        <DrawingBrush.Drawing>
                            <DrawingGroup>
                                <GeometryDrawing Brush="{DynamicResource BorderBrush}">
                                    <GeometryDrawing.Geometry>
                                        <GeometryGroup>
                                            <RectangleGeometry Rect="0,0,4,1" />
                                        </GeometryGroup>
                                    </GeometryDrawing.Geometry>
                                </GeometryDrawing>
                            </DrawingGroup>
                        </DrawingBrush.Drawing>
                    </DrawingBrush>
                </Border.Background>
            </Border>
            <Border
                x:Name="grip"
                Width="30"
                Height="30"
                Background="White"
                BorderBrush="{DynamicResource BorderBrush}"
                BorderThickness="1"
                CornerRadius="15">
                <hc:SimplePanel
                    Width="30"
                    Height="30"
                    Margin="-1,-1,0,0">
                    <Path
                        x:Name="PathUp"
                        Width="12"
                        Height="12"
                        Margin="9,6"
                        VerticalAlignment="Top"
                        Data="{StaticResource UpGeometry}"
                        RenderTransformOrigin="0.5,0.5"
                        Stretch="Uniform"
                        Stroke="{DynamicResource PrimaryBrush}"
                        StrokeThickness="1">
                        <Path.RenderTransform>
                            <TransformGroup>
                                <TranslateTransform />
                            </TransformGroup>
                        </Path.RenderTransform>
                    </Path>
                    <Path
                        x:Name="PathDown"
                        Width="12"
                        Height="12"
                        Margin="9,6"
                        VerticalAlignment="Bottom"
                        Data="{StaticResource DownGeometry}"
                        RenderTransformOrigin="0.5,0.5"
                        Stretch="Uniform"
                        Stroke="{DynamicResource PrimaryBrush}"
                        StrokeThickness="1">
                        <Path.RenderTransform>
                            <TransformGroup>
                                <TranslateTransform />
                            </TransformGroup>
                        </Path.RenderTransform>
                    </Path>
                </hc:SimplePanel>
            </Border>
        </hc:SimplePanel>
        <ControlTemplate.Triggers>
            <Trigger SourceName="grip" Property="IsMouseOver" Value="true">
                <Setter TargetName="grip" Property="Background" Value="{DynamicResource PrimaryBrush}" />
                <Setter TargetName="PathUp" Property="Stroke" Value="White" />
                <Setter TargetName="PathDown" Property="Stroke" Value="White" />
            </Trigger>
            <Trigger Property="IsDragging" Value="true">
                <Setter TargetName="grip" Property="Background" Value="{DynamicResource PrimaryBrush}" />
                <Setter TargetName="PathUp" Property="Stroke" Value="White" />
                <Setter TargetName="PathDown" Property="Stroke" Value="White" />
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource Storyboard1}" />
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource Storyboard2}" />
                </Trigger.ExitActions>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="CompareSliderVertical" TargetType="hc:CompareSlider">
        <Border
            x:Name="border"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            SnapsToDevicePixels="True">
            <hc:CompareTrack x:Name="PART_Track">
                <Track.DecreaseRepeatButton>
                    <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}">
                        <ContentPresenter
                            Height="{TemplateBinding ActualHeight}"
                            VerticalAlignment="Bottom"
                            ContentSource="TargetContent" />
                    </RepeatButton>
                </Track.DecreaseRepeatButton>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}">
                        <ContentPresenter
                            Height="{TemplateBinding ActualHeight}"
                            VerticalAlignment="Top"
                            ContentSource="SourceContent" />
                    </RepeatButton>
                </Track.IncreaseRepeatButton>
                <Track.Thumb>
                    <Thumb
                        x:Name="Thumb"
                        Height="30"
                        Margin="0,-15"
                        Focusable="False"
                        OverridesDefaultStyle="True"
                        Template="{StaticResource CompareSliderThumbVertical}" />
                </Track.Thumb>
            </hc:CompareTrack>
        </Border>
    </ControlTemplate>
    <Style x:Key="CompareSliderBaseStyle" TargetType="hc:CompareSlider">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="MinWidth" Value="30" />
        <Setter Property="MinHeight" Value="30" />
        <Setter Property="Template" Value="{StaticResource CompareSliderHorizontal}" />
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Vertical">
                <Setter Property="Template" Value="{StaticResource CompareSliderVertical}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="PreviewSliderThumb" TargetType="Thumb">
        <Border
            Name="BorderDot"
            Width="18"
            Height="18"
            Background="White"
            BorderBrush="{DynamicResource PrimaryBrush}"
            BorderThickness="0"
            CornerRadius="9"
            Effect="{StaticResource EffectShadow1}" />
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Effect" Value="{StaticResource EffectShadow2}" />
            </Trigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonDown">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="2"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonUp">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="0"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="PreviewSliderHorizontal" TargetType="hc:PreviewSlider">
        <hc:SimplePanel>
            <Border
                x:Name="TrackBackground"
                Height="2"
                Margin="9,0"
                VerticalAlignment="center"
                Background="{TemplateBinding Background}" />
            <Track
                x:Name="PART_Track"
                Margin="9,0"
                VerticalAlignment="center">
                <Track.DecreaseRepeatButton>
                    <RepeatButton
                        Background="{DynamicResource PrimaryBrush}"
                        Command="{x:Static Slider.DecreaseLarge}"
                        Style="{StaticResource PreviewSliderRepeatButtonHorizontalStyle}" />
                </Track.DecreaseRepeatButton>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource PreviewSliderRepeatButtonHorizontalStyle}" />
                </Track.IncreaseRepeatButton>
                <Track.Thumb>
                    <Thumb
                        x:Name="PART_Thumb"
                        Width="18"
                        Height="18"
                        Margin="-9,0"
                        VerticalAlignment="Center"
                        Focusable="False"
                        OverridesDefaultStyle="True"
                        Template="{StaticResource PreviewSliderThumb}" />
                </Track.Thumb>
            </Track>
        </hc:SimplePanel>
    </ControlTemplate>
    <ControlTemplate x:Key="PreviewSliderVertical" TargetType="hc:PreviewSlider">
        <hc:SimplePanel>
            <Border
                x:Name="TrackBackground"
                Width="2"
                Margin="0,9"
                HorizontalAlignment="center"
                Background="{TemplateBinding Background}" />
            <Track
                x:Name="PART_Track"
                Margin="0,9"
                HorizontalAlignment="center">
                <Track.DecreaseRepeatButton>
                    <RepeatButton
                        Background="{DynamicResource PrimaryBrush}"
                        Command="{x:Static Slider.DecreaseLarge}"
                        Style="{StaticResource PreviewSliderRepeatButtonVerticalStyle}" />
                </Track.DecreaseRepeatButton>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource PreviewSliderRepeatButtonVerticalStyle}" />
                </Track.IncreaseRepeatButton>
                <Track.Thumb>
                    <Thumb
                        x:Name="PART_Thumb"
                        Width="18"
                        Height="18"
                        Margin="0,-9"
                        HorizontalAlignment="Center"
                        Focusable="False"
                        OverridesDefaultStyle="True"
                        Template="{StaticResource PreviewSliderThumb}" />
                </Track.Thumb>
            </Track>
        </hc:SimplePanel>
    </ControlTemplate>
    <Style x:Key="PreviewSliderBaseStyle" TargetType="hc:PreviewSlider">
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
        <Setter Property="IsMoveToPointEnabled" Value="True" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Template" Value="{StaticResource PreviewSliderHorizontal}" />
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Vertical">
                <Setter Property="Template" Value="{StaticResource PreviewSliderVertical}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value=".4" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="RangeSliderThumb" TargetType="hc:RangeThumb">
        <Border
            Name="BorderDot"
            Width="18"
            Height="18"
            Background="White"
            BorderBrush="{DynamicResource PrimaryBrush}"
            BorderThickness="0"
            CornerRadius="9"
            Effect="{StaticResource EffectShadow1}" />
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Effect" Value="{StaticResource EffectShadow2}" />
            </Trigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonDown">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="2"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonUp">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="0"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="ToggleButtonBaseStyle"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ButtonBaseBaseStyle}">
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <hc:SimplePanel>
                        <Border Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                        <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Orientation="Horizontal">
                                <Path
                                    x:Name="PathMain"
                                    Width="{TemplateBinding hc:IconElement.Width}"
                                    Height="{TemplateBinding hc:IconElement.Height}"
                                    Data="{TemplateBinding hc:IconElement.Geometry}"
                                    Fill="{TemplateBinding Foreground}"
                                    SnapsToDevicePixels="True"
                                    Stretch="Uniform" />
                                <ContentPresenter
                                    x:Name="ContentPresenterMain"
                                    Margin="6,0,0,0"
                                    VerticalAlignment="Center"
                                    RecognizesAccessKey="True"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </StackPanel>
                        </Border>
                        <Border
                            x:Name="BorderChecked"
                            Margin="-1"
                            BorderBrush="{DynamicResource DarkMaskBrush}"
                            BorderThickness="4"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Visibility="Collapsed" />
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="BorderChecked" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="ContentPresenterMain" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
                            <Setter TargetName="PathMain" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ContentPresenterMain" Property="Margin" Value="0" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Opacity" Value=".9" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Opacity" Value=".6" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="ToggleButtonIconBaseStyle"
        TargetType="ToggleButton"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
        <Setter Property="Width" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Height" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Padding" Value="8" />
        <Setter Property="hc:IconSwitchElement.Geometry" Value="{x:Null}" />
        <Setter Property="hc:IconSwitchElement.GeometrySelected" Value="{x:Null}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <hc:SimplePanel>
                        <Border Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                        <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                            <ContentControl
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                                <Path
                                    x:Name="PathIcon"
                                    Width="{TemplateBinding hc:IconElement.Width}"
                                    Height="{TemplateBinding hc:IconElement.Height}"
                                    Data="{TemplateBinding hc:IconSwitchElement.Geometry}"
                                    Fill="{TemplateBinding Foreground}"
                                    SnapsToDevicePixels="True"
                                    Stretch="Uniform" />
                            </ContentControl>
                        </Border>
                        <Border
                            x:Name="BorderChecked"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="4"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Visibility="Collapsed" />
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="PathIcon" Property="Data" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(hc:IconSwitchElement.GeometrySelected)}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Opacity" Value=".9" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Opacity" Value=".6" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="ToggleButtonSwitchBaseStyle"
        TargetType="ToggleButton"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="FocusVisualStyle">
            <Setter.Value>
                <Style>
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle Style="{StaticResource RectangleFocusVisualCircular}" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="hc:VisualElement.HighlightBrush" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="hc:VisualElement.HighlightForeground" Value="{DynamicResource SecondaryBorderBrush}" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="6,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="StoryboardChecked">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="thumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="20">
                                    <EasingDoubleKeyFrame.EasingFunction>
                                        <CubicEase EasingMode="EaseInOut" />
                                    </EasingDoubleKeyFrame.EasingFunction>
                                </EasingDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimation
                                Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)"
                                From="28"
                                To="96"
                                Duration="0:0:0.2">
                                <DoubleAnimation.EasingFunction>
                                    <CubicEase EasingMode="EaseInOut" />
                                </DoubleAnimation.EasingFunction>
                            </DoubleAnimation>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="lightBorder" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="innerBorder" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardUnChecked">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="thumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0">
                                    <EasingDoubleKeyFrame.EasingFunction>
                                        <CubicEase EasingMode="EaseInOut" />
                                    </EasingDoubleKeyFrame.EasingFunction>
                                </EasingDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="lightBorder" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="innerBorder" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid
                        x:Name="templateRoot"
                        Background="Transparent"
                        SnapsToDevicePixels="True">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <hc:SimplePanel Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
                            <Border
                                Name="innerBorder"
                                Width="{TemplateBinding Width}"
                                Height="{TemplateBinding Height}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{Binding RelativeSource={RelativeSource Mode=Self}, Path=ActualHeight, Converter={StaticResource DoubleHalfwayConverter}}">
                                <hc:ToggleBlock
                                    Margin="0,0,12,0"
                                    HorizontalAlignment="Right"
                                    IsChecked="{Binding Path=(hc:ToggleButtonAttach.ShowLabel), RelativeSource={RelativeSource TemplatedParent}}">
                                    <hc:ToggleBlock.CheckedContent>
                                        <Ellipse
                                            Width="16"
                                            Height="16"
                                            Stroke="{Binding Path=(hc:VisualElement.HighlightForeground), RelativeSource={RelativeSource TemplatedParent}}"
                                            StrokeThickness="2" />
                                    </hc:ToggleBlock.CheckedContent>
                                </hc:ToggleBlock>
                            </Border>
                            <Border
                                x:Name="lightBorder"
                                Width="{TemplateBinding Width}"
                                Height="{TemplateBinding Height}"
                                Background="{Binding Path=(hc:VisualElement.HighlightBrush), RelativeSource={RelativeSource TemplatedParent}}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{Binding RelativeSource={RelativeSource Mode=Self}, Path=ActualHeight, Converter={StaticResource DoubleHalfwayConverter}}"
                                Opacity="0">
                                <hc:ToggleBlock
                                    Margin="18,0,0,0"
                                    HorizontalAlignment="Left"
                                    IsChecked="{Binding Path=(hc:ToggleButtonAttach.ShowLabel), RelativeSource={RelativeSource TemplatedParent}}">
                                    <hc:ToggleBlock.CheckedContent>
                                        <Rectangle
                                            Width="3"
                                            Height="16"
                                            Fill="{DynamicResource TextIconBrush}"
                                            RadiusX="1.5"
                                            RadiusY="1.5" />
                                    </hc:ToggleBlock.CheckedContent>
                                </hc:ToggleBlock>
                            </Border>
                            <Border
                                Name="thumb"
                                Width="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Height}"
                                Height="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=hc:SimplePanel}, Path=ActualHeight, Converter={StaticResource DoubleSubtractConverter}, ConverterParameter=4.0}"
                                Margin="2"
                                HorizontalAlignment="Left"
                                Background="White"
                                CornerRadius="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Height, Converter={StaticResource DoubleHalfwayConverter}}"
                                Effect="{StaticResource EffectShadow2}"
                                RenderTransformOrigin="0.5,0.5">
                                <Border.RenderTransform>
                                    <TransformGroup>
                                        <TranslateTransform />
                                    </TransformGroup>
                                </Border.RenderTransform>
                            </Border>
                        </hc:SimplePanel>
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Grid.Column="1"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Focusable="False"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                            Visibility="Collapsed" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasContent" Value="true">
                            <Setter TargetName="contentPresenter" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="true">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardChecked}" />
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardUnChecked}" />
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ToggleButtonGroupItemBaseStyle"
        TargetType="ToggleButton"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
        <Setter Property="Height" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Padding" Value="10,0" />
        <Setter Property="Margin" Value="-1,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Border
                        x:Name="BorderRoot"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <StackPanel
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Orientation="Horizontal">
                            <Path
                                x:Name="PathMain"
                                Width="{TemplateBinding hc:IconElement.Width}"
                                Height="{TemplateBinding hc:IconElement.Height}"
                                Data="{TemplateBinding hc:IconElement.Geometry}"
                                Fill="{TemplateBinding Foreground}"
                                SnapsToDevicePixels="True"
                                Stretch="Uniform" />
                            <ContentPresenter
                                x:Name="contentPresenter"
                                Margin="6,0,0,0"
                                VerticalAlignment="Center"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </StackPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="BorderRoot" Property="BorderBrush" Value="{Binding Path=(hc:VisualElement.HighlightBorderBrush), RelativeSource={RelativeSource TemplatedParent}}" />
                            <Setter TargetName="BorderRoot" Property="Background" Value="{Binding Path=(hc:VisualElement.HighlightBackground), RelativeSource={RelativeSource TemplatedParent}}" />
                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{Binding Path=(hc:VisualElement.HighlightForeground), RelativeSource={RelativeSource TemplatedParent}}" />
                        </Trigger>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="contentPresenter" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
                            <Setter TargetName="PathMain" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="contentPresenter" Property="Margin" Value="0" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="Panel.ZIndex" Value="{x:Static system:Int32.MaxValue}" />
            </Trigger>
            <DataTrigger Binding="{Binding Orientation, RelativeSource={RelativeSource AncestorType=hc:ButtonGroup}}" Value="Vertical">
                <Setter Property="Margin" Value="0,-1,0,0" />
            </DataTrigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ScrollBarBaseThumbVertical" TargetType="Thumb">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="StoryboardMouseEnter">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="Width">
                                <EasingDoubleKeyFrame KeyTime="0:0:.1" Value="8" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Rectangle.RadiusX)">
                                <EasingDoubleKeyFrame KeyTime="0:0:.1" Value="4" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Rectangle.RadiusY)">
                                <EasingDoubleKeyFrame KeyTime="0:0:.1" Value="4" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)">
                                <EasingDoubleKeyFrame KeyTime="0:0:.1" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardMouseLeave">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="Width">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="2" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Rectangle.RadiusX)">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Rectangle.RadiusY)">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="-2" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Border Width="{TemplateBinding Width}" Background="Transparent">
                        <Rectangle
                            x:Name="rectangle"
                            Width="2"
                            Height="{TemplateBinding Height}"
                            HorizontalAlignment="Right"
                            Fill="{TemplateBinding Background}"
                            RadiusX="1"
                            RadiusY="1"
                            SnapsToDevicePixels="True">
                            <Rectangle.RenderTransform>
                                <TransformGroup>
                                    <TranslateTransform X="-2" />
                                </TransformGroup>
                            </Rectangle.RenderTransform>
                        </Rectangle>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="rectangle" Property="Fill" Value="{DynamicResource SecondaryTextBrush}" />
                        </Trigger>
                        <Trigger Property="IsDragging" Value="true">
                            <Setter TargetName="rectangle" Property="Fill" Value="{DynamicResource PrimaryTextBrush}" />
                        </Trigger>
                        <EventTrigger RoutedEvent="MouseEnter">
                            <BeginStoryboard Storyboard="{StaticResource StoryboardMouseEnter}" />
                        </EventTrigger>
                        <EventTrigger RoutedEvent="MouseLeave">
                            <BeginStoryboard Storyboard="{StaticResource StoryboardMouseLeave}" />
                        </EventTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ScrollBarBaseThumbHorizontal" TargetType="Thumb">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="StoryboardMouseEnter">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="Height">
                                <EasingDoubleKeyFrame KeyTime="0:0:.1" Value="8" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Rectangle.RadiusX)">
                                <EasingDoubleKeyFrame KeyTime="0:0:.1" Value="4" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Rectangle.RadiusY)">
                                <EasingDoubleKeyFrame KeyTime="0:0:.1" Value="4" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)">
                                <EasingDoubleKeyFrame KeyTime="0:0:.1" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardMouseLeave">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="Height">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="2" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Rectangle.RadiusX)">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Rectangle.RadiusY)">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="-2" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Border Height="{TemplateBinding Height}" Background="Transparent">
                        <Rectangle
                            x:Name="rectangle"
                            Width="{TemplateBinding Width}"
                            Height="2"
                            VerticalAlignment="Bottom"
                            Fill="{TemplateBinding Background}"
                            RadiusX="1"
                            RadiusY="1"
                            SnapsToDevicePixels="True">
                            <Rectangle.RenderTransform>
                                <TransformGroup>
                                    <TranslateTransform Y="-2" />
                                </TransformGroup>
                            </Rectangle.RenderTransform>
                        </Rectangle>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="rectangle" Property="Fill" Value="{DynamicResource SecondaryTextBrush}" />
                        </Trigger>
                        <Trigger Property="IsDragging" Value="true">
                            <Setter TargetName="rectangle" Property="Fill" Value="{DynamicResource PrimaryTextBrush}" />
                        </Trigger>
                        <EventTrigger RoutedEvent="MouseEnter">
                            <BeginStoryboard Storyboard="{StaticResource StoryboardMouseEnter}" />
                        </EventTrigger>
                        <EventTrigger RoutedEvent="MouseLeave">
                            <BeginStoryboard Storyboard="{StaticResource StoryboardMouseLeave}" />
                        </EventTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ScrollBarBaseStyle" TargetType="ScrollBar">
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="false" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Width" Value="8" />
        <Setter Property="MinWidth" Value="8" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollBar">
                    <hc:SimplePanel x:Name="Bg" SnapsToDevicePixels="true">
                        <Border Background="{TemplateBinding Background}" />
                        <Track
                            x:Name="PART_Track"
                            IsDirectionReversed="true"
                            IsEnabled="{TemplateBinding IsMouseOver}">
                            <Track.DecreaseRepeatButton>
                                <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource ScrollBarBaseRepeatButton}" />
                            </Track.DecreaseRepeatButton>
                            <Track.IncreaseRepeatButton>
                                <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource ScrollBarBaseRepeatButton}" />
                            </Track.IncreaseRepeatButton>
                            <Track.Thumb>
                                <Thumb Background="{TemplateBinding Foreground}" Style="{StaticResource ScrollBarBaseThumbVertical}" />
                            </Track.Thumb>
                        </Track>
                    </hc:SimplePanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="Width" Value="Auto" />
                <Setter Property="MinWidth" Value="0" />
                <Setter Property="Height" Value="8" />
                <Setter Property="MinHeight" Value="8" />
                <Setter Property="BorderThickness" Value="0,1" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ScrollBar">
                            <hc:SimplePanel x:Name="Bg" SnapsToDevicePixels="true">
                                <Border Background="{TemplateBinding Background}" />
                                <Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}">
                                    <Track.DecreaseRepeatButton>
                                        <RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource ScrollBarBaseRepeatButton}" />
                                    </Track.DecreaseRepeatButton>
                                    <Track.IncreaseRepeatButton>
                                        <RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource ScrollBarBaseRepeatButton}" />
                                    </Track.IncreaseRepeatButton>
                                    <Track.Thumb>
                                        <Thumb Background="{TemplateBinding Foreground}" Style="{StaticResource ScrollBarBaseThumbHorizontal}" />
                                    </Track.Thumb>
                                </Track>
                            </hc:SimplePanel>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="ScrollViewerNativeBaseControlTemplate" TargetType="ScrollViewer">
        <ControlTemplate.Resources>
            <Storyboard x:Key="StoryboardMouseOver">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.1" Value=".8" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.1" Value=".8" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="StoryboardCommon">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.2" Value=".3" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.2" Value=".3" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <Grid x:Name="Grid" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <ScrollContentPresenter
                x:Name="PART_ScrollContentPresenter"
                Grid.Row="0"
                Grid.RowSpan="2"
                Grid.Column="0"
                Grid.ColumnSpan="2"
                Margin="{TemplateBinding Padding}"
                CanContentScroll="{TemplateBinding CanContentScroll}"
                CanHorizontallyScroll="False"
                CanVerticallyScroll="False"
                Content="{TemplateBinding Content}"
                ContentTemplate="{TemplateBinding ContentTemplate}" />
            <ScrollBar
                x:Name="PART_VerticalScrollBar"
                Grid.Row="0"
                Grid.Column="1"
                AutomationProperties.AutomationId="VerticalScrollBar"
                Cursor="Arrow"
                Maximum="{TemplateBinding ScrollableHeight}"
                Minimum="0"
                Opacity=".3"
                Style="{StaticResource ScrollBarBaseStyle}"
                ViewportSize="{TemplateBinding ViewportHeight}"
                Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
            <ScrollBar
                x:Name="PART_HorizontalScrollBar"
                Grid.Row="1"
                Grid.Column="0"
                AutomationProperties.AutomationId="HorizontalScrollBar"
                Cursor="Arrow"
                Maximum="{TemplateBinding ScrollableWidth}"
                Minimum="0"
                Opacity=".3"
                Orientation="Horizontal"
                Style="{StaticResource ScrollBarBaseStyle}"
                ViewportSize="{TemplateBinding ViewportWidth}"
                Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource StoryboardMouseOver}" />
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource StoryboardCommon}" />
                </Trigger.ExitActions>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ScrollViewerNativeAutoHideBaseControlTemplate" TargetType="ScrollViewer">
        <ControlTemplate.Resources>
            <Storyboard x:Key="StoryboardMouseOver">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.1" Value=".8" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.1" Value=".8" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="StoryboardCommon">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="0" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <Grid x:Name="Grid" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <ScrollContentPresenter
                x:Name="PART_ScrollContentPresenter"
                Grid.Row="0"
                Grid.RowSpan="2"
                Grid.Column="0"
                Grid.ColumnSpan="2"
                Margin="{TemplateBinding Padding}"
                CanContentScroll="{TemplateBinding CanContentScroll}"
                CanHorizontallyScroll="False"
                CanVerticallyScroll="False"
                Content="{TemplateBinding Content}"
                ContentTemplate="{TemplateBinding ContentTemplate}" />
            <ScrollBar
                x:Name="PART_VerticalScrollBar"
                Grid.Row="0"
                Grid.Column="1"
                AutomationProperties.AutomationId="VerticalScrollBar"
                Cursor="Arrow"
                Maximum="{TemplateBinding ScrollableHeight}"
                Minimum="0"
                Opacity="0"
                Style="{StaticResource ScrollBarBaseStyle}"
                ViewportSize="{TemplateBinding ViewportHeight}"
                Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
            <ScrollBar
                x:Name="PART_HorizontalScrollBar"
                Grid.Row="1"
                Grid.Column="0"
                AutomationProperties.AutomationId="HorizontalScrollBar"
                Cursor="Arrow"
                Maximum="{TemplateBinding ScrollableWidth}"
                Minimum="0"
                Opacity="0"
                Orientation="Horizontal"
                Style="{StaticResource ScrollBarBaseStyle}"
                ViewportSize="{TemplateBinding ViewportWidth}"
                Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource StoryboardMouseOver}" />
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource StoryboardCommon}" />
                </Trigger.ExitActions>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="ScrollViewerNativeBaseStyle" TargetType="ScrollViewer">
        <Setter Property="VerticalScrollBarVisibility" Value="{Binding Path=(hc:ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Template" Value="{StaticResource ScrollViewerNativeAutoHideBaseControlTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:ScrollViewerAttach.AutoHide" Value="False">
                <Setter Property="Template" Value="{StaticResource ScrollViewerNativeBaseControlTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="ScrollViewerBaseControlTemplate" TargetType="hc:ScrollViewer">
        <ControlTemplate.Resources>
            <Storyboard x:Key="StoryboardMouseOver">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.1" Value=".8" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.1" Value=".8" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="StoryboardCommon">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.2" Value=".3" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.2" Value=".3" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <Grid x:Name="Grid" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <ScrollContentPresenter
                x:Name="PART_ScrollContentPresenter"
                Grid.Row="0"
                Grid.RowSpan="2"
                Grid.Column="0"
                Grid.ColumnSpan="2"
                Margin="{TemplateBinding Padding}"
                CanContentScroll="{TemplateBinding CanContentScroll}"
                CanHorizontallyScroll="False"
                CanVerticallyScroll="False"
                Content="{TemplateBinding Content}"
                ContentTemplate="{TemplateBinding ContentTemplate}" />
            <ScrollBar
                x:Name="PART_VerticalScrollBar"
                Grid.Row="0"
                Grid.Column="1"
                AutomationProperties.AutomationId="VerticalScrollBar"
                Cursor="Arrow"
                Maximum="{TemplateBinding ScrollableHeight}"
                Minimum="0"
                Style="{StaticResource ScrollBarBaseStyle}"
                ViewportSize="{TemplateBinding ViewportHeight}"
                Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
            <ScrollBar
                x:Name="PART_HorizontalScrollBar"
                Grid.Row="1"
                Grid.Column="0"
                AutomationProperties.AutomationId="HorizontalScrollBar"
                Cursor="Arrow"
                Maximum="{TemplateBinding ScrollableWidth}"
                Minimum="0"
                Orientation="Horizontal"
                Style="{StaticResource ScrollBarBaseStyle}"
                ViewportSize="{TemplateBinding ViewportWidth}"
                Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource StoryboardMouseOver}" />
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource StoryboardCommon}" />
                </Trigger.ExitActions>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ScrollViewerAutoHideBaseControlTemplate" TargetType="hc:ScrollViewer">
        <ControlTemplate.Resources>
            <Storyboard x:Key="StoryboardMouseOver">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.1" Value=".8" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.1" Value=".8" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="StoryboardCommon">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="0" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <Grid x:Name="Grid" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <ScrollContentPresenter
                x:Name="PART_ScrollContentPresenter"
                Grid.Row="0"
                Grid.RowSpan="2"
                Grid.Column="0"
                Grid.ColumnSpan="2"
                Margin="{TemplateBinding Padding}"
                CanContentScroll="{TemplateBinding CanContentScroll}"
                CanHorizontallyScroll="False"
                CanVerticallyScroll="False"
                Content="{TemplateBinding Content}"
                ContentTemplate="{TemplateBinding ContentTemplate}" />
            <ScrollBar
                x:Name="PART_VerticalScrollBar"
                Grid.Row="0"
                Grid.Column="1"
                AutomationProperties.AutomationId="VerticalScrollBar"
                Cursor="Arrow"
                Maximum="{TemplateBinding ScrollableHeight}"
                Minimum="0"
                Opacity="0"
                Style="{StaticResource ScrollBarBaseStyle}"
                ViewportSize="{TemplateBinding ViewportHeight}"
                Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
            <ScrollBar
                x:Name="PART_HorizontalScrollBar"
                Grid.Row="1"
                Grid.Column="0"
                AutomationProperties.AutomationId="HorizontalScrollBar"
                Cursor="Arrow"
                Maximum="{TemplateBinding ScrollableWidth}"
                Minimum="0"
                Opacity="0"
                Orientation="Horizontal"
                Style="{StaticResource ScrollBarBaseStyle}"
                ViewportSize="{TemplateBinding ViewportWidth}"
                Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource StoryboardMouseOver}" />
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource StoryboardCommon}" />
                </Trigger.ExitActions>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="ScrollViewerBaseStyle" TargetType="hc:ScrollViewer">
        <Setter Property="VerticalScrollBarVisibility" Value="{Binding Path=(hc:ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Template" Value="{StaticResource ScrollViewerAutoHideBaseControlTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:ScrollViewerAttach.AutoHide" Value="False">
                <Setter Property="Template" Value="{StaticResource ScrollViewerBaseControlTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="RepeatButtonBaseStyle"
        TargetType="RepeatButton"
        BasedOn="{StaticResource ButtonBaseBaseStyle}">
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <hc:SimplePanel>
                        <Border Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                        <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Orientation="Horizontal">
                                <Path
                                    x:Name="PathMain"
                                    Width="{TemplateBinding hc:IconElement.Width}"
                                    Height="{TemplateBinding hc:IconElement.Height}"
                                    Data="{TemplateBinding hc:IconElement.Geometry}"
                                    Fill="{TemplateBinding Foreground}"
                                    SnapsToDevicePixels="True"
                                    Stretch="Uniform" />
                                <ContentPresenter
                                    x:Name="ContentPresenterMain"
                                    Margin="6,0,0,0"
                                    VerticalAlignment="Center"
                                    RecognizesAccessKey="True"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </StackPanel>
                        </Border>
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="ContentPresenterMain" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
                            <Setter TargetName="PathMain" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ContentPresenterMain" Property="Margin" Value="0" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Opacity" Value=".9" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Opacity" Value=".6" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="RepeatButtonDashedBaseStyle"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonBaseStyle}">
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <hc:DashedBorder
                        Background="Transparent"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderDashArray="3,2"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <StackPanel
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Orientation="Horizontal">
                            <Path
                                x:Name="PathMain"
                                Width="{TemplateBinding hc:IconElement.Width}"
                                Height="{TemplateBinding hc:IconElement.Height}"
                                Data="{TemplateBinding hc:IconElement.Geometry}"
                                Fill="{TemplateBinding Foreground}"
                                SnapsToDevicePixels="True"
                                Stretch="Uniform" />
                            <ContentPresenter
                                x:Name="ContentPresenterMain"
                                Margin="6,0,0,0"
                                VerticalAlignment="Center"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </StackPanel>
                    </hc:DashedBorder>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="ContentPresenterMain" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
                            <Setter TargetName="PathMain" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ContentPresenterMain" Property="Margin" Value="0" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="GroupBoxBaseStyle" TargetType="GroupBox">
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="hc:TitleElement.Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="hc:TitleElement.TitlePlacement" Value="Top" />
        <Setter Property="hc:TitleElement.Padding" Value="4 0" />
        <Setter Property="hc:TitleElement.MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="hc:TitleElement.MinWidth" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="4" />
        <Setter Property="Template" Value="{StaticResource GroupBoxBaseTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:TitleElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource GroupBoxBaseLeftTemplate}" />
                <Setter Property="hc:TitleElement.Padding" Value="0 4" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="GroupBoxOriginalTopTemplate" TargetType="GroupBox">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <StackPanel Margin="8,6" Orientation="Horizontal">
                <ContentPresenter
                    Margin="1,0,0,0"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentSource="Header"
                    RecognizesAccessKey="True"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    TextElement.Foreground="{TemplateBinding Foreground}" />
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
            </StackPanel>
            <Border
                Grid.Row="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                <ContentPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
            </Border>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="GroupBoxOriginalLeftTemplate" TargetType="GroupBox">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <StackPanel
                Margin="0,8,6,8"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                Orientation="Horizontal">
                <ContentPresenter
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentSource="Header"
                    RecognizesAccessKey="True"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    TextElement.Foreground="{TemplateBinding Foreground}" />
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
            </StackPanel>
            <Border
                Grid.Column="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                <ContentPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
            </Border>
        </Grid>
    </ControlTemplate>
    <Style
        x:Key="GroupBoxOriginalBaseStyle"
        TargetType="GroupBox"
        BasedOn="{StaticResource GroupBoxBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Template" Value="{StaticResource GroupBoxOriginalTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:TitleElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource GroupBoxOriginalLeftTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="GroupBoxTabBaseStyle"
        TargetType="GroupBox"
        BasedOn="{StaticResource GroupBoxBaseStyle}">
        <Setter Property="Template" Value="{StaticResource GroupBoxTabTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:TitleElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource GroupBoxTabLeftTemplate}" />
                <Setter Property="hc:TitleElement.Padding" Value="0 4" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ButtonGroupBaseStyle" TargetType="hc:ButtonGroup">
        <Setter Property="ItemContainerStyleSelector" Value="{StaticResource ButtonGroupItemStyleSelector}" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="Layout" Value="Uniform" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="ItemsPanel" Value="{StaticResource ButtonGroupHorizontalUniformItemsPanelTemplate}" />
        <Setter Property="hc:VisualElement.HighlightBorderBrush" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="hc:VisualElement.HighlightBackground" Value="{DynamicResource RegionBrush}" />
        <Setter Property="hc:VisualElement.HighlightForeground" Value="{DynamicResource PrimaryBrush}" />
        <Style.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="Layout" Value="Uniform" />
                    <Condition Property="Orientation" Value="Vertical" />
                </MultiTrigger.Conditions>
                <Setter Property="ItemsPanel" Value="{StaticResource ButtonGroupVerticalUniformItemsPanelTemplate}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="Layout" Value="Stack" />
                    <Condition Property="Orientation" Value="Horizontal" />
                </MultiTrigger.Conditions>
                <Setter Property="ItemsPanel" Value="{StaticResource ButtonGroupHorizontalStackItemsPanelTemplate}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="Layout" Value="Stack" />
                    <Condition Property="Orientation" Value="Vertical" />
                </MultiTrigger.Conditions>
                <Setter Property="ItemsPanel" Value="{StaticResource ButtonGroupVerticalStackItemsPanelTemplate}" />
            </MultiTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ElementGroupBaseStyle" TargetType="hc:ElementGroup">
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="Layout" Value="Uniform" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="ItemsPanel" Value="{StaticResource UniformHorizontalItemsPanelTemplate}" />
        <Setter Property="hc:VisualElement.HighlightBorderBrush" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="hc:VisualElement.HighlightBackground" Value="{DynamicResource RegionBrush}" />
        <Setter Property="hc:VisualElement.HighlightForeground" Value="{DynamicResource PrimaryBrush}" />
        <Style.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="Layout" Value="Uniform" />
                    <Condition Property="Orientation" Value="Vertical" />
                </MultiTrigger.Conditions>
                <Setter Property="ItemsPanel" Value="{StaticResource UniformVerticalItemsPanelTemplate}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="Layout" Value="Stack" />
                    <Condition Property="Orientation" Value="Horizontal" />
                </MultiTrigger.Conditions>
                <Setter Property="ItemsPanel" Value="{StaticResource StackHorizontalItemsPanelTemplate}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="Layout" Value="Stack" />
                    <Condition Property="Orientation" Value="Vertical" />
                </MultiTrigger.Conditions>
                <Setter Property="ItemsPanel" Value="{StaticResource StackVerticalItemsPanelTemplate}" />
            </MultiTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ProgressBarBaseStyle" TargetType="ProgressBar">
        <Setter Property="hc:VisualElement.Text">
            <Setter.Value>
                <MultiBinding Converter="{StaticResource Number2PercentageConverter}" StringFormat="{}{0:F0} %">
                    <Binding Path="Value" RelativeSource="{RelativeSource Self}" />
                    <Binding Path="Maximum" RelativeSource="{RelativeSource Self}" />
                </MultiBinding>
            </Setter.Value>
        </Setter>
        <Setter Property="Height" Value="20" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ProgressBar">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="IsIndeterminate" 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>
                    </ControlTemplate.Resources>
                    <Border
                        x:Name="TemplateRoot"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <hc:SimplePanel>
                            <Rectangle x:Name="PART_Track" />
                            <TextBlock
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Foreground="{TemplateBinding Foreground}"
                                Text="{Binding Path=(hc:VisualElement.Text), RelativeSource={RelativeSource TemplatedParent}}"
                                Visibility="{Binding Visibility, ElementName=PART_GlowRect}" />
                            <Border
                                x:Name="PART_Indicator"
                                HorizontalAlignment="Left"
                                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                                Style="{StaticResource BorderClip}">
                                <hc:SimplePanel>
                                    <Border x:Name="Indicator" Background="{TemplateBinding Foreground}">
                                        <Border Width="{Binding ActualWidth, ElementName=TemplateRoot}">
                                            <TextBlock
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                Foreground="{DynamicResource TextIconBrush}"
                                                Text="{Binding Path=(hc:VisualElement.Text), RelativeSource={RelativeSource TemplatedParent}}" />
                                        </Border>
                                    </Border>
                                    <Rectangle
                                        x:Name="PART_GlowRect"
                                        Width="100"
                                        Margin="-100,0,0,0"
                                        HorizontalAlignment="Left"
                                        Fill="{StaticResource ProgressBarIndicatorAnimatedFill}" />
                                    <Rectangle
                                        x:Name="Animation"
                                        Fill="{TemplateBinding Foreground}"
                                        RenderTransformOrigin="0.5,0.5"
                                        Visibility="Collapsed">
                                        <Rectangle.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform />
                                            </TransformGroup>
                                        </Rectangle.RenderTransform>
                                    </Rectangle>
                                </hc:SimplePanel>
                            </Border>
                        </hc:SimplePanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Orientation" Value="Vertical">
                            <Setter Property="Height" Value="{x:Static system:Double.NaN}" />
                            <Setter TargetName="TemplateRoot" Property="LayoutTransform">
                                <Setter.Value>
                                    <RotateTransform Angle="-90" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsIndeterminate" Value="true">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource IsIndeterminate}" />
                            </Trigger.EnterActions>
                            <Setter TargetName="Indicator" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="PART_GlowRect" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="Animation" Property="Visibility" Value="Visible" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ProgressBarStripeBaseStyle" TargetType="ProgressBar">
        <Setter Property="Height" Value="20" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ProgressBar">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="OnLoaded">
                            <DoubleAnimationUsingKeyFrames
                                RepeatBehavior="Forever"
                                Storyboard.TargetName="Indicator"
                                Storyboard.TargetProperty="(Border.Background).(Brush.Transform).(TransformGroup.Children)[1].(TranslateTransform.X)">
                                <LinearDoubleKeyFrame KeyTime="0" Value="0" />
                                <LinearDoubleKeyFrame KeyTime="0:0:.25" Value="21" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <hc:SimplePanel x:Name="TemplateRoot" SnapsToDevicePixels="true">
                        <Border
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                        <Rectangle x:Name="PART_Track" />
                        <Decorator x:Name="PART_Indicator" HorizontalAlignment="Left">
                            <Border
                                x:Name="Indicator"
                                Background="{TemplateBinding Foreground}"
                                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                        </Decorator>
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Orientation" Value="Vertical">
                            <Setter Property="Height" Value="{x:Static system:Double.NaN}" />
                            <Setter TargetName="TemplateRoot" Property="LayoutTransform">
                                <Setter.Value>
                                    <RotateTransform Angle="-90" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="Indicator">
                            <BeginStoryboard Storyboard="{StaticResource OnLoaded}" />
                        </EventTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="CircleProgressBarIndeterminateTemplate" TargetType="hc:CircleProgressBar">
        <ControlTemplate.Resources>
            <Storyboard x:Key="IsIndeterminate" RepeatBehavior="Forever">
                <DoubleAnimationUsingKeyFrames
                    RepeatBehavior="Forever"
                    Storyboard.TargetName="TemplateRoot"
                    Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
                    <LinearDoubleKeyFrame KeyTime="0:0:1.568" Value="360" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames
                    RepeatBehavior="Forever"
                    Storyboard.TargetName="arc"
                    Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
                    <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                    <SplineDoubleKeyFrame
                        KeySpline="0.4,0.0,0.2,1"
                        KeyTime="0:0:0.666"
                        Value="135" />
                    <SplineDoubleKeyFrame
                        KeySpline="0.4,0.0,0.2,1"
                        KeyTime="0:0:1.333"
                        Value="270" />
                    <SplineDoubleKeyFrame
                        KeySpline="0.4,0.0,0.2,1"
                        KeyTime="0:0:1.999"
                        Value="405" />
                    <SplineDoubleKeyFrame
                        KeySpline="0.4,0.0,0.2,1"
                        KeyTime="0:0:2.666"
                        Value="540" />
                    <SplineDoubleKeyFrame
                        KeySpline="0.4,0.0,0.2,1"
                        KeyTime="0:0:3.333"
                        Value="675" />
                    <SplineDoubleKeyFrame
                        KeySpline="0.4,0.0,0.2,1"
                        KeyTime="0:0:3.999"
                        Value="810" />
                    <SplineDoubleKeyFrame
                        KeySpline="0.4,0.0,0.2,1"
                        KeyTime="0:0:4.666"
                        Value="945" />
                    <SplineDoubleKeyFrame
                        KeySpline="0.4,0.0,0.2,1"
                        KeyTime="0:0:5.332"
                        Value="1080" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames
                    RepeatBehavior="Forever"
                    Storyboard.TargetName="arc"
                    Storyboard.TargetProperty="(shapes:Arc.StartAngle)">
                    <SplineDoubleKeyFrame KeyTime="0" Value="-5" />
                    <SplineDoubleKeyFrame
                        KeySpline="0.4,0.0,0.2,1"
                        KeyTime="0:0:0.666"
                        Value="-130" />
                    <SplineDoubleKeyFrame
                        KeySpline="0.4,0.0,0.2,1"
                        KeyTime="0:0:1.333"
                        Value="-5" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames
                    RepeatBehavior="Forever"
                    Storyboard.TargetName="arc"
                    Storyboard.TargetProperty="(shapes:Arc.EndAngle)">
                    <SplineDoubleKeyFrame KeyTime="0" Value="5" />
                    <SplineDoubleKeyFrame
                        KeySpline="0.4,0.0,0.2,1"
                        KeyTime="0:0:0.666"
                        Value="130" />
                    <SplineDoubleKeyFrame
                        KeySpline="0.4,0.0,0.2,1"
                        KeyTime="0:0:1.333"
                        Value="5" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <hc:SimplePanel x:Name="TemplateRoot" RenderTransformOrigin="0.5,0.5">
            <hc:SimplePanel.RenderTransform>
                <TransformGroup>
                    <RotateTransform />
                </TransformGroup>
            </hc:SimplePanel.RenderTransform>
            <shapes:Arc
                Width="{TemplateBinding ActualWidth}"
                Height="{TemplateBinding ActualHeight}"
                ArcThickness="{TemplateBinding ArcThickness}"
                EndAngle="360"
                Fill="{TemplateBinding Background}"
                Stretch="None"
                Stroke="{TemplateBinding BorderBrush}"
                StrokeThickness="0" />
            <shapes:Arc
                x:Name="arc"
                Width="{TemplateBinding ActualWidth}"
                Height="{TemplateBinding ActualHeight}"
                ArcThickness="{TemplateBinding ArcThickness}"
                EndAngle="5"
                Fill="{TemplateBinding Foreground}"
                RenderTransformOrigin="0.5,0.5"
                StartAngle="-5"
                Stretch="None"
                StrokeThickness="0">
                <shapes:Arc.RenderTransform>
                    <TransformGroup>
                        <RotateTransform />
                    </TransformGroup>
                </shapes:Arc.RenderTransform>
            </shapes:Arc>
        </hc:SimplePanel>
        <ControlTemplate.Triggers>
            <Trigger Property="IsIndeterminate" Value="true">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource IsIndeterminate}" />
                </Trigger.EnterActions>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="ProgressBarCircleBaseStyle" TargetType="hc:CircleProgressBar">
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Height" Value="100" />
        <Setter Property="Width" Value="100" />
        <Setter Property="ArcThickness" Value="4" />
        <Setter Property="Text" Value="{Binding Value, RelativeSource={RelativeSource Self}, StringFormat={}{0:F0} %}" />
        <Setter Property="Template" Value="{StaticResource CircleProgressBarTemplate}" />
        <Style.Triggers>
            <Trigger Property="IsIndeterminate" Value="True">
                <Setter Property="Template" Value="{StaticResource CircleProgressBarIndeterminateTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ProgressBarWaveBaseStyle" TargetType="hc:WaveProgressBar">
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="Width" Value="100" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Text" Value="{Binding Value, RelativeSource={RelativeSource Self}, StringFormat={}{0:F0} %}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:WaveProgressBar">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="StoryboardOnLoaded" RepeatBehavior="Forever">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_Wave" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)">
                                <EasingDoubleKeyFrame KeyTime="0:0:2" Value="-400" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <StackPanel>
                        <Border
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Style="{StaticResource BorderCircular}">
                            <Viewbox>
                                <Border
                                    x:Name="PART_Clip"
                                    Width="200"
                                    Height="200"
                                    CornerRadius="100"
                                    Style="{StaticResource BorderCircularClip}">
                                    <Path
                                        x:Name="PART_Wave"
                                        Width="600"
                                        Height="250"
                                        Margin="0,0,-400,-20"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Top"
                                        Fill="{TemplateBinding WaveFill}"
                                        RenderTransformOrigin="0.5,0.5"
                                        Stretch="Fill"
                                        Stroke="{TemplateBinding WaveStroke}"
                                        StrokeThickness="{TemplateBinding WaveThickness}"
                                        UseLayoutRounding="False">
                                        <Path.Data>
                                            <PathGeometry>
                                                <PathFigure StartPoint="0,1">
                                                    <PolyBezierSegment Points="0.5,1 0.5,0 1,0" />
                                                    <PolyBezierSegment Points="1.5,0 1.5,1 2,1" />
                                                    <PolyBezierSegment Points="2.5,1 2.5,0 3,0" />
                                                    <PolyLineSegment Points="3,0 3,10, 0,10 0,1" />
                                                </PathFigure>
                                            </PathGeometry>
                                        </Path.Data>
                                    </Path>
                                </Border>
                            </Viewbox>
                        </Border>
                        <TextBlock
                            Margin="0,10,0,0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Foreground="{TemplateBinding Foreground}"
                            Text="{TemplateBinding Text}"
                            Visibility="{Binding ShowText, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                    </StackPanel>
                    <ControlTemplate.Triggers>
                        <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="PART_Wave">
                            <BeginStoryboard Name="BeginStoryboardWave" Storyboard="{StaticResource StoryboardOnLoaded}" />
                        </EventTrigger>
                        <EventTrigger RoutedEvent="FrameworkElement.Unloaded" SourceName="PART_Wave">
                            <StopStoryboard BeginStoryboardName="BeginStoryboardWave" />
                        </EventTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="CheckBoxBaseStyle"
        TargetType="CheckBox"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="FocusVisualStyle">
            <Setter.Value>
                <Style>
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle
                                    Margin="-4"
                                    Opacity=".6"
                                    RadiusX="4"
                                    RadiusY="4"
                                    SnapsToDevicePixels="true"
                                    Stroke="{DynamicResource SecondaryBorderBrush}"
                                    StrokeDashArray="1 1"
                                    StrokeThickness="2" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="White" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="6,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="CheckBox">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="StoryboardCheckedTrue">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="path" Storyboard.TargetProperty="(Shape.StrokeDashOffset)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardCheckedFalse">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="path" Storyboard.TargetProperty="(Shape.StrokeDashOffset)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="8" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid
                        x:Name="templateRoot"
                        Background="Transparent"
                        SnapsToDevicePixels="True">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Border
                            Width="16"
                            Height="16"
                            Background="{TemplateBinding Background}"
                            CornerRadius="2" />
                        <hc:SimplePanel
                            x:Name="markGrid"
                            Grid.Column="0"
                            Width="16"
                            Height="16">
                            <Path
                                x:Name="path"
                                Width="12"
                                Height="12"
                                Data="{StaticResource CheckedGeometry}"
                                FlowDirection="LeftToRight"
                                Stretch="Uniform"
                                Stroke="{DynamicResource TextIconBrush}"
                                StrokeDashArray="8,8"
                                StrokeDashOffset="8"
                                StrokeThickness="2"
                                UseLayoutRounding="True" />
                            <Rectangle
                                x:Name="indeterminateMark"
                                Margin="2"
                                Fill="{DynamicResource PrimaryBrush}"
                                Opacity="0"
                                RadiusX="2"
                                RadiusY="2" />
                        </hc:SimplePanel>
                        <Border
                            x:Name="border"
                            Width="16"
                            Height="16"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="2" />
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Grid.Column="1"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Focusable="False"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                            Visibility="Collapsed" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasContent" Value="true">
                            <Setter TargetName="contentPresenter" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsChecked" Value="true" />
                                <Condition Property="IsPressed" Value="true" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Opacity" Value=".8" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsChecked" Value="false" />
                                <Condition Property="IsPressed" Value="true" />
                            </MultiTrigger.Conditions>
                            <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </MultiTrigger>
                        <Trigger Property="IsChecked" Value="true">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardCheckedTrue}" />
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardCheckedFalse}" />
                            </Trigger.ExitActions>
                            <Setter TargetName="indeterminateMark" Property="Opacity" Value="0" />
                            <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
                            <Setter Property="BorderBrush" Value="{DynamicResource DarkPrimaryBrush}" />
                            <Setter TargetName="border" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="false">
                            <Setter TargetName="path" Property="Stroke" Value="{DynamicResource BorderBrush}" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="{x:Null}">
                            <Setter TargetName="indeterminateMark" Property="Opacity" Value="1" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="RadioButtonBaseStyle"
        TargetType="RadioButton"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="FocusVisualStyle">
            <Setter.Value>
                <Style>
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle
                                    Margin="-4"
                                    Opacity=".6"
                                    RadiusX="4"
                                    RadiusY="4"
                                    SnapsToDevicePixels="true"
                                    Stroke="{DynamicResource SecondaryBorderBrush}"
                                    StrokeDashArray="1 1"
                                    StrokeThickness="2" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="6,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="StoryboardCheckedTrue">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="optionMark" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="optionMark" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardCheckedFalse">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="optionMark" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="optionMark" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid
                        x:Name="templateRoot"
                        Background="Transparent"
                        SnapsToDevicePixels="True">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Border
                            Width="16"
                            Height="16"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Background="{TemplateBinding Background}"
                            CornerRadius="8">
                            <Ellipse
                                x:Name="optionMark"
                                Grid.Column="0"
                                Width="8"
                                Height="8"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Fill="White"
                                RenderTransformOrigin="0.5,0.5">
                                <Ellipse.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="0" ScaleY="0" />
                                    </TransformGroup>
                                </Ellipse.RenderTransform>
                            </Ellipse>
                        </Border>
                        <Border
                            x:Name="border"
                            Grid.Column="0"
                            Width="16"
                            Height="16"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="8" />
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Grid.Column="1"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Focusable="False"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                            Visibility="Collapsed" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasContent" Value="true">
                            <Setter TargetName="contentPresenter" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsChecked" Value="true" />
                                <Condition Property="IsPressed" Value="true" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Opacity" Value=".8" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsChecked" Value="false" />
                                <Condition Property="IsPressed" Value="true" />
                            </MultiTrigger.Conditions>
                            <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </MultiTrigger>
                        <Trigger Property="IsChecked" Value="true">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardCheckedTrue}" />
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardCheckedFalse}" />
                            </Trigger.ExitActions>
                            <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
                            <Setter Property="BorderBrush" Value="{DynamicResource DarkPrimaryBrush}" />
                            <Setter TargetName="border" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="RadioButtonSameAsButtonBaseStyle"
        TargetType="RadioButton"
        BasedOn="{StaticResource ButtonBaseBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <hc:SimplePanel>
                        <Border Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                        <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Orientation="Horizontal">
                                <Path
                                    x:Name="PathMain"
                                    Width="{TemplateBinding hc:IconElement.Width}"
                                    Height="{TemplateBinding hc:IconElement.Height}"
                                    Data="{TemplateBinding hc:IconElement.Geometry}"
                                    Fill="{TemplateBinding Foreground}"
                                    SnapsToDevicePixels="True"
                                    Stretch="Uniform" />
                                <ContentPresenter
                                    x:Name="ContentPresenterMain"
                                    Margin="6,0,0,0"
                                    VerticalAlignment="Center"
                                    RecognizesAccessKey="True"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </StackPanel>
                        </Border>
                        <Border
                            x:Name="BorderChecked"
                            Margin="-1"
                            BorderBrush="{DynamicResource DarkMaskBrush}"
                            BorderThickness="4"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Visibility="Collapsed" />
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="BorderChecked" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="ContentPresenterMain" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
                            <Setter TargetName="PathMain" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ContentPresenterMain" Property="Margin" Value="0" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Opacity" Value=".9" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Opacity" Value=".6" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="RadioButtonIconBaseStyle"
        TargetType="RadioButton"
        BasedOn="{StaticResource ButtonBaseBaseStyle}">
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualRadius0}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
        <Setter Property="hc:VisualElement.HighlightBrush" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <Border
                            Name="BorderHighlight"
                            BorderBrush="Transparent"
                            BorderThickness="3,0,0,0">
                            <StackPanel
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Orientation="Horizontal">
                                <Path
                                    x:Name="PathMain"
                                    Width="{Binding Path=(hc:IconElement.Width), RelativeSource={RelativeSource TemplatedParent}}"
                                    Height="{Binding Path=(hc:IconElement.Height), RelativeSource={RelativeSource TemplatedParent}}"
                                    Data="{TemplateBinding hc:IconElement.Geometry}"
                                    Fill="{TemplateBinding Foreground}"
                                    SnapsToDevicePixels="True"
                                    Stretch="Uniform" />
                                <ContentPresenter
                                    x:Name="ContentPresenterMain"
                                    Margin="6,0,0,0"
                                    VerticalAlignment="Center"
                                    RecognizesAccessKey="True"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </StackPanel>
                        </Border>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="ContentPresenterMain" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
                            <Setter TargetName="PathMain" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ContentPresenterMain" Property="Margin" Value="0" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="BorderHighlight" Property="BorderBrush" Value="{Binding Path=(hc:VisualElement.HighlightBrush), RelativeSource={RelativeSource TemplatedParent}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Opacity" Value=".9" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Opacity" Value=".6" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="RadioGroupItemBaseStyle"
        TargetType="RadioButton"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
        <Setter Property="Height" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Padding" Value="10,0" />
        <Setter Property="Margin" Value="-1,0,0,0" />
        <Setter Property="hc:IconElement.Width" Value="16" />
        <Setter Property="hc:IconElement.Height" Value="16" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <Border
                        x:Name="BorderRoot"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <StackPanel
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Orientation="Horizontal">
                            <Path
                                x:Name="PathMain"
                                Width="{Binding Path=(hc:IconElement.Width), RelativeSource={RelativeSource TemplatedParent}}"
                                Height="{Binding Path=(hc:IconElement.Height), RelativeSource={RelativeSource TemplatedParent}}"
                                Data="{TemplateBinding hc:IconElement.Geometry}"
                                Fill="{Binding Path=(TextElement.Foreground), ElementName=contentPresenter}"
                                SnapsToDevicePixels="True"
                                Stretch="Uniform" />
                            <ContentPresenter
                                x:Name="contentPresenter"
                                Margin="6,0,0,0"
                                VerticalAlignment="Center"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </StackPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="BorderRoot" Property="BorderBrush" Value="{Binding Path=(hc:VisualElement.HighlightBorderBrush), RelativeSource={RelativeSource TemplatedParent}}" />
                            <Setter TargetName="BorderRoot" Property="Background" Value="{Binding Path=(hc:VisualElement.HighlightBackground), RelativeSource={RelativeSource TemplatedParent}}" />
                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{Binding Path=(hc:VisualElement.HighlightForeground), RelativeSource={RelativeSource TemplatedParent}}" />
                        </Trigger>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="contentPresenter" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
                            <Setter TargetName="PathMain" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="contentPresenter" Property="Margin" Value="0" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="Panel.ZIndex" Value="{x:Static system:Int32.MaxValue}" />
            </Trigger>
            <DataTrigger Binding="{Binding Orientation, RelativeSource={RelativeSource AncestorType=hc:ButtonGroup}}" Value="Vertical">
                <Setter Property="Margin" Value="0,-1,0,0" />
            </DataTrigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="ButtonDefault"
        TargetType="Button"
        BasedOn="{StaticResource ButtonBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="ButtonDefault.Small"
        TargetType="Button"
        BasedOn="{StaticResource ButtonDefault}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style TargetType="Button" BasedOn="{StaticResource ButtonDefault}" />
    <Style
        x:Key="ButtonPrimary"
        TargetType="Button"
        BasedOn="{StaticResource ButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="ButtonPrimary.Small"
        TargetType="Button"
        BasedOn="{StaticResource ButtonPrimary}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ButtonSuccess"
        TargetType="Button"
        BasedOn="{StaticResource ButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource SuccessBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style
        x:Key="ButtonSuccess.Small"
        TargetType="Button"
        BasedOn="{StaticResource ButtonSuccess}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ButtonInfo"
        TargetType="Button"
        BasedOn="{StaticResource ButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource InfoBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="ButtonInfo.Small"
        TargetType="Button"
        BasedOn="{StaticResource ButtonInfo}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ButtonWarning"
        TargetType="Button"
        BasedOn="{StaticResource ButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource WarningBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="ButtonWarning.Small"
        TargetType="Button"
        BasedOn="{StaticResource ButtonWarning}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ButtonDanger"
        TargetType="Button"
        BasedOn="{StaticResource ButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource DangerBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style
        x:Key="ButtonDanger.Small"
        TargetType="Button"
        BasedOn="{StaticResource ButtonDanger}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ButtonIcon"
        TargetType="Button"
        BasedOn="{StaticResource ButtonBaseStyle}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <ContentControl
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                            <Path
                                Width="{TemplateBinding hc:IconElement.Width}"
                                Height="{TemplateBinding hc:IconElement.Height}"
                                Data="{TemplateBinding hc:IconElement.Geometry}"
                                Fill="{TemplateBinding Foreground}"
                                SnapsToDevicePixels="True"
                                Stretch="Uniform" />
                        </ContentControl>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ButtonIcon.Small"
        TargetType="Button"
        BasedOn="{StaticResource ButtonIcon}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ButtonIconCircular"
        TargetType="Button"
        BasedOn="{StaticResource ButtonBaseStyle}">
        <Setter Property="Width" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
        <Setter Property="Padding" Value="6" />
        <Setter Property="FocusVisualStyle">
            <Setter.Value>
                <Style>
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle Style="{StaticResource RectangleFocusVisualCircular}" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Style="{StaticResource BorderCircular}">
                        <ContentControl
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                            <Path
                                Width="{TemplateBinding hc:IconElement.Width}"
                                Height="{TemplateBinding hc:IconElement.Height}"
                                Data="{TemplateBinding hc:IconElement.Geometry}"
                                Fill="{TemplateBinding Foreground}"
                                SnapsToDevicePixels="True"
                                Stretch="Uniform" />
                        </ContentControl>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ButtonIconCircular.Small"
        TargetType="Button"
        BasedOn="{StaticResource ButtonIconCircular}">
        <Setter Property="Width" Value="20" />
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ButtonDashed"
        TargetType="Button"
        BasedOn="{StaticResource ButtonDashedBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}" />
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="ButtonDashed.Small"
        TargetType="Button"
        BasedOn="{StaticResource ButtonDashed}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ButtonDashedPrimary"
        TargetType="Button"
        BasedOn="{StaticResource ButtonDashedBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="ButtonDashedPrimary.Small"
        TargetType="Button"
        BasedOn="{StaticResource ButtonDashedPrimary}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ButtonDashedSuccess"
        TargetType="Button"
        BasedOn="{StaticResource ButtonDashedBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource SuccessBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style
        x:Key="ButtonDashedSuccess.Small"
        TargetType="Button"
        BasedOn="{StaticResource ButtonDashedSuccess}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ButtonDashedInfo"
        TargetType="Button"
        BasedOn="{StaticResource ButtonDashedBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource InfoBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="ButtonDashedInfo.Small"
        TargetType="Button"
        BasedOn="{StaticResource ButtonDashedInfo}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ButtonDashedWarning"
        TargetType="Button"
        BasedOn="{StaticResource ButtonDashedBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource WarningBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="ButtonDashedWarning.Small"
        TargetType="Button"
        BasedOn="{StaticResource ButtonDashedWarning}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ButtonDashedDanger"
        TargetType="Button"
        BasedOn="{StaticResource ButtonDashedBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource DangerBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style
        x:Key="ButtonDashedDanger.Small"
        TargetType="Button"
        BasedOn="{StaticResource ButtonDashedDanger}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ButtonCustom"
        TargetType="Button"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Background" Value="{x:Null}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border
                        x:Name="Chrome"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        SnapsToDevicePixels="true">
                        <ContentPresenter
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" Value=".9" />
                            <Setter TargetName="Chrome" Property="Background" Value="{Binding Path=(hc:BackgroundSwitchElement.MouseHoverBackground), RelativeSource={RelativeSource TemplatedParent}}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Opacity" Value=".6" />
                            <Setter TargetName="Chrome" Property="Background" Value="{Binding Path=(hc:BackgroundSwitchElement.MouseDownBackground), RelativeSource={RelativeSource TemplatedParent}}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ButtonGroupItemDefault"
        TargetType="Button"
        BasedOn="{StaticResource ButtonGroupItemBaseStyle}" />
    <Style
        x:Key="ButtonGroupItemHorizontalFirst"
        TargetType="Button"
        BasedOn="{StaticResource ButtonGroupItemBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="4,0,0,4" />
        <Setter Property="Margin" Value="0" />
    </Style>
    <Style
        x:Key="ButtonGroupItemHorizontalLast"
        TargetType="Button"
        BasedOn="{StaticResource ButtonGroupItemBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="0,4,4,0" />
    </Style>
    <Style
        x:Key="ButtonGroupItemSingle"
        TargetType="Button"
        BasedOn="{StaticResource ButtonGroupItemBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
    </Style>
    <Style
        x:Key="ButtonGroupItemVerticalFirst"
        TargetType="Button"
        BasedOn="{StaticResource ButtonGroupItemBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="4,4,0,0" />
        <Setter Property="Margin" Value="0" />
    </Style>
    <Style
        x:Key="ButtonGroupItemVerticalLast"
        TargetType="Button"
        BasedOn="{StaticResource ButtonGroupItemBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="0,0,4,4" />
    </Style>
    <Style
        x:Key="TextBlockDefault"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBaseStyle}" />
    <Style
        x:Key="TextBlockDefaultAccent"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource AccentBrush}" />
    </Style>
    <Style
        x:Key="TextBlockDefaultPrimary"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="TextBlockDefaultDanger"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style
        x:Key="TextBlockDefaultWarning"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="TextBlockDefaultInfo"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="TextBlockDefaultSuccess"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style
        x:Key="TextBlockDefaultSecLight"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource SecondaryTextBrush}" />
    </Style>
    <Style
        x:Key="TextBlockDefaultThiLight"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource TextInfoBrush}" />
    </Style>
    <Style
        x:Key="TextBlockLarge"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBaseStyle}">
        <Setter Property="FontSize" Value="{StaticResource LargeFontSize}" />
    </Style>
    <Style
        x:Key="TextBlockTitle"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBaseStyle}">
        <Setter Property="FontSize" Value="{StaticResource HeadFontSize}" />
    </Style>
    <Style
        x:Key="TextBlockSubTitle"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBaseStyle}">
        <Setter Property="FontSize" Value="{StaticResource SubHeadFontSize}" />
    </Style>
    <Style
        x:Key="TextBlockLargeBold"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBoldBaseStyle}">
        <Setter Property="FontSize" Value="{StaticResource LargeFontSize}" />
    </Style>
    <Style
        x:Key="TextBlockTitleBold"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBoldBaseStyle}">
        <Setter Property="FontSize" Value="{StaticResource HeadFontSize}" />
    </Style>
    <Style
        x:Key="TextBlockSubTitleBold"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBoldBaseStyle}">
        <Setter Property="FontSize" Value="{StaticResource SubHeadFontSize}" />
    </Style>
    <Style
        x:Key="TextBlockDefaultBold"
        TargetType="TextBlock"
        BasedOn="{StaticResource TextBlockBoldBaseStyle}" />
    <Style TargetType="hc:HighlightTextBlock" BasedOn="{StaticResource HighlightTextBlockBaseStyle}" />
    <Style
        x:Key="LabelDefault"
        TargetType="Label"
        BasedOn="{StaticResource LabelBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
    </Style>
    <Style TargetType="Label" BasedOn="{StaticResource LabelDefault}" />
    <Style
        x:Key="LabelDefault.Small"
        TargetType="Label"
        BasedOn="{StaticResource LabelDefault}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,0" />
    </Style>
    <Style
        x:Key="LabelPrimary"
        TargetType="Label"
        BasedOn="{StaticResource LabelBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="LabelPrimary.Small"
        TargetType="Label"
        BasedOn="{StaticResource LabelPrimary}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,0" />
    </Style>
    <Style
        x:Key="LabelSuccess"
        TargetType="Label"
        BasedOn="{StaticResource LabelBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style
        x:Key="LabelSuccess.Small"
        TargetType="Label"
        BasedOn="{StaticResource LabelSuccess}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,0" />
    </Style>
    <Style
        x:Key="LabelInfo"
        TargetType="Label"
        BasedOn="{StaticResource LabelBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="LabelInfo.Small"
        TargetType="Label"
        BasedOn="{StaticResource LabelInfo}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,0" />
    </Style>
    <Style
        x:Key="LabelWarning"
        TargetType="Label"
        BasedOn="{StaticResource LabelBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="LabelWarning.Small"
        TargetType="Label"
        BasedOn="{StaticResource LabelWarning}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,0" />
    </Style>
    <Style
        x:Key="LabelDanger"
        TargetType="Label"
        BasedOn="{StaticResource LabelBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style
        x:Key="LabelDanger.Small"
        TargetType="Label"
        BasedOn="{StaticResource LabelDanger}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,0" />
    </Style>
    <Style TargetType="hc:CompareSlider" BasedOn="{StaticResource CompareSliderBaseStyle}" />
    <Style TargetType="hc:PreviewSlider" BasedOn="{StaticResource PreviewSliderBaseStyle}" />
    <Style
        x:Key="ToggleButtonDefault"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="ToggleButtonDefault.Small"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonDefault}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style TargetType="ToggleButton" BasedOn="{StaticResource ToggleButtonDefault}" />
    <Style
        x:Key="ToggleButtonPrimary"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="ToggleButtonPrimary.Small"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonPrimary}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ToggleButtonSuccess"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource SuccessBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style
        x:Key="ToggleButtonSuccess.Small"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonSuccess}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ToggleButtonInfo"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource InfoBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="ToggleButtonInfo.Small"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonInfo}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ToggleButtonWarning"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource WarningBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="ToggleButtonWarning.Small"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonWarning}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ToggleButtonDanger"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource DangerBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style
        x:Key="ToggleButtonDanger.Small"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonDanger}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ToggleButtonIcon"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonIconBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="ToggleButtonIcon.Small"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonIcon}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ToggleButtonIconPrimary"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonIconBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="ToggleButtonIconPrimary.Small"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonIconPrimary}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ToggleButtonIconSuccess"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonIconBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource SuccessBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style
        x:Key="ToggleButtonIconSuccess.Small"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonIconSuccess}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ToggleButtonIconInfo"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonIconBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource InfoBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="ToggleButtonIconInfo.Small"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonIconInfo}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ToggleButtonIconWarning"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonIconBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource WarningBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="ToggleButtonIconWarning.Small"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonIconWarning}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ToggleButtonIconDanger"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonIconBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource DangerBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style
        x:Key="ToggleButtonIconDanger.Small"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonIconDanger}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ToggleButtonIconTransparent"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonIconBaseStyle}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <ContentControl Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                            <Path
                                x:Name="PathIcon"
                                Width="{TemplateBinding hc:IconElement.Width}"
                                Height="{TemplateBinding hc:IconElement.Height}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Data="{TemplateBinding hc:IconSwitchElement.Geometry}"
                                Fill="{TemplateBinding Foreground}"
                                SnapsToDevicePixels="True"
                                Stretch="Uniform" />
                        </ContentControl>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="PathIcon" Property="Data" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(hc:IconSwitchElement.GeometrySelected)}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ToggleButtonIconTransparent.Small"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonIconTransparent}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="ToggleButtonSwitch"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonSwitchBaseStyle}" />
    <Style
        x:Key="ToggleButtonSwitch.Small"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonSwitch}">
        <Setter Property="Height" Value="16" />
    </Style>
    <Style
        x:Key="ToggleButtonFlip"
        TargetType="ToggleButton"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Height" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Width" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="StoryboardChecked">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CheckedElement" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1">
                                    <EasingDoubleKeyFrame.EasingFunction>
                                        <PowerEase EasingMode="EaseOut" />
                                    </EasingDoubleKeyFrame.EasingFunction>
                                </EasingDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="UnCheckedElement" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0">
                                    <EasingDoubleKeyFrame.EasingFunction>
                                        <PowerEase EasingMode="EaseOut" />
                                    </EasingDoubleKeyFrame.EasingFunction>
                                </EasingDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CheckedElement" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1">
                                    <EasingDoubleKeyFrame.EasingFunction>
                                        <PowerEase EasingMode="EaseOut" />
                                    </EasingDoubleKeyFrame.EasingFunction>
                                </EasingDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="UnCheckedElement" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0">
                                    <EasingDoubleKeyFrame.EasingFunction>
                                        <PowerEase EasingMode="EaseOut" />
                                    </EasingDoubleKeyFrame.EasingFunction>
                                </EasingDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardUnChecked">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CheckedElement" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0">
                                    <EasingDoubleKeyFrame.EasingFunction>
                                        <PowerEase EasingMode="EaseOut" />
                                    </EasingDoubleKeyFrame.EasingFunction>
                                </EasingDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="UnCheckedElement" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1">
                                    <EasingDoubleKeyFrame.EasingFunction>
                                        <PowerEase EasingMode="EaseOut" />
                                    </EasingDoubleKeyFrame.EasingFunction>
                                </EasingDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CheckedElement" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0">
                                    <EasingDoubleKeyFrame.EasingFunction>
                                        <PowerEase EasingMode="EaseOut" />
                                    </EasingDoubleKeyFrame.EasingFunction>
                                </EasingDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="UnCheckedElement" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1">
                                    <EasingDoubleKeyFrame.EasingFunction>
                                        <PowerEase EasingMode="EaseOut" />
                                    </EasingDoubleKeyFrame.EasingFunction>
                                </EasingDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Viewbox>
                        <hc:SimplePanel Width="28" Height="28">
                            <Border
                                Name="UnCheckedElement"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                RenderTransformOrigin="0.5,0.5"
                                SnapsToDevicePixels="true"
                                Style="{StaticResource BorderCircularClip}">
                                <Border.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" />
                                    </TransformGroup>
                                </Border.RenderTransform>
                                <ContentPresenter
                                    Margin="{TemplateBinding Padding}"
                                    RecognizesAccessKey="True"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </Border>
                            <Border
                                Name="CheckedElement"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                RenderTransformOrigin="0.5,0.5"
                                SnapsToDevicePixels="true"
                                Style="{StaticResource BorderCircularClip}">
                                <Border.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="0" />
                                    </TransformGroup>
                                </Border.RenderTransform>
                                <ContentPresenter
                                    Margin="{TemplateBinding Padding}"
                                    Content="{Binding Path=(hc:StatusSwitchElement.CheckedElement), RelativeSource={RelativeSource TemplatedParent}}"
                                    RecognizesAccessKey="True"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </Border>
                        </hc:SimplePanel>
                    </Viewbox>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" Value=".9" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Opacity" Value=".6" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="true">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardChecked}" />
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardUnChecked}" />
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ToggleButtonFlip.Small"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonFlip}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Width" Value="20" />
    </Style>
    <Style
        x:Key="ToggleButtonCustom"
        TargetType="ToggleButton"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Border
                        x:Name="Chrome"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        SnapsToDevicePixels="true">
                        <hc:SimplePanel>
                            <ContentPresenter
                                Name="UnCheckedElement"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            <ContentPresenter
                                Name="CheckedElement"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Content="{Binding Path=(hc:StatusSwitchElement.CheckedElement), RelativeSource={RelativeSource TemplatedParent}}"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                Visibility="Collapsed" />
                        </hc:SimplePanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" Value=".9" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Opacity" Value=".6" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="CheckedElement" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="hc:StatusSwitchElement.HideUncheckedElement" Value="True" />
                                <Condition Property="IsChecked" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="UnCheckedElement" Property="Visibility" Value="Collapsed" />
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ToggleButtonGroupItemDefault"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonGroupItemBaseStyle}" />
    <Style
        x:Key="ToggleButtonGroupItemHorizontalFirst"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonGroupItemBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="4,0,0,4" />
        <Setter Property="Margin" Value="0" />
    </Style>
    <Style
        x:Key="ToggleButtonGroupItemHorizontalLast"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonGroupItemBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="0,4,4,0" />
    </Style>
    <Style
        x:Key="ToggleButtonGroupItemSingle"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonGroupItemBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
    </Style>
    <Style
        x:Key="ToggleButtonGroupItemVerticalFirst"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonGroupItemBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="4,4,0,0" />
        <Setter Property="Margin" Value="0" />
    </Style>
    <Style
        x:Key="ToggleButtonGroupItemVerticalLast"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonGroupItemBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="0,0,4,4" />
    </Style>
    <Style
        x:Key="ToggleButtonLoadingPrimary"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Border
                        x:Name="Chrome"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
                            <hc:SimplePanel>
                                <ContentPresenter
                                    Name="UnCheckedElement"
                                    Margin="{TemplateBinding Padding}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    RecognizesAccessKey="True"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                <ContentPresenter
                                    Name="CheckedElement"
                                    Margin="{TemplateBinding Padding}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    Content="{Binding Path=(hc:StatusSwitchElement.CheckedElement), RelativeSource={RelativeSource TemplatedParent}}"
                                    RecognizesAccessKey="True"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                    Visibility="Collapsed" />
                            </hc:SimplePanel>
                            <Viewbox Margin="0,4">
                                <hc:LoadingCircle
                                    x:Name="Loading"
                                    Width="22"
                                    Height="22"
                                    DotDiameter="3"
                                    Foreground="{TemplateBinding Foreground}"
                                    IsRunning="{TemplateBinding IsChecked}"
                                    Visibility="Collapsed" />
                            </Viewbox>
                        </StackPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" Value=".9" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Opacity" Value=".6" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="Loading" Property="Visibility" Value="Visible" />
                            <Setter TargetName="CheckedElement" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="hc:StatusSwitchElement.HideUncheckedElement" Value="True" />
                                <Condition Property="IsChecked" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="UnCheckedElement" Property="Visibility" Value="Collapsed" />
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ToggleButtonLoading"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonLoadingPrimary}">
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="ToggleButtonLoadingSuccess"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonLoadingPrimary}">
        <Setter Property="Background" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style
        x:Key="ToggleButtonLoadingInfo"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonLoadingPrimary}">
        <Setter Property="Background" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="ToggleButtonLoadingWarning"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonLoadingPrimary}">
        <Setter Property="Background" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="ToggleButtonLoadingDanger"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonLoadingPrimary}">
        <Setter Property="Background" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style
        x:Key="RepeatButtonDefault"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="RepeatButtonDefault.Small"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonDefault}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonDefault}" />
    <Style
        x:Key="RepeatButtonPrimary"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="RepeatButtonPrimary.Small"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonPrimary}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RepeatButtonSuccess"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource SuccessBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style
        x:Key="RepeatButtonSuccess.Small"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonSuccess}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RepeatButtonInfo"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource InfoBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="RepeatButtonInfo.Small"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonInfo}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RepeatButtonWarning"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource WarningBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="RepeatButtonWarning.Small"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonWarning}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RepeatButtonDanger"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource DangerBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style
        x:Key="RepeatButtonDanger.Small"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonDanger}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RepeatButtonIcon"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonBaseStyle}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <ContentControl
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                            <Path
                                Width="{TemplateBinding hc:IconElement.Width}"
                                Height="{TemplateBinding hc:IconElement.Height}"
                                Data="{TemplateBinding hc:IconElement.Geometry}"
                                Fill="{TemplateBinding Foreground}"
                                SnapsToDevicePixels="True"
                                Stretch="Uniform" />
                        </ContentControl>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="RepeatButtonIcon.Small"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonIcon}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RepeatButtonIconCircular"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonBaseStyle}">
        <Setter Property="Width" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
        <Setter Property="Padding" Value="6" />
        <Setter Property="FocusVisualStyle">
            <Setter.Value>
                <Style>
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle Style="{StaticResource RectangleFocusVisualCircular}" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Style="{StaticResource BorderCircular}">
                        <ContentControl
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                            <Path
                                Width="{TemplateBinding hc:IconElement.Width}"
                                Height="{TemplateBinding hc:IconElement.Height}"
                                Data="{TemplateBinding hc:IconElement.Geometry}"
                                Fill="{TemplateBinding Foreground}"
                                SnapsToDevicePixels="True"
                                Stretch="Uniform" />
                        </ContentControl>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="RepeatButtonIconCircular.Small"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonIconCircular}">
        <Setter Property="Width" Value="20" />
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RepeatButtonDashed"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonDashedBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}" />
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="RepeatButtonDashed.Small"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonDashed}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RepeatButtonDashedPrimary"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonDashedBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="RepeatButtonDashedPrimary.Small"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonDashedPrimary}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RepeatButtonDashedSuccess"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonDashedBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource SuccessBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style
        x:Key="RepeatButtonDashedSuccess.Small"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonDashedSuccess}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RepeatButtonDashedInfo"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonDashedBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource InfoBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="RepeatButtonDashedInfo.Small"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonDashedInfo}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RepeatButtonDashedWarning"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonDashedBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource WarningBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="RepeatButtonDashedWarning.Small"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonDashedWarning}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RepeatButtonDashedDanger"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonDashedBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource DangerBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style
        x:Key="RepeatButtonDashedDanger.Small"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonDashedDanger}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RepeatButtonCustom"
        TargetType="RepeatButton"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Background" Value="{x:Null}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Border
                        x:Name="Chrome"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        SnapsToDevicePixels="true">
                        <ContentPresenter
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" Value=".9" />
                            <Setter TargetName="Chrome" Property="Background" Value="{Binding Path=(hc:BackgroundSwitchElement.MouseHoverBackground), RelativeSource={RelativeSource TemplatedParent}}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Opacity" Value=".6" />
                            <Setter TargetName="Chrome" Property="Background" Value="{Binding Path=(hc:BackgroundSwitchElement.MouseDownBackground), RelativeSource={RelativeSource TemplatedParent}}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="ScrollViewer" BasedOn="{StaticResource ScrollViewerNativeBaseStyle}" />
    <Style TargetType="hc:ScrollViewer" BasedOn="{StaticResource ScrollViewerBaseStyle}" />
    <Style
        x:Key="ScrollViewerUpDownRepeatButtonStyle"
        TargetType="RepeatButton"
        BasedOn="{StaticResource RepeatButtonIcon}">
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="Height" Value="10" />
        <Setter Property="Padding" Value="0,2" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="ClickMode" Value="Hover" />
    </Style>
    <ControlTemplate x:Key="ScrollViewerUpDownControlTemplate" TargetType="ScrollViewer">
        <Grid x:Name="Grid" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <RepeatButton
                hc:IconElement.Geometry="{StaticResource UpGeometry}"
                Command="{x:Static ScrollBar.LineUpCommand}"
                CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                Style="{StaticResource ScrollViewerUpDownRepeatButtonStyle}">
                <RepeatButton.Visibility>
                    <MultiBinding
                        Converter="{StaticResource MenuScrollingVisibilityConverter}"
                        ConverterParameter="0"
                        FallbackValue="Visibility.Collapsed">
                        <Binding Path="ComputedVerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
                        <Binding Path="VerticalOffset" RelativeSource="{RelativeSource TemplatedParent}" />
                        <Binding Path="ExtentHeight" RelativeSource="{RelativeSource TemplatedParent}" />
                        <Binding Path="ViewportHeight" RelativeSource="{RelativeSource TemplatedParent}" />
                    </MultiBinding>
                </RepeatButton.Visibility>
            </RepeatButton>
            <ScrollContentPresenter
                x:Name="PART_ScrollContentPresenter"
                Grid.Row="1"
                Grid.Column="0"
                Margin="{TemplateBinding Padding}"
                CanContentScroll="{TemplateBinding CanContentScroll}"
                CanHorizontallyScroll="False"
                CanVerticallyScroll="False"
                Content="{TemplateBinding Content}"
                ContentTemplate="{TemplateBinding ContentTemplate}" />
            <RepeatButton
                Grid.Row="2"
                hc:IconElement.Geometry="{StaticResource DownGeometry}"
                Command="{x:Static ScrollBar.LineDownCommand}"
                CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                Style="{StaticResource ScrollViewerUpDownRepeatButtonStyle}">
                <RepeatButton.Visibility>
                    <MultiBinding
                        Converter="{StaticResource MenuScrollingVisibilityConverter}"
                        ConverterParameter="100"
                        FallbackValue="Visibility.Collapsed">
                        <Binding Path="ComputedVerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
                        <Binding Path="VerticalOffset" RelativeSource="{RelativeSource TemplatedParent}" />
                        <Binding Path="ExtentHeight" RelativeSource="{RelativeSource TemplatedParent}" />
                        <Binding Path="ViewportHeight" RelativeSource="{RelativeSource TemplatedParent}" />
                    </MultiBinding>
                </RepeatButton.Visibility>
            </RepeatButton>
        </Grid>
    </ControlTemplate>
    <Style x:Key="ScrollViewerUpDown" TargetType="ScrollViewer">
        <Setter Property="VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Template" Value="{StaticResource ScrollViewerUpDownControlTemplate}" />
    </Style>
    <Style x:Key="CalendarButtonStyle" TargetType="CalendarButton">
        <Setter Property="MinWidth" Value="10" />
        <Setter Property="MinHeight" Value="10" />
        <Setter Property="FontSize" Value="12" />
        <Setter Property="Width" Value="40" />
        <Setter Property="Height" Value="32" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="CalendarButton">
                    <hc:SimplePanel>
                        <Rectangle
                            x:Name="SelectedBackground"
                            Fill="{DynamicResource DangerBrush}"
                            Opacity="0"
                            RadiusX="16"
                            RadiusY="16" />
                        <Rectangle
                            x:Name="Background"
                            Fill="{TemplateBinding Background}"
                            Opacity="0"
                            RadiusX="16"
                            RadiusY="16" />
                        <ContentPresenter
                            x:Name="NormalText"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                            <TextElement.Foreground>
                                <SolidColorBrush Color="{DynamicResource PrimaryTextColor}" />
                            </TextElement.Foreground>
                        </ContentPresenter>
                        <Rectangle
                            x:Name="CalendarButtonFocusVisual"
                            IsHitTestVisible="false"
                            RadiusX="16"
                            RadiusY="16"
                            Stroke="{DynamicResource PrimaryBrush}"
                            Visibility="Collapsed" />
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="SelectedBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0:0:.2" />
                                        <ColorAnimation
                                            Storyboard.TargetName="NormalText"
                                            Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)"
                                            To="White"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ActiveStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Active" />
                                <VisualState x:Name="Inactive">
                                    <Storyboard>
                                        <ColorAnimation
                                            Storyboard.TargetName="NormalText"
                                            Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)"
                                            To="{DynamicResource ThirdlyTextColor}"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="CalendarButtonFocusVisual" Property="Visibility" Value="Visible" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="CalendarDayButtonStyle"
        TargetType="CalendarDayButton"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="MinWidth" Value="10" />
        <Setter Property="MinHeight" Value="10" />
        <Setter Property="Width" Value="32" />
        <Setter Property="Height" Value="32" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="FocusVisualStyle">
            <Setter.Value>
                <Style>
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle Style="{StaticResource RectangleFocusVisualCircular}" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="CalendarDayButton">
                    <hc:SimplePanel>
                        <Rectangle
                            x:Name="TodayBackground"
                            Fill="{DynamicResource DangerBrush}"
                            Opacity="0"
                            RadiusX="16"
                            RadiusY="16" />
                        <Rectangle
                            x:Name="SelectedBackground"
                            Fill="{DynamicResource PrimaryBrush}"
                            Opacity="0"
                            RadiusX="16"
                            RadiusY="16" />
                        <ContentPresenter
                            x:Name="NormalText"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                            <TextElement.Foreground>
                                <SolidColorBrush Color="{DynamicResource PrimaryTextColor}" />
                            </TextElement.Foreground>
                        </ContentPresenter>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="NormalText"
                                            Storyboard.TargetProperty="Opacity"
                                            To=".35"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="SelectedBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0:0:.2" />
                                        <ColorAnimation
                                            Storyboard.TargetName="NormalText"
                                            Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)"
                                            To="White"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ActiveStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Active" />
                                <VisualState x:Name="Inactive">
                                    <Storyboard>
                                        <ColorAnimation
                                            Storyboard.TargetName="NormalText"
                                            Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)"
                                            To="{DynamicResource ThirdlyTextColor}"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DayStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="RegularDay" />
                                <VisualState x:Name="Today">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="TodayBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <ColorAnimation
                                            Storyboard.TargetName="NormalText"
                                            Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)"
                                            To="White"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </hc:SimplePanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="CalendarItem">
        <Setter Property="Margin" Value="0" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="CalendarItem">
                    <ControlTemplate.Resources>
                        <DataTemplate x:Key="{x:Static CalendarItem.DayTitleTemplateResourceKey}">
                            <TextBlock
                                Margin="0,6,0,6"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                FontWeight="Bold"
                                Foreground="{DynamicResource PrimaryTextBrush}"
                                Text="{Binding}" />
                        </DataTemplate>
                    </ControlTemplate.Resources>
                    <hc:SimplePanel x:Name="PART_Root">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <Border
                                Grid.ColumnSpan="3"
                                Margin="4"
                                Background="{Binding Path=(hc:TitleElement.Background), RelativeSource={RelativeSource TemplatedParent}}"
                                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                            <Button
                                x:Name="PART_PreviousButton"
                                Grid.Row="0"
                                Grid.Column="0"
                                Width="50"
                                Height="50"
                                Padding="16"
                                HorizontalAlignment="Left"
                                hc:IconElement.Geometry="{StaticResource LeftGeometry}"
                                Focusable="False"
                                Foreground="{Binding Path=(hc:TitleElement.Foreground), RelativeSource={RelativeSource TemplatedParent}}"
                                Style="{StaticResource ButtonIcon}" />
                            <Button
                                x:Name="PART_HeaderButton"
                                Grid.Row="0"
                                Grid.Column="1"
                                HorizontalAlignment="Center"
                                Focusable="False"
                                FontSize="20"
                                Foreground="{Binding Path=(hc:TitleElement.Foreground), RelativeSource={RelativeSource TemplatedParent}}"
                                Style="{StaticResource ButtonCustom}" />
                            <Button
                                x:Name="PART_NextButton"
                                Grid.Row="0"
                                Grid.Column="2"
                                Width="50"
                                Height="50"
                                Padding="16"
                                HorizontalAlignment="Right"
                                hc:IconElement.Geometry="{StaticResource RightGeometry}"
                                Focusable="False"
                                Foreground="{Binding Path=(hc:TitleElement.Foreground), RelativeSource={RelativeSource TemplatedParent}}"
                                Style="{StaticResource ButtonIcon}" />
                            <Grid
                                x:Name="PART_MonthView"
                                Grid.Row="1"
                                Grid.Column="0"
                                Grid.ColumnSpan="3"
                                Width="240"
                                Height="240"
                                Margin="10,6,10,10"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="Visible">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition />
                                    <RowDefinition />
                                    <RowDefinition />
                                    <RowDefinition />
                                    <RowDefinition />
                                    <RowDefinition />
                                    <RowDefinition />
                                </Grid.RowDefinitions>
                            </Grid>
                            <Grid
                                x:Name="PART_YearView"
                                Grid.Row="1"
                                Grid.Column="0"
                                Grid.ColumnSpan="3"
                                Width="240"
                                Height="240"
                                Margin="10,6,10,10"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="Hidden">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition />
                                    <RowDefinition />
                                    <RowDefinition />
                                </Grid.RowDefinitions>
                            </Grid>
                        </Grid>
                        <Rectangle x:Name="PART_DisabledVisual" 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>
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource AncestorType=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 AncestorType=Calendar}}" Value="Decade">
                            <Setter TargetName="PART_MonthView" Property="Visibility" Value="Hidden" />
                            <Setter TargetName="PART_YearView" Property="Visibility" Value="Visible" />
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CalendarBaseStyle" TargetType="Calendar">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Language" Value="{Binding Lang, Source={x:Static tools:ConfigHelper.Instance}}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Margin" Value="8,0" />
        <Setter Property="CalendarDayButtonStyle" Value="{StaticResource CalendarDayButtonStyle}" />
        <Setter Property="CalendarButtonStyle" Value="{StaticResource CalendarButtonStyle}" />
        <Setter Property="hc:TitleElement.Background" Value="{DynamicResource TitleBrush}" />
        <Setter Property="hc:TitleElement.Foreground" Value="{DynamicResource TextIconBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Calendar">
                    <hc:SimplePanel
                        Margin="0,4,0,8"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center">
                        <Border
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}" />
                        <CalendarItem x:Name="PART_CalendarItem" Margin="{TemplateBinding BorderThickness}" />
                    </hc:SimplePanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="Calendar" BasedOn="{StaticResource CalendarBaseStyle}" />
    <Style TargetType="hc:ToggleBlock" BasedOn="{StaticResource ToggleBlockBaseStyle}" />
    <Style
        x:Key="ToggleBlockIcon"
        TargetType="hc:ToggleBlock"
        BasedOn="{StaticResource ToggleBlockBaseStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:ToggleBlock">
                    <ContentControl Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <Path
                            x:Name="PathIcon"
                            Width="{TemplateBinding hc:IconElement.Width}"
                            Height="{TemplateBinding hc:IconElement.Height}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Data="{TemplateBinding hc:IconSwitchElement.Geometry}"
                            Fill="{TemplateBinding Foreground}"
                            SnapsToDevicePixels="True"
                            Stretch="Uniform" />
                    </ContentControl>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="PathIcon" Property="Data" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(hc:IconSwitchElement.GeometrySelected)}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="GroupBox" BasedOn="{StaticResource GroupBoxBaseStyle}" />
    <Style
        x:Key="GroupBox.Small"
        TargetType="GroupBox"
        BasedOn="{StaticResource GroupBoxBaseStyle}">
        <Setter Property="hc:TitleElement.MinHeight" Value="20" />
        <Setter Property="hc:TitleElement.MinWidth" Value="20" />
    </Style>
    <Style
        x:Key="GroupBoxOriginal"
        TargetType="GroupBox"
        BasedOn="{StaticResource GroupBoxOriginalBaseStyle}" />
    <Style
        x:Key="GroupBoxTab"
        TargetType="GroupBox"
        BasedOn="{StaticResource GroupBoxTabBaseStyle}" />
    <Style
        x:Key="GroupBoxTab.Small"
        TargetType="GroupBox"
        BasedOn="{StaticResource GroupBoxTab}">
        <Setter Property="hc:TitleElement.MinHeight" Value="20" />
        <Setter Property="hc:TitleElement.MinWidth" Value="20" />
    </Style>
    <Style TargetType="hc:ButtonGroup" BasedOn="{StaticResource ButtonGroupBaseStyle}" />
    <Style
        x:Key="ButtonGroupSolid"
        TargetType="hc:ButtonGroup"
        BasedOn="{StaticResource ButtonGroupBaseStyle}">
        <Setter Property="hc:VisualElement.HighlightBorderBrush" Value="{DynamicResource TitleBrush}" />
        <Setter Property="hc:VisualElement.HighlightBackground" Value="{DynamicResource TitleBrush}" />
        <Setter Property="hc:VisualElement.HighlightForeground" Value="{DynamicResource TextIconBrush}" />
    </Style>
    <Style TargetType="ProgressBar" BasedOn="{StaticResource ProgressBarBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="ProgressBarSuccess"
        TargetType="ProgressBar"
        BasedOn="{StaticResource ProgressBarBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style
        x:Key="ProgressBarInfo"
        TargetType="ProgressBar"
        BasedOn="{StaticResource ProgressBarBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="ProgressBarWarning"
        TargetType="ProgressBar"
        BasedOn="{StaticResource ProgressBarBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="ProgressBarDanger"
        TargetType="ProgressBar"
        BasedOn="{StaticResource ProgressBarBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style
        x:Key="ProgressBarPrimaryStripe"
        TargetType="ProgressBar"
        BasedOn="{StaticResource ProgressBarStripeBaseStyle}">
        <Setter Property="Foreground">
            <Setter.Value>
                <DrawingBrush
                    Stretch="None"
                    TileMode="Tile"
                    Viewport="0,0,20,32"
                    ViewportUnits="Absolute">
                    <DrawingBrush.Transform>
                        <TransformGroup>
                            <RotateTransform Angle="20" />
                            <TranslateTransform x:Name="MyTransform" X="0" />
                        </TransformGroup>
                    </DrawingBrush.Transform>
                    <DrawingBrush.Drawing>
                        <GeometryDrawing>
                            <GeometryDrawing.Brush>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                                    <GradientStop Offset="0" Color="{DynamicResource DarkPrimaryColor}" />
                                    <GradientStop Offset="0.5" Color="{DynamicResource DarkPrimaryColor}" />
                                    <GradientStop Offset="0.5" Color="{DynamicResource BackgroundColor}" />
                                    <GradientStop Offset="1" Color="{DynamicResource BackgroundColor}" />
                                </LinearGradientBrush>
                            </GeometryDrawing.Brush>
                            <GeometryDrawing.Geometry>
                                <RectangleGeometry Rect="0,0,20,32" />
                            </GeometryDrawing.Geometry>
                        </GeometryDrawing>
                    </DrawingBrush.Drawing>
                </DrawingBrush>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ProgressBarSuccessStripe"
        TargetType="ProgressBar"
        BasedOn="{StaticResource ProgressBarStripeBaseStyle}">
        <Setter Property="Foreground">
            <Setter.Value>
                <DrawingBrush
                    Stretch="None"
                    TileMode="Tile"
                    Viewport="0,0,20,32"
                    ViewportUnits="Absolute">
                    <DrawingBrush.Transform>
                        <TransformGroup>
                            <RotateTransform Angle="20" />
                            <TranslateTransform x:Name="MyTransform" X="0" />
                        </TransformGroup>
                    </DrawingBrush.Transform>
                    <DrawingBrush.Drawing>
                        <GeometryDrawing>
                            <GeometryDrawing.Brush>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                                    <GradientStop Offset="0" Color="{DynamicResource DarkSuccessColor}" />
                                    <GradientStop Offset="0.5" Color="{DynamicResource DarkSuccessColor}" />
                                    <GradientStop Offset="0.5" Color="{DynamicResource BackgroundColor}" />
                                    <GradientStop Offset="1" Color="{DynamicResource BackgroundColor}" />
                                </LinearGradientBrush>
                            </GeometryDrawing.Brush>
                            <GeometryDrawing.Geometry>
                                <RectangleGeometry Rect="0,0,20,32" />
                            </GeometryDrawing.Geometry>
                        </GeometryDrawing>
                    </DrawingBrush.Drawing>
                </DrawingBrush>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ProgressBarInfoStripe"
        TargetType="ProgressBar"
        BasedOn="{StaticResource ProgressBarStripeBaseStyle}">
        <Setter Property="Foreground">
            <Setter.Value>
                <DrawingBrush
                    Stretch="None"
                    TileMode="Tile"
                    Viewport="0,0,20,32"
                    ViewportUnits="Absolute">
                    <DrawingBrush.Transform>
                        <TransformGroup>
                            <RotateTransform Angle="20" />
                            <TranslateTransform x:Name="MyTransform" X="0" />
                        </TransformGroup>
                    </DrawingBrush.Transform>
                    <DrawingBrush.Drawing>
                        <GeometryDrawing>
                            <GeometryDrawing.Brush>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                                    <GradientStop Offset="0" Color="{DynamicResource DarkInfoColor}" />
                                    <GradientStop Offset="0.5" Color="{DynamicResource DarkInfoColor}" />
                                    <GradientStop Offset="0.5" Color="{DynamicResource BackgroundColor}" />
                                    <GradientStop Offset="1" Color="{DynamicResource BackgroundColor}" />
                                </LinearGradientBrush>
                            </GeometryDrawing.Brush>
                            <GeometryDrawing.Geometry>
                                <RectangleGeometry Rect="0,0,20,32" />
                            </GeometryDrawing.Geometry>
                        </GeometryDrawing>
                    </DrawingBrush.Drawing>
                </DrawingBrush>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ProgressBarWarningStripe"
        TargetType="ProgressBar"
        BasedOn="{StaticResource ProgressBarStripeBaseStyle}">
        <Setter Property="Foreground">
            <Setter.Value>
                <DrawingBrush
                    Stretch="None"
                    TileMode="Tile"
                    Viewport="0,0,20,32"
                    ViewportUnits="Absolute">
                    <DrawingBrush.Transform>
                        <TransformGroup>
                            <RotateTransform Angle="20" />
                            <TranslateTransform x:Name="MyTransform" X="0" />
                        </TransformGroup>
                    </DrawingBrush.Transform>
                    <DrawingBrush.Drawing>
                        <GeometryDrawing>
                            <GeometryDrawing.Brush>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                                    <GradientStop Offset="0" Color="{DynamicResource DarkWarningColor}" />
                                    <GradientStop Offset="0.5" Color="{DynamicResource DarkWarningColor}" />
                                    <GradientStop Offset="0.5" Color="{DynamicResource BackgroundColor}" />
                                    <GradientStop Offset="1" Color="{DynamicResource BackgroundColor}" />
                                </LinearGradientBrush>
                            </GeometryDrawing.Brush>
                            <GeometryDrawing.Geometry>
                                <RectangleGeometry Rect="0,0,20,32" />
                            </GeometryDrawing.Geometry>
                        </GeometryDrawing>
                    </DrawingBrush.Drawing>
                </DrawingBrush>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ProgressBarDangerStripe"
        TargetType="ProgressBar"
        BasedOn="{StaticResource ProgressBarStripeBaseStyle}">
        <Setter Property="Foreground">
            <Setter.Value>
                <DrawingBrush
                    Stretch="None"
                    TileMode="Tile"
                    Viewport="0,0,20,32"
                    ViewportUnits="Absolute">
                    <DrawingBrush.Transform>
                        <TransformGroup>
                            <RotateTransform Angle="20" />
                            <TranslateTransform x:Name="MyTransform" X="0" />
                        </TransformGroup>
                    </DrawingBrush.Transform>
                    <DrawingBrush.Drawing>
                        <GeometryDrawing>
                            <GeometryDrawing.Brush>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                                    <GradientStop Offset="0" Color="{DynamicResource DarkDangerColor}" />
                                    <GradientStop Offset="0.5" Color="{DynamicResource DarkDangerColor}" />
                                    <GradientStop Offset="0.5" Color="{DynamicResource BackgroundColor}" />
                                    <GradientStop Offset="1" Color="{DynamicResource BackgroundColor}" />
                                </LinearGradientBrush>
                            </GeometryDrawing.Brush>
                            <GeometryDrawing.Geometry>
                                <RectangleGeometry Rect="0,0,20,32" />
                            </GeometryDrawing.Geometry>
                        </GeometryDrawing>
                    </DrawingBrush.Drawing>
                </DrawingBrush>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:CircleProgressBar" BasedOn="{StaticResource ProgressBarCircleBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="ProgressBarSuccessCircle"
        TargetType="hc:CircleProgressBar"
        BasedOn="{StaticResource ProgressBarCircleBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style
        x:Key="ProgressBarInfoCircle"
        TargetType="hc:CircleProgressBar"
        BasedOn="{StaticResource ProgressBarCircleBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="ProgressBarWarningCircle"
        TargetType="hc:CircleProgressBar"
        BasedOn="{StaticResource ProgressBarCircleBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="ProgressBarDangerCircle"
        TargetType="hc:CircleProgressBar"
        BasedOn="{StaticResource ProgressBarCircleBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style TargetType="hc:WaveProgressBar" BasedOn="{StaticResource ProgressBarWaveBaseStyle}">
        <Setter Property="WaveFill" Value="{DynamicResource DarkPrimaryBrush}" />
    </Style>
    <Style
        x:Key="ProgressBarSuccessWave"
        TargetType="hc:WaveProgressBar"
        BasedOn="{StaticResource ProgressBarWaveBaseStyle}">
        <Setter Property="WaveFill" Value="{DynamicResource DarkSuccessBrush}" />
    </Style>
    <Style
        x:Key="ProgressBarInfoWave"
        TargetType="hc:WaveProgressBar"
        BasedOn="{StaticResource ProgressBarWaveBaseStyle}">
        <Setter Property="WaveFill" Value="{DynamicResource DarkInfoBrush}" />
    </Style>
    <Style
        x:Key="ProgressBarWarningWave"
        TargetType="hc:WaveProgressBar"
        BasedOn="{StaticResource ProgressBarWaveBaseStyle}">
        <Setter Property="WaveFill" Value="{DynamicResource DarkWarningBrush}" />
    </Style>
    <Style
        x:Key="ProgressBarDangerWave"
        TargetType="hc:WaveProgressBar"
        BasedOn="{StaticResource ProgressBarWaveBaseStyle}">
        <Setter Property="WaveFill" Value="{DynamicResource DarkDangerBrush}" />
    </Style>
    <Style x:Key="ProgressBarFlat" TargetType="ProgressBar">
        <Setter Property="Height" Value="4" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ProgressBar">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="IsIndeterminate" 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>
                    </ControlTemplate.Resources>
                    <hc:SimplePanel
                        x:Name="TemplateRoot"
                        ClipToBounds="True"
                        SnapsToDevicePixels="true">
                        <Rectangle
                            x:Name="PART_Track"
                            Fill="{TemplateBinding Background}"
                            Stroke="{TemplateBinding BorderBrush}"
                            StrokeThickness="0" />
                        <Decorator x:Name="PART_Indicator" HorizontalAlignment="Left">
                            <Rectangle x:Name="Indicator" Fill="{TemplateBinding Foreground}" />
                        </Decorator>
                        <Rectangle
                            x:Name="Animation"
                            Fill="{TemplateBinding Foreground}"
                            RenderTransformOrigin="0.5,0.5"
                            Visibility="Collapsed">
                            <Rectangle.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform />
                                </TransformGroup>
                            </Rectangle.RenderTransform>
                        </Rectangle>
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsIndeterminate" Value="true">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource IsIndeterminate}" />
                            </Trigger.EnterActions>
                            <Setter TargetName="Indicator" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="Animation" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="Orientation" Value="Vertical">
                            <Setter Property="Height" Value="{x:Static system:Double.NaN}" />
                            <Setter TargetName="TemplateRoot" Property="LayoutTransform">
                                <Setter.Value>
                                    <RotateTransform Angle="-90" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="CheckBox" BasedOn="{StaticResource CheckBoxBaseStyle}" />
    <Style TargetType="RadioButton" BasedOn="{StaticResource RadioButtonBaseStyle}" />
    <Style
        x:Key="RadioButtonSameAsButtonDefault"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioButtonSameAsButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="RadioButtonSameAsButtonDefault.Small"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioButtonSameAsButtonDefault}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RadioButtonSameAsButtonPrimary"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioButtonSameAsButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="RadioButtonSameAsButtonPrimary.Small"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioButtonSameAsButtonPrimary}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RadioButtonSameAsButtonSuccess"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioButtonSameAsButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource SuccessBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style
        x:Key="RadioButtonSameAsButtonSuccess.Small"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioButtonSameAsButtonSuccess}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RadioButtonSameAsButtonInfo"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioButtonSameAsButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource InfoBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="RadioButtonSameAsButtonInfo.Small"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioButtonSameAsButtonInfo}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RadioButtonSameAsButtonWarning"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioButtonSameAsButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource WarningBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="RadioButtonSameAsButtonWarning.Small"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioButtonSameAsButtonWarning}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RadioButtonSameAsButtonDanger"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioButtonSameAsButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource DangerBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style
        x:Key="RadioButtonSameAsButtonDanger.Small"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioButtonSameAsButtonDanger}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RadioButtonIcon"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioButtonIconBaseStyle}" />
    <Style
        x:Key="RadioButtonIcon.Small"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioButtonIcon}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="RadioGroupItemDefault"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioGroupItemBaseStyle}" />
    <Style
        x:Key="RadioGroupItemHorizontalFirst"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioGroupItemBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="4,0,0,4" />
        <Setter Property="Margin" Value="0" />
    </Style>
    <Style
        x:Key="RadioGroupItemHorizontalLast"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioGroupItemBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="0,4,4,0" />
    </Style>
    <Style
        x:Key="RadioGroupItemSingle"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioGroupItemBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
    </Style>
    <Style
        x:Key="RadioGroupItemVerticalFirst"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioGroupItemBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="4,4,0,0" />
        <Setter Property="Margin" Value="0" />
    </Style>
    <Style
        x:Key="RadioGroupItemVerticalLast"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioGroupItemBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="0,0,4,4" />
    </Style>
    <Style TargetType="ResizeGrip">
        <Setter Property="MinWidth" Value="11" />
        <Setter Property="MinHeight" Value="11" />
        <Setter Property="Width" Value="11" />
        <Setter Property="Height" Value="11" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ResizeGrip">
                    <hc:SimplePanel Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                        <Path
                            Width="11"
                            Height="11"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Bottom"
                            Data="M 9,0 L 11,0 L 11,11 L 0,11 L 0,9 L 3,9 L 3,6 L 6,6 L 6,3 L 9,3 z">
                            <Path.Fill>
                                <DrawingBrush
                                    TileMode="Tile"
                                    Viewbox="0,0,3,3"
                                    ViewboxUnits="Absolute"
                                    Viewport="0,0,3,3"
                                    ViewportUnits="Absolute">
                                    <DrawingBrush.Drawing>
                                        <DrawingGroup>
                                            <GeometryDrawing Brush="{StaticResource ResizeGripperForeground}">
                                                <GeometryDrawing.Geometry>
                                                    <RectangleGeometry Rect="0,0,2,2" />
                                                </GeometryDrawing.Geometry>
                                            </GeometryDrawing>
                                        </DrawingGroup>
                                    </DrawingBrush.Drawing>
                                </DrawingBrush>
                            </Path.Fill>
                        </Path>
                    </hc:SimplePanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="Window">
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="UseLayoutRounding" Value="True" />
    </Style>
    <ControlTemplate x:Key="WindowWin10Template" TargetType="hc:Window">
        <Border
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            SnapsToDevicePixels="True">
            <Grid Margin="{TemplateBinding Padding}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Grid
                    Name="PART_NonClientArea"
                    Background="{TemplateBinding NonClientAreaBackground}"
                    TextElement.Foreground="{TemplateBinding NonClientAreaForeground}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <StackPanel
                        Name="ButtonPanel"
                        Grid.Column="1"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Top"
                        Orientation="Horizontal"
                        UseLayoutRounding="True"
                        WindowChrome.IsHitTestVisibleInChrome="True">
                        <Button
                            Name="ButtonMin"
                            Width="45"
                            Height="29"
                            hc:IconElement.Geometry="{StaticResource WindowMinGeometry}"
                            hc:IconElement.Height="10"
                            hc:IconElement.Width="10"
                            Background="{TemplateBinding OtherButtonBackground}"
                            BorderThickness="1,0,1,0"
                            Command="SystemCommands.MinimizeWindowCommand"
                            Foreground="{TemplateBinding OtherButtonForeground}"
                            IsTabStop="False"
                            Style="{StaticResource ButtonIcon}" />
                        <Button
                            Name="ButtonMax"
                            Width="46"
                            Height="29"
                            hc:IconElement.Geometry="{StaticResource WindowMaxGeometry}"
                            hc:IconElement.Height="10"
                            hc:IconElement.Width="10"
                            Background="{TemplateBinding OtherButtonBackground}"
                            BorderThickness="1,0,1,0"
                            Command="SystemCommands.MaximizeWindowCommand"
                            Foreground="{TemplateBinding OtherButtonForeground}"
                            IsTabStop="False"
                            Style="{StaticResource ButtonIcon}" />
                        <Button
                            Name="ButtonRestore"
                            Width="46"
                            Height="29"
                            hc:IconElement.Geometry="{StaticResource WindowRestoreGeometry}"
                            hc:IconElement.Height="10"
                            hc:IconElement.Width="10"
                            Background="{TemplateBinding OtherButtonBackground}"
                            BorderThickness="1,0,1,0"
                            Command="SystemCommands.RestoreWindowCommand"
                            Foreground="{TemplateBinding OtherButtonForeground}"
                            IsTabStop="False"
                            Style="{StaticResource ButtonIcon}" />
                        <Button
                            Name="ButtonClose"
                            Width="46"
                            Height="29"
                            hc:IconElement.Geometry="{StaticResource CloseGeometry}"
                            hc:IconElement.Height="10"
                            hc:IconElement.Width="10"
                            Background="{TemplateBinding CloseButtonBackground}"
                            BorderThickness="1,0,0,0"
                            Command="SystemCommands.CloseWindowCommand"
                            Foreground="{TemplateBinding CloseButtonForeground}"
                            IsTabStop="False"
                            Style="{StaticResource ButtonIcon}" />
                    </StackPanel>
                    <Grid Grid.Column="0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Button
                            Name="ButtonIcon"
                            Margin="10,0,0,0"
                            VerticalAlignment="Center"
                            Background="Transparent"
                            Command="{x:Static SystemCommands.ShowSystemMenuCommand}"
                            Style="{StaticResource ButtonCustom}"
                            Visibility="{TemplateBinding Icon,
                                                         Converter={StaticResource Object2VisibilityConverter}}"
                            WindowChrome.IsHitTestVisibleInChrome="True">
                            <interactivity:Interaction.Triggers>
                                <interactivity:EventTrigger EventName="MouseDoubleClick">
                                    <interactivity:InvokeCommandAction Command="{x:Static SystemCommands.CloseWindowCommand}" />
                                </interactivity:EventTrigger>
                            </interactivity:Interaction.Triggers>
                            <Image
                                Width="16"
                                Height="16"
                                VerticalAlignment="Center"
                                IsHitTestVisible="False"
                                Source="{TemplateBinding Icon}" />
                        </Button>
                        <TextBlock
                            Grid.Column="1"
                            Padding="10,0,0,0"
                            VerticalAlignment="Center"
                            Text="{TemplateBinding Title}">
                            <TextBlock.Visibility>
                                <MultiBinding Converter="{StaticResource BooleanArr2VisibilityConverter}">
                                    <MultiBinding.Bindings>
                                        <Binding Path="ShowTitle" RelativeSource="{RelativeSource TemplatedParent}" />
                                        <Binding
                                            Converter="{StaticResource Object2BooleanConverter}"
                                            Path="Title"
                                            RelativeSource="{RelativeSource TemplatedParent}" />
                                    </MultiBinding.Bindings>
                                </MultiBinding>
                            </TextBlock.Visibility>
                        </TextBlock>
                        <ContentPresenter
                            x:Name="ContentPresenterMain"
                            Grid.Column="2"
                            Content="{TemplateBinding NonClientAreaContent}"
                            WindowChrome.IsHitTestVisibleInChrome="True" />
                    </Grid>
                </Grid>
                <AdornerDecorator Grid.Row="1">
                    <ContentPresenter ClipToBounds="True" />
                </AdornerDecorator>
                <ResizeGrip
                    x:Name="ResizeGrip"
                    Grid.Row="1"
                    Width="10"
                    Height="10"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Bottom"
                    IsTabStop="False"
                    Visibility="Collapsed"
                    WindowChrome.ResizeGripDirection="BottomRight" />
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsActive" Value="False">
                <Setter TargetName="ContentPresenterMain" Property="Opacity" Value=".8" />
                <Setter TargetName="ButtonPanel" Property="Opacity" Value=".8" />
            </Trigger>
            <Trigger Property="WindowState" Value="Maximized">
                <Setter TargetName="ButtonMax" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="ButtonRestore" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="WindowState" Value="Normal">
                <Setter TargetName="ButtonMax" Property="Visibility" Value="Visible" />
                <Setter TargetName="ButtonRestore" Property="Visibility" Value="Collapsed" />
            </Trigger>
            <Trigger Property="ResizeMode" Value="NoResize">
                <Setter TargetName="ButtonMin" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="ButtonMax" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="ButtonRestore" Property="Visibility" Value="Collapsed" />
            </Trigger>
            <Trigger Property="ResizeMode" Value="CanMinimize">
                <Setter TargetName="ButtonMax" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="ButtonRestore" Property="Visibility" Value="Collapsed" />
            </Trigger>
            <Trigger SourceName="ButtonClose" Property="IsMouseOver" Value="True">
                <Setter TargetName="ButtonClose" Property="Background" Value="{Binding CloseButtonHoverBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                <Setter TargetName="ButtonClose" Property="Foreground" Value="{Binding CloseButtonHoverForeground, RelativeSource={RelativeSource TemplatedParent}}" />
            </Trigger>
            <Trigger SourceName="ButtonMax" Property="IsMouseOver" Value="True">
                <Setter TargetName="ButtonMax" Property="Background" Value="{Binding OtherButtonHoverBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                <Setter TargetName="ButtonMax" Property="Foreground" Value="{Binding OtherButtonHoverForeground, RelativeSource={RelativeSource TemplatedParent}}" />
            </Trigger>
            <Trigger SourceName="ButtonRestore" Property="IsMouseOver" Value="True">
                <Setter TargetName="ButtonRestore" Property="Background" Value="{Binding OtherButtonHoverBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                <Setter TargetName="ButtonRestore" Property="Foreground" Value="{Binding OtherButtonHoverForeground, RelativeSource={RelativeSource TemplatedParent}}" />
            </Trigger>
            <Trigger SourceName="ButtonMin" Property="IsMouseOver" Value="True">
                <Setter TargetName="ButtonMin" Property="Background" Value="{Binding OtherButtonHoverBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                <Setter TargetName="ButtonMin" Property="Foreground" Value="{Binding OtherButtonHoverForeground, RelativeSource={RelativeSource TemplatedParent}}" />
            </Trigger>
            <Trigger Property="WindowStyle" Value="None">
                <Setter Property="ShowNonClientArea" Value="False" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="ResizeMode" Value="CanResizeWithGrip" />
                    <Condition Property="WindowState" Value="Normal" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ResizeGrip" Property="Visibility" Value="Visible" />
            </MultiTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="WindowWin10ExtendContentToNonClientTemplate" TargetType="hc:Window">
        <Border
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            SnapsToDevicePixels="True">
            <hc:SimplePanel Margin="{TemplateBinding Padding}">
                <AdornerDecorator>
                    <hc:SimplePanel>
                        <ContentPresenter ClipToBounds="True" />
                        <Grid
                            Name="PART_NonClientArea"
                            VerticalAlignment="Top"
                            Background="{TemplateBinding NonClientAreaBackground}"
                            TextElement.Foreground="{TemplateBinding NonClientAreaForeground}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <StackPanel
                                Name="ButtonPanel"
                                Grid.Column="1"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"
                                UseLayoutRounding="True"
                                WindowChrome.IsHitTestVisibleInChrome="True">
                                <Button
                                    Name="ButtonMin"
                                    Width="45"
                                    Height="29"
                                    hc:IconElement.Geometry="{StaticResource WindowMinGeometry}"
                                    hc:IconElement.Height="10"
                                    hc:IconElement.Width="10"
                                    Background="{TemplateBinding OtherButtonBackground}"
                                    BorderThickness="1,0,1,0"
                                    Command="SystemCommands.MinimizeWindowCommand"
                                    Foreground="{TemplateBinding OtherButtonForeground}"
                                    IsTabStop="False"
                                    Style="{StaticResource ButtonIcon}" />
                                <Button
                                    Name="ButtonMax"
                                    Width="46"
                                    Height="29"
                                    hc:IconElement.Geometry="{StaticResource WindowMaxGeometry}"
                                    hc:IconElement.Height="10"
                                    hc:IconElement.Width="10"
                                    Background="{TemplateBinding OtherButtonBackground}"
                                    BorderThickness="1,0,1,0"
                                    Command="SystemCommands.MaximizeWindowCommand"
                                    Foreground="{TemplateBinding OtherButtonForeground}"
                                    IsTabStop="False"
                                    Style="{StaticResource ButtonIcon}" />
                                <Button
                                    Name="ButtonRestore"
                                    Width="46"
                                    Height="29"
                                    hc:IconElement.Geometry="{StaticResource WindowRestoreGeometry}"
                                    hc:IconElement.Height="10"
                                    hc:IconElement.Width="10"
                                    Background="{TemplateBinding OtherButtonBackground}"
                                    BorderThickness="1,0,1,0"
                                    Command="SystemCommands.RestoreWindowCommand"
                                    Foreground="{TemplateBinding OtherButtonForeground}"
                                    IsTabStop="False"
                                    Style="{StaticResource ButtonIcon}" />
                                <Button
                                    Name="ButtonClose"
                                    Width="46"
                                    Height="29"
                                    hc:IconElement.Geometry="{StaticResource CloseGeometry}"
                                    hc:IconElement.Height="10"
                                    hc:IconElement.Width="10"
                                    Background="{TemplateBinding CloseButtonBackground}"
                                    BorderThickness="1,0,0,0"
                                    Command="SystemCommands.CloseWindowCommand"
                                    Foreground="{TemplateBinding CloseButtonForeground}"
                                    IsTabStop="False"
                                    Style="{StaticResource ButtonIcon}" />
                            </StackPanel>
                            <Grid Grid.Column="0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <Button
                                    Name="ButtonIcon"
                                    Margin="10,0,0,0"
                                    VerticalAlignment="Center"
                                    Background="Transparent"
                                    Command="{x:Static SystemCommands.ShowSystemMenuCommand}"
                                    Style="{StaticResource ButtonCustom}"
                                    Visibility="{TemplateBinding Icon,
                                                                 Converter={StaticResource Object2VisibilityConverter}}"
                                    WindowChrome.IsHitTestVisibleInChrome="True">
                                    <interactivity:Interaction.Triggers>
                                        <interactivity:EventTrigger EventName="MouseDoubleClick">
                                            <interactivity:InvokeCommandAction Command="{x:Static SystemCommands.CloseWindowCommand}" />
                                        </interactivity:EventTrigger>
                                    </interactivity:Interaction.Triggers>
                                    <Image
                                        Width="16"
                                        Height="16"
                                        VerticalAlignment="Center"
                                        IsHitTestVisible="False"
                                        Source="{TemplateBinding Icon}" />
                                </Button>
                                <TextBlock
                                    Grid.Column="1"
                                    Padding="10,0,0,0"
                                    VerticalAlignment="Center"
                                    Text="{TemplateBinding Title}">
                                    <TextBlock.Visibility>
                                        <MultiBinding Converter="{StaticResource BooleanArr2VisibilityConverter}">
                                            <MultiBinding.Bindings>
                                                <Binding Path="ShowTitle" RelativeSource="{RelativeSource TemplatedParent}" />
                                                <Binding
                                                    Converter="{StaticResource Object2BooleanConverter}"
                                                    Path="Title"
                                                    RelativeSource="{RelativeSource TemplatedParent}" />
                                            </MultiBinding.Bindings>
                                        </MultiBinding>
                                    </TextBlock.Visibility>
                                </TextBlock>
                            </Grid>
                        </Grid>
                    </hc:SimplePanel>
                </AdornerDecorator>
                <ResizeGrip
                    x:Name="ResizeGrip"
                    Grid.Row="1"
                    Width="10"
                    Height="10"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Bottom"
                    IsTabStop="False"
                    Visibility="Collapsed"
                    WindowChrome.ResizeGripDirection="BottomRight" />
            </hc:SimplePanel>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsActive" Value="False">
                <Setter TargetName="ButtonPanel" Property="Opacity" Value=".8" />
            </Trigger>
            <Trigger Property="WindowState" Value="Maximized">
                <Setter TargetName="ButtonMax" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="ButtonRestore" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="WindowState" Value="Normal">
                <Setter TargetName="ButtonMax" Property="Visibility" Value="Visible" />
                <Setter TargetName="ButtonRestore" Property="Visibility" Value="Collapsed" />
            </Trigger>
            <Trigger Property="ResizeMode" Value="NoResize">
                <Setter TargetName="ButtonMin" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="ButtonMax" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="ButtonRestore" Property="Visibility" Value="Collapsed" />
            </Trigger>
            <Trigger Property="ResizeMode" Value="CanMinimize">
                <Setter TargetName="ButtonMax" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="ButtonRestore" Property="Visibility" Value="Collapsed" />
            </Trigger>
            <Trigger SourceName="ButtonClose" Property="IsMouseOver" Value="True">
                <Setter TargetName="ButtonClose" Property="Background" Value="{Binding CloseButtonHoverBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                <Setter TargetName="ButtonClose" Property="Foreground" Value="{Binding CloseButtonHoverForeground, RelativeSource={RelativeSource TemplatedParent}}" />
            </Trigger>
            <Trigger SourceName="ButtonMax" Property="IsMouseOver" Value="True">
                <Setter TargetName="ButtonMax" Property="Background" Value="{Binding OtherButtonHoverBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                <Setter TargetName="ButtonMax" Property="Foreground" Value="{Binding OtherButtonHoverForeground, RelativeSource={RelativeSource TemplatedParent}}" />
            </Trigger>
            <Trigger SourceName="ButtonRestore" Property="IsMouseOver" Value="True">
                <Setter TargetName="ButtonRestore" Property="Background" Value="{Binding OtherButtonHoverBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                <Setter TargetName="ButtonRestore" Property="Foreground" Value="{Binding OtherButtonHoverForeground, RelativeSource={RelativeSource TemplatedParent}}" />
            </Trigger>
            <Trigger SourceName="ButtonMin" Property="IsMouseOver" Value="True">
                <Setter TargetName="ButtonMin" Property="Background" Value="{Binding OtherButtonHoverBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                <Setter TargetName="ButtonMin" Property="Foreground" Value="{Binding OtherButtonHoverForeground, RelativeSource={RelativeSource TemplatedParent}}" />
            </Trigger>
            <Trigger Property="WindowStyle" Value="None">
                <Setter Property="ShowNonClientArea" Value="False" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="ResizeMode" Value="CanResizeWithGrip" />
                    <Condition Property="WindowState" Value="Normal" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ResizeGrip" Property="Visibility" Value="Visible" />
            </MultiTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="WindowWin10" TargetType="hc:Window">
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="#262e2f" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="UseLayoutRounding" Value="True" />
        <Setter Property="NonClientAreaBackground" Value="{DynamicResource RegionBrush}" />
        <Setter Property="NonClientAreaForeground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="CloseButtonBackground" Value="Transparent" />
        <Setter Property="CloseButtonForeground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="CloseButtonHoverBackground" Value="#e81123" />
        <Setter Property="CloseButtonHoverForeground" Value="White" />
        <Setter Property="OtherButtonBackground" Value="Transparent" />
        <Setter Property="OtherButtonForeground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="OtherButtonHoverBackground" Value="{DynamicResource DarkMaskBrush}" />
        <Setter Property="OtherButtonHoverForeground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Template" Value="{StaticResource WindowWin10Template}" />
        <Style.Triggers>
            <Trigger Property="hc:WindowAttach.ExtendContentToNonClientArea" Value="true">
                <Setter Property="Template" Value="{StaticResource WindowWin10ExtendContentToNonClientTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="WindowBlur"
        TargetType="hc:BlurWindow"
        BasedOn="{StaticResource WindowWin10}">
        <Setter Property="Background" Value="Transparent" />
    </Style>
    <Style
        x:Key="WindowGlow"
        TargetType="hc:GlowWindow"
        BasedOn="{StaticResource WindowWin10}">
        <Setter Property="ActiveGlowColor" Value="#262e2f" />
        <Setter Property="InactiveGlowColor" Value="{DynamicResource BorderColor}" />
        <Setter Property="BorderThickness" Value="0" />
    </Style>
    <Style TargetType="hc:ImageBrowser">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="MinWidth" Value="400" />
        <Setter Property="MinHeight" Value="250" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="Black" />
        <Setter Property="ResizeMode" Value="NoResize" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:ImageBrowser">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="Storyboard1">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_PanelTop" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:.1" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="Storyboard2">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_PanelTop" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:.4" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <hc:ImageViewer
                            x:Name="PART_ImageViewer"
                            Background="#dd000000"
                            BorderThickness="0"
                            ShowImgMap="True" />
                        <hc:SimplePanel
                            x:Name="PART_PanelTop"
                            Grid.Row="0"
                            VerticalAlignment="Top"
                            Background="{DynamicResource DarkOpacityBrush}"
                            Opacity="0">
                            <StackPanel
                                HorizontalAlignment="Left"
                                VerticalAlignment="Center"
                                Orientation="Horizontal">
                                <TextBlock
                                    Margin="10,0,0,0"
                                    Foreground="White"
                                    Text="{Binding ImgPath, ElementName=PART_ImageViewer}" />
                                <TextBlock
                                    Margin="30,0,0,0"
                                    Foreground="White"
                                    Text="{Binding ImgSize, ElementName=PART_ImageViewer, Converter={StaticResource Long2FileSizeConverter}}" />
                            </StackPanel>
                            <Button
                                Width="40"
                                Height="40"
                                Padding="14"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Top"
                                hc:IconElement.Geometry="{StaticResource DeleteGeometry}"
                                Background="Red"
                                Command="interactivity:ControlCommands.Close"
                                Foreground="{DynamicResource TextIconBrush}"
                                Style="{StaticResource ButtonIcon}"
                                WindowChrome.IsHitTestVisibleInChrome="True" />
                        </hc:SimplePanel>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger SourceName="PART_ImageViewer" Property="ShowCloseButton" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource Storyboard1}" />
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource Storyboard2}" />
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsFullScreen" Value="True">
                <Setter Property="WindowState" Value="Maximized" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="TagBaseStyle"
        TargetType="hc:Tag"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Height" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="hc:TitleElement.Foreground" Value="{DynamicResource TextIconBrush}" />
        <Setter Property="ShowCloseButton" Value="{Binding Path=(hc:TagContainer.ShowCloseButton), RelativeSource={RelativeSource AncestorType=hc:TagContainer}}" />
        <Setter Property="FocusVisualStyle">
            <Setter.Value>
                <Style>
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle Style="{StaticResource RectangleFocusVisualCircular}" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Tag">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        SnapsToDevicePixels="true"
                        Style="{StaticResource BorderCircular}">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Border
                                Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
                                Background="{Binding Path=(hc:TitleElement.Background), RelativeSource={RelativeSource TemplatedParent}}"
                                BorderBrush="{Binding Path=(hc:TitleElement.BorderBrush), RelativeSource={RelativeSource TemplatedParent}}"
                                Style="{StaticResource BorderCircularClip}"
                                Visibility="{Binding HasHeader, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}">
                                <ContentPresenter
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    ContentSource="Header"
                                    ContentStringFormat="{TemplateBinding HeaderStringFormat}"
                                    ContentTemplate="{TemplateBinding HeaderTemplate}"
                                    ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
                                    TextElement.Foreground="{Binding Path=(hc:TitleElement.Foreground), RelativeSource={RelativeSource TemplatedParent}}" />
                            </Border>
                            <ContentPresenter
                                Grid.Column="1"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            <Button
                                Name="ButtonClose"
                                Grid.Column="2"
                                Width="16"
                                Margin="0,0,6,0"
                                Padding="0"
                                hc:IconElement.Geometry="{StaticResource DeleteGeometry}"
                                hc:IconElement.Width="8"
                                BorderThickness="0"
                                Command="interactivity:ControlCommands.Close"
                                Focusable="False"
                                Foreground="{TemplateBinding Foreground}"
                                Style="{StaticResource ButtonIcon}"
                                Visibility="{TemplateBinding ShowCloseButton,
                                                             Converter={StaticResource Boolean2VisibilityConverter}}" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger SourceName="ButtonClose" Property="IsMouseOver" Value="True">
                            <Setter TargetName="ButtonClose" Property="hc:IconElement.Geometry" Value="{StaticResource DeleteFillCircleGeometry}" />
                            <Setter TargetName="ButtonClose" Property="hc:IconElement.Width" Value="14" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource DarkMaskBrush}" />
            </Trigger>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="TagContainerBaseStyle"
        TargetType="hc:TagContainer"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource TagBaseStyle}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <WrapPanel hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:TagContainer">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <hc:ScrollViewer Focusable="false">
                            <ItemsPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </hc:ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="ComboBoxTemplate" TargetType="ComboBox">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Border
                x:Name="border"
                Grid.ColumnSpan="2"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
            <hc:ToggleBlock
                Grid.Column="1"
                Padding="1,0"
                HorizontalContentAlignment="Stretch"
                VerticalContentAlignment="Stretch"
                Background="Transparent"
                IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                <hc:ToggleBlock.UnCheckedContent>
                    <Path
                        Width="14"
                        Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Data="{StaticResource DownGeometry}"
                        Fill="{TemplateBinding BorderBrush}"
                        Stretch="Uniform" />
                </hc:ToggleBlock.UnCheckedContent>
                <hc:ToggleBlock.CheckedContent>
                    <Path
                        Width="14"
                        Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Data="{StaticResource UpGeometry}"
                        Fill="{TemplateBinding BorderBrush}"
                        Stretch="Uniform" />
                </hc:ToggleBlock.CheckedContent>
            </hc:ToggleBlock>
            <hc:ToggleBlock
                Grid.Column="0"
                Grid.ColumnSpan="2"
                HorizontalContentAlignment="Stretch"
                VerticalContentAlignment="Stretch"
                Background="Transparent"
                IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                ToggleGesture="LeftClick" />
            <ContentPresenter
                x:Name="contentPresenter"
                Grid.Column="0"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                Content="{TemplateBinding SelectionBoxItem}"
                ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
                ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                IsHitTestVisible="false"
                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
            <Popup
                x:Name="PART_Popup"
                Margin="1"
                AllowsTransparency="true"
                IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                Placement="Bottom"
                PlacementTarget="{Binding ElementName=border}"
                PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                <Decorator Margin="8,0">
                    <Border
                        x:Name="dropDownBorder"
                        MinWidth="{Binding ActualWidth, ElementName=border}"
                        MaxHeight="{TemplateBinding MaxDropDownHeight}"
                        Margin="0,0,0,8"
                        Background="{DynamicResource RegionBrush}"
                        BorderBrush="{DynamicResource BorderBrush}"
                        BorderThickness="0,1,0,0"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        Effect="{StaticResource EffectShadow2}">
                        <hc:ToggleBlock
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Stretch"
                            IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <hc:ToggleBlock.CheckedContent>
                                <ScrollViewer Margin="2">
                                    <ItemsPresenter
                                        x:Name="ItemsPresenter"
                                        KeyboardNavigation.DirectionalNavigation="Contained"
                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                </ScrollViewer>
                            </hc:ToggleBlock.CheckedContent>
                            <hc:ToggleBlock.UnCheckedContent>
                                <hc:Empty />
                            </hc:ToggleBlock.UnCheckedContent>
                        </hc:ToggleBlock>
                    </Border>
                </Decorator>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.AutoWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{x:Static system:Double.MaxValue}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualHeight, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ComboBoxTopTemplate" TargetType="ComboBox">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="contentPanel" Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <TextBlock
                    Grid.Column="0"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <hc:ToggleBlock
                    Grid.Column="1"
                    Padding="1,0"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Background="Transparent"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    ToggleGesture="LeftClick">
                    <hc:ToggleBlock.UnCheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource DownGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.UnCheckedContent>
                    <hc:ToggleBlock.CheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource UpGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.CheckedContent>
                </hc:ToggleBlock>
                <hc:ToggleBlock
                    Grid.Column="0"
                    Grid.ColumnSpan="2"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Background="Transparent"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    ToggleGesture="LeftClick" />
                <ContentPresenter
                    x:Name="contentPresenter"
                    Grid.Column="0"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Content="{TemplateBinding SelectionBoxItem}"
                    ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
                    ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                    ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                    IsHitTestVisible="false"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                <Popup
                    x:Name="PART_Popup"
                    Margin="1"
                    AllowsTransparency="true"
                    IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <ScrollViewer Margin="2">
                                        <ItemsPresenter
                                            x:Name="ItemsPresenter"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </ScrollViewer>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.AutoWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{x:Static system:Double.MaxValue}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualHeight, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="contentPanel" Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ComboBoxLeftTemplate" TargetType="ComboBox">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="contentPanel" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <TextBlock
                    Grid.Column="0"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <hc:ToggleBlock
                    Grid.Column="1"
                    Padding="1,0"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Background="Transparent"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    ToggleGesture="LeftClick">
                    <hc:ToggleBlock.UnCheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource DownGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.UnCheckedContent>
                    <hc:ToggleBlock.CheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource UpGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.CheckedContent>
                </hc:ToggleBlock>
                <hc:ToggleBlock
                    Grid.Column="0"
                    Grid.ColumnSpan="2"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Background="Transparent"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    ToggleGesture="LeftClick" />
                <ContentPresenter
                    x:Name="contentPresenter"
                    Grid.Column="0"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Content="{TemplateBinding SelectionBoxItem}"
                    ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
                    ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                    ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                    IsHitTestVisible="false"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                <Popup
                    x:Name="PART_Popup"
                    Margin="1"
                    AllowsTransparency="true"
                    IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <ScrollViewer Margin="2">
                                        <ItemsPresenter
                                            x:Name="ItemsPresenter"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </ScrollViewer>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.AutoWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{x:Static system:Double.MaxValue}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualHeight, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="contentPanel" Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="ComboBoxEditableTextBox" TargetType="TextBox">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="MinWidth" Value="0" />
        <Setter Property="MinHeight" Value="0" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <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="TextBox">
                    <ScrollViewer
                        x:Name="PART_ContentHost"
                        Margin="-2,0,0,0"
                        Padding="{TemplateBinding Padding}"
                        Background="Transparent"
                        Focusable="false"
                        HorizontalScrollBarVisibility="Hidden"
                        VerticalScrollBarVisibility="Hidden" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="ComboBox">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Border
                x:Name="border"
                Grid.ColumnSpan="2"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
            <hc:ToggleBlock
                Grid.Column="1"
                Padding="1,0"
                HorizontalContentAlignment="Stretch"
                VerticalContentAlignment="Stretch"
                Background="Transparent"
                IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                ToggleGesture="LeftClick">
                <hc:ToggleBlock.UnCheckedContent>
                    <Path
                        Width="14"
                        Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Data="{StaticResource DownGeometry}"
                        Fill="{TemplateBinding BorderBrush}"
                        Stretch="Uniform" />
                </hc:ToggleBlock.UnCheckedContent>
                <hc:ToggleBlock.CheckedContent>
                    <Path
                        Width="14"
                        Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Data="{StaticResource UpGeometry}"
                        Fill="{TemplateBinding BorderBrush}"
                        Stretch="Uniform" />
                </hc:ToggleBlock.CheckedContent>
            </hc:ToggleBlock>
            <TextBox
                x:Name="PART_EditableTextBox"
                Grid.Column="0"
                Padding="{TemplateBinding Padding}"
                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                Background="{TemplateBinding Background}"
                IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
                Style="{StaticResource ComboBoxEditableTextBox}" />
            <Popup
                x:Name="PART_Popup"
                Margin="1"
                AllowsTransparency="true"
                IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                Placement="Bottom"
                PlacementTarget="{Binding ElementName=border}"
                PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                <Decorator Margin="8,0">
                    <Border
                        x:Name="dropDownBorder"
                        MinWidth="{Binding ActualWidth, ElementName=border}"
                        MaxHeight="{TemplateBinding MaxDropDownHeight}"
                        Margin="0,0,0,8"
                        Background="{DynamicResource RegionBrush}"
                        BorderBrush="{DynamicResource BorderBrush}"
                        BorderThickness="0,1,0,0"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        Effect="{StaticResource EffectShadow2}">
                        <hc:ToggleBlock
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Stretch"
                            IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <hc:ToggleBlock.CheckedContent>
                                <ScrollViewer Margin="2">
                                    <ItemsPresenter
                                        x:Name="ItemsPresenter"
                                        KeyboardNavigation.DirectionalNavigation="Contained"
                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                </ScrollViewer>
                            </hc:ToggleBlock.CheckedContent>
                            <hc:ToggleBlock.UnCheckedContent>
                                <hc:Empty />
                            </hc:ToggleBlock.UnCheckedContent>
                        </hc:ToggleBlock>
                    </Border>
                </Decorator>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.AutoWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{x:Static system:Double.MaxValue}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualHeight, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_EditableTextBox" Property="IsFocused" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <Trigger SourceName="PART_EditableTextBox" Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ComboBoxEditableTopTemplate" TargetType="ComboBox">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="contentPanel" Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <hc:ToggleBlock
                    Grid.Column="1"
                    Padding="1,0"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Background="Transparent"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    ToggleGesture="LeftClick">
                    <hc:ToggleBlock.UnCheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource DownGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.UnCheckedContent>
                    <hc:ToggleBlock.CheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource UpGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.CheckedContent>
                </hc:ToggleBlock>
                <TextBlock
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <TextBox
                    x:Name="PART_EditableTextBox"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
                    Style="{StaticResource ComboBoxEditableTextBox}" />
                <Popup
                    x:Name="PART_Popup"
                    AllowsTransparency="true"
                    IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <ScrollViewer Margin="2">
                                        <ItemsPresenter
                                            x:Name="ItemsPresenter"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </ScrollViewer>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.AutoWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{x:Static system:Double.MaxValue}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualHeight, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_EditableTextBox" Property="IsFocused" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <Trigger SourceName="PART_EditableTextBox" Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="contentPanel" Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ComboBoxEditableLeftTemplate" TargetType="ComboBox">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="contentPanel" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <hc:ToggleBlock
                    Grid.Column="1"
                    Padding="1,0"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Background="Transparent"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    ToggleGesture="LeftClick">
                    <hc:ToggleBlock.UnCheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource DownGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.UnCheckedContent>
                    <hc:ToggleBlock.CheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource UpGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.CheckedContent>
                </hc:ToggleBlock>
                <TextBlock
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <TextBox
                    x:Name="PART_EditableTextBox"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
                    Style="{StaticResource ComboBoxEditableTextBox}" />
                <Popup
                    x:Name="PART_Popup"
                    AllowsTransparency="true"
                    IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <ScrollViewer Margin="2">
                                        <ItemsPresenter
                                            x:Name="ItemsPresenter"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </ScrollViewer>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.AutoWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{x:Static system:Double.MaxValue}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualHeight, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_EditableTextBox" Property="IsFocused" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <Trigger SourceName="PART_EditableTextBox" Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="contentPanel" Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="ComboBoxItemBaseStyle" TargetType="ComboBoxItem">
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ComboBoxItem">
                    <Border
                        x:Name="Bd"
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <ContentPresenter
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="False" />
                                <Condition Property="IsMouseOver" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource PrimaryBrush}" />
                            <Setter Property="Foreground" Value="White" />
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ComboBoxBaseStyle"
        TargetType="ComboBox"
        BasedOn="{StaticResource InputElementBaseStyle}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource ComboBoxItemBaseStyle}" />
        <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="Template" Value="{StaticResource ComboBoxTemplate}" />
        <Style.Triggers>
            <Trigger Property="IsEditable" Value="true">
                <Setter Property="IsTabStop" Value="false" />
                <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="ComboBoxExtendBaseStyle"
        TargetType="ComboBox"
        BasedOn="{StaticResource ComboBoxBaseStyle}">
        <Setter Property="Height" Value="Auto" />
        <Setter Property="Template" Value="{StaticResource ComboBoxTopTemplate}" />
        <Setter Property="hc:InfoElement.Symbol" Value="●" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="{x:Static system:Double.NaN}" />
        <Setter Property="hc:InfoElement.MinContentHeight" Value="{StaticResource DefaultControlHeight}" />
        <Style.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsEditable" Value="False" />
                    <Condition Property="hc:InfoElement.TitlePlacement" Value="Left" />
                </MultiTrigger.Conditions>
                <Setter Property="Template" Value="{StaticResource ComboBoxLeftTemplate}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsEditable" Value="True" />
                    <Condition Property="hc:InfoElement.TitlePlacement" Value="Top" />
                </MultiTrigger.Conditions>
                <Setter Property="Template" Value="{StaticResource ComboBoxEditableTopTemplate}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsEditable" Value="True" />
                    <Condition Property="hc:InfoElement.TitlePlacement" Value="Left" />
                </MultiTrigger.Conditions>
                <Setter Property="Template" Value="{StaticResource ComboBoxEditableLeftTemplate}" />
            </MultiTrigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="ComboBoxPlusTopTemplate" TargetType="hc:ComboBox">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="contentPanel" Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <TextBlock
                    Grid.Column="0"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <hc:ToggleBlock
                    Grid.Column="2"
                    Padding="1,0"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Background="Transparent"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    ToggleGesture="LeftClick">
                    <hc:ToggleBlock.UnCheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource DownGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.UnCheckedContent>
                    <hc:ToggleBlock.CheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource UpGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.CheckedContent>
                </hc:ToggleBlock>
                <hc:ToggleBlock
                    Grid.Column="0"
                    Grid.ColumnSpan="3"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Background="Transparent"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    ToggleGesture="LeftClick" />
                <ContentPresenter
                    x:Name="contentPresenter"
                    Grid.Column="0"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Content="{TemplateBinding SelectionBoxItem}"
                    ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
                    ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                    ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                    IsHitTestVisible="false"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Popup
                    x:Name="PART_Popup"
                    Margin="1"
                    AllowsTransparency="true"
                    IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <ScrollViewer Margin="2">
                                        <ItemsPresenter
                                            x:Name="ItemsPresenter"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </ScrollViewer>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.AutoWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{x:Static system:Double.MaxValue}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualHeight, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="contentPanel" Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ComboBoxPlusLeftTemplate" TargetType="hc:ComboBox">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="contentPanel" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <TextBlock
                    Grid.Column="0"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <hc:ToggleBlock
                    Grid.Column="2"
                    Padding="1,0"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Background="Transparent"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    ToggleGesture="LeftClick">
                    <hc:ToggleBlock.UnCheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource DownGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.UnCheckedContent>
                    <hc:ToggleBlock.CheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource UpGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.CheckedContent>
                </hc:ToggleBlock>
                <hc:ToggleBlock
                    Grid.Column="0"
                    Grid.ColumnSpan="3"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Background="Transparent"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    ToggleGesture="LeftClick" />
                <ContentPresenter
                    x:Name="contentPresenter"
                    Grid.Column="0"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Content="{TemplateBinding SelectionBoxItem}"
                    ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
                    ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                    ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                    IsHitTestVisible="false"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Popup
                    x:Name="PART_Popup"
                    Margin="1"
                    AllowsTransparency="true"
                    IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <ScrollViewer Margin="2">
                                        <ItemsPresenter
                                            x:Name="ItemsPresenter"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </ScrollViewer>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.AutoWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{x:Static system:Double.MaxValue}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualHeight, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="contentPanel" Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ComboBoxPlusEditableTopTemplate" TargetType="hc:ComboBox">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Grid.ColumnSpan="2"
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="contentPanel" Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <hc:ToggleBlock
                    Grid.Column="2"
                    Padding="1,0"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Background="Transparent"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    ToggleGesture="LeftClick">
                    <hc:ToggleBlock.UnCheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource DownGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.UnCheckedContent>
                    <hc:ToggleBlock.CheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource UpGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.CheckedContent>
                </hc:ToggleBlock>
                <TextBlock
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <TextBox
                    x:Name="PART_EditableTextBox"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
                    Style="{StaticResource ComboBoxEditableTextBox}" />
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Popup
                    x:Name="PART_Popup"
                    AllowsTransparency="true"
                    IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <ScrollViewer Margin="2">
                                        <ItemsPresenter
                                            x:Name="ItemsPresenter"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </ScrollViewer>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.AutoWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{x:Static system:Double.MaxValue}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualHeight, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_EditableTextBox" Property="IsFocused" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_EditableTextBox" Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="contentPanel" Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ComboBoxPlusEditableTopAutoCompleteTemplate" TargetType="hc:ComboBox">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Grid.ColumnSpan="2"
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="contentPanel" Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <hc:ToggleBlock
                    Grid.Column="2"
                    Padding="1,0"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Background="Transparent"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    ToggleGesture="LeftClick">
                    <hc:ToggleBlock.UnCheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource DownGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.UnCheckedContent>
                    <hc:ToggleBlock.CheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource UpGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.CheckedContent>
                </hc:ToggleBlock>
                <TextBlock
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <TextBox
                    x:Name="PART_EditableTextBox"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
                    Style="{StaticResource ComboBoxEditableTextBox}" />
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Popup
                    x:Name="PART_Popup"
                    AllowsTransparency="true"
                    IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <ScrollViewer Margin="2">
                                        <ItemsPresenter
                                            x:Name="ItemsPresenter"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </ScrollViewer>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
                <Popup
                    x:Name="PART_Popup_AutoComplete"
                    AllowsTransparency="true"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder_AutoComplete"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <ScrollViewer Margin="2">
                                        <StackPanel
                                            Name="PART_AutoCompletePanel"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </ScrollViewer>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
                <Setter TargetName="dropDownBorder_AutoComplete" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder_AutoComplete" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder_AutoComplete" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.AutoWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{x:Static system:Double.MaxValue}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualHeight, ElementName=border}" />
                <Setter TargetName="dropDownBorder_AutoComplete" Property="MaxWidth" Value="{x:Static system:Double.MaxValue}" />
                <Setter TargetName="dropDownBorder_AutoComplete" Property="MinWidth" Value="{Binding ActualHeight, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_EditableTextBox" Property="IsFocused" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_EditableTextBox" Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="contentPanel" Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ComboBoxPlusEditableLeftTemplate" TargetType="hc:ComboBox">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="contentPanel" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <hc:ToggleBlock
                    Grid.Column="2"
                    Padding="1,0"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Background="Transparent"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    ToggleGesture="LeftClick">
                    <hc:ToggleBlock.UnCheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource DownGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.UnCheckedContent>
                    <hc:ToggleBlock.CheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource UpGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.CheckedContent>
                </hc:ToggleBlock>
                <TextBlock
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <TextBox
                    x:Name="PART_EditableTextBox"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
                    Style="{StaticResource ComboBoxEditableTextBox}" />
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Popup
                    x:Name="PART_Popup"
                    AllowsTransparency="true"
                    IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <ScrollViewer Margin="2">
                                        <ItemsPresenter
                                            x:Name="ItemsPresenter"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </ScrollViewer>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.AutoWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{x:Static system:Double.MaxValue}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualHeight, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_EditableTextBox" Property="IsFocused" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_EditableTextBox" Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="contentPanel" Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ComboBoxPlusEditableLeftAutoCompleteTemplate" TargetType="hc:ComboBox">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="contentPanel" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <hc:ToggleBlock
                    Grid.Column="2"
                    Padding="1,0"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Background="Transparent"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    ToggleGesture="LeftClick">
                    <hc:ToggleBlock.UnCheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource DownGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.UnCheckedContent>
                    <hc:ToggleBlock.CheckedContent>
                        <Path
                            Width="14"
                            Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Data="{StaticResource UpGeometry}"
                            Fill="{TemplateBinding BorderBrush}"
                            Stretch="Uniform" />
                    </hc:ToggleBlock.CheckedContent>
                </hc:ToggleBlock>
                <TextBlock
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <TextBox
                    x:Name="PART_EditableTextBox"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
                    Style="{StaticResource ComboBoxEditableTextBox}" />
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Popup
                    x:Name="PART_Popup"
                    AllowsTransparency="true"
                    IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <ScrollViewer Margin="2">
                                        <ItemsPresenter
                                            x:Name="ItemsPresenter"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </ScrollViewer>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
                <Popup
                    x:Name="PART_Popup_AutoComplete"
                    AllowsTransparency="true"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder_AutoComplete"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <ScrollViewer Margin="2">
                                        <StackPanel
                                            Name="PART_AutoCompletePanel"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </ScrollViewer>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
                <Setter TargetName="dropDownBorder_AutoComplete" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder_AutoComplete" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder_AutoComplete" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.AutoWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{x:Static system:Double.MaxValue}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualHeight, ElementName=border}" />
                <Setter TargetName="dropDownBorder_AutoComplete" Property="MaxWidth" Value="{x:Static system:Double.MaxValue}" />
                <Setter TargetName="dropDownBorder_AutoComplete" Property="MinWidth" Value="{Binding ActualHeight, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_EditableTextBox" Property="IsFocused" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_EditableTextBox" Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="contentPanel" Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="ComboBoxPlusBaseStyle"
        TargetType="hc:ComboBox"
        BasedOn="{StaticResource ComboBoxExtendBaseStyle}">
        <Setter Property="Template" Value="{StaticResource ComboBoxPlusTopTemplate}" />
        <Style.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsEditable" Value="False" />
                    <Condition Property="hc:InfoElement.TitlePlacement" Value="Left" />
                </MultiTrigger.Conditions>
                <Setter Property="Template" Value="{StaticResource ComboBoxPlusLeftTemplate}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsEditable" Value="True" />
                    <Condition Property="hc:InfoElement.TitlePlacement" Value="Top" />
                </MultiTrigger.Conditions>
                <Setter Property="Template" Value="{StaticResource ComboBoxPlusEditableTopTemplate}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsEditable" Value="True" />
                    <Condition Property="hc:InfoElement.TitlePlacement" Value="Top" />
                    <Condition Property="AutoComplete" Value="True" />
                </MultiTrigger.Conditions>
                <Setter Property="Template" Value="{StaticResource ComboBoxPlusEditableTopAutoCompleteTemplate}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsEditable" Value="True" />
                    <Condition Property="hc:InfoElement.TitlePlacement" Value="Left" />
                </MultiTrigger.Conditions>
                <Setter Property="Template" Value="{StaticResource ComboBoxPlusEditableLeftTemplate}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsEditable" Value="True" />
                    <Condition Property="hc:InfoElement.TitlePlacement" Value="Left" />
                    <Condition Property="AutoComplete" Value="True" />
                </MultiTrigger.Conditions>
                <Setter Property="Template" Value="{StaticResource ComboBoxPlusEditableLeftAutoCompleteTemplate}" />
            </MultiTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="MenuItemBaseStyle" TargetType="MenuItem">
        <Setter Property="Padding" Value="{Binding Path=(hc:MenuAttach.ItemPadding), RelativeSource={RelativeSource AncestorType=MenuBase}}" />
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="hc:ScrollViewer.PanningMode" Value="Both" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Margin" Value="0,0,0,2" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="MenuItem">
                    <Border
                        x:Name="Bd"
                        MinWidth="240"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        SnapsToDevicePixels="True">
                        <Grid x:Name="Grid" Margin="{TemplateBinding Padding}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="26" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="30" />
                                <ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup" />
                                <ColumnDefinition Width="20" />
                            </Grid.ColumnDefinitions>
                            <ContentPresenter
                                x:Name="Icon"
                                Width="16"
                                Height="16"
                                Margin="0,0,10,0"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Center"
                                ContentSource="Icon"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            <Border
                                x:Name="GlyphPanel"
                                Grid.Column="0"
                                Width="16"
                                Height="16"
                                Margin="0,0,10,0"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Center"
                                Background="{DynamicResource PrimaryBrush}"
                                ClipToBounds="False"
                                CornerRadius="2"
                                IsHitTestVisible="False"
                                Visibility="Hidden">
                                <Path
                                    Width="12"
                                    Height="12"
                                    Data="{StaticResource CheckedGeometry}"
                                    Stretch="Uniform"
                                    Stroke="{DynamicResource TextIconBrush}"
                                    StrokeThickness="2"
                                    UseLayoutRounding="True" />
                            </Border>
                            <ContentPresenter
                                x:Name="ContentPresenter"
                                Grid.Column="1"
                                Margin="0,3"
                                ContentSource="Header"
                                ContentStringFormat="{TemplateBinding HeaderStringFormat}"
                                ContentTemplate="{TemplateBinding HeaderTemplate}"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            <TextBlock
                                x:Name="InputGestureText"
                                Grid.Column="3"
                                Margin="0,0,10,0"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Center"
                                Text="{TemplateBinding InputGestureText}" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="Icon" Value="{x:Null}">
                            <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Role" Value="TopLevelHeader">
                <Setter Property="Margin" Value="0" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="MenuItem">
                            <Border
                                x:Name="templateRoot"
                                MinWidth="44"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="1,1,1,0"
                                SnapsToDevicePixels="True">
                                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <ContentPresenter
                                        x:Name="Icon"
                                        Width="16"
                                        Height="16"
                                        Margin="0,0,10,0"
                                        HorizontalAlignment="Right"
                                        VerticalAlignment="Center"
                                        ContentSource="Icon"
                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    <Border
                                        x:Name="GlyphPanel"
                                        Grid.Column="0"
                                        Width="16"
                                        Height="16"
                                        Margin="0,0,10,0"
                                        HorizontalAlignment="Right"
                                        VerticalAlignment="Center"
                                        Background="{DynamicResource PrimaryBrush}"
                                        ClipToBounds="False"
                                        CornerRadius="2"
                                        Visibility="Collapsed">
                                        <Path
                                            Width="12"
                                            Height="12"
                                            Data="{StaticResource CheckedGeometry}"
                                            Stretch="Uniform"
                                            Stroke="{DynamicResource TextIconBrush}"
                                            StrokeThickness="2"
                                            UseLayoutRounding="True" />
                                    </Border>
                                    <ContentPresenter
                                        x:Name="menuHeaderContainer"
                                        Grid.Column="1"
                                        ContentSource="Header"
                                        ContentStringFormat="{TemplateBinding HeaderStringFormat}"
                                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                                        RecognizesAccessKey="True"
                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    <Popup
                                        x:Name="PART_Popup"
                                        Grid.Column="0"
                                        AllowsTransparency="True"
                                        Focusable="False"
                                        IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
                                        Placement="Bottom"
                                        PlacementTarget="{Binding ElementName=templateRoot}">
                                        <hc:SimplePanel Margin="8,0,8,8" Effect="{StaticResource EffectShadow2}">
                                            <Border
                                                x:Name="SubMenuBorder"
                                                Background="{DynamicResource RegionBrush}"
                                                BorderBrush="{DynamicResource BorderBrush}"
                                                BorderThickness="1"
                                                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='0,0,1,1'}">
                                                <ScrollViewer Margin="2,2,2,0" Style="{StaticResource ScrollViewerUpDown}">
                                                    <ItemsPresenter
                                                        x:Name="ItemsPresenter"
                                                        Grid.IsSharedSizeScope="True"
                                                        KeyboardNavigation.DirectionalNavigation="Cycle"
                                                        KeyboardNavigation.TabNavigation="Cycle"
                                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                                </ScrollViewer>
                                            </Border>
                                            <Border
                                                Height="1"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top"
                                                hc:MenuTopLineAttach.Popup="{Binding ElementName=PART_Popup}"
                                                Background="{DynamicResource RegionBrush}"
                                                BorderBrush="{DynamicResource BorderBrush}"
                                                BorderThickness="1,0" />
                                        </hc:SimplePanel>
                                    </Popup>
                                </Grid>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="Icon" Value="{x:Null}">
                                    <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
                                </Trigger>
                                <Trigger Property="IsChecked" Value="True">
                                    <Setter TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
                                    <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
                                </Trigger>
                                <Trigger Property="IsHighlighted" Value="True">
                                    <Setter TargetName="templateRoot" Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
                                    <Setter TargetName="menuHeaderContainer" Property="TextElement.Foreground" Value="{DynamicResource PrimaryTextBrush}" />
                                </Trigger>
                                <Trigger Property="IsSubmenuOpen" Value="True">
                                    <Setter TargetName="templateRoot" Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
                                    <Setter TargetName="templateRoot" Property="Background" Value="{DynamicResource RegionBrush}" />
                                    <Setter TargetName="menuHeaderContainer" Property="TextElement.Foreground" Value="{DynamicResource PrimaryTextBrush}" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger Property="Role" Value="TopLevelItem">
                <Setter Property="Margin" Value="0" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="MenuItem">
                            <Border
                                x:Name="templateRoot"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="1,1,1,0"
                                SnapsToDevicePixels="True">
                                <Grid Margin="{TemplateBinding Padding}">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition />
                                    </Grid.ColumnDefinitions>
                                    <ContentPresenter
                                        x:Name="Icon"
                                        Width="16"
                                        Height="16"
                                        Margin="0,0,10,0"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Center"
                                        ContentSource="Icon"
                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    <Border
                                        x:Name="GlyphPanel"
                                        Grid.Column="0"
                                        Width="16"
                                        Height="16"
                                        Margin="0,0,10,0"
                                        HorizontalAlignment="Right"
                                        VerticalAlignment="Center"
                                        Background="{DynamicResource PrimaryBrush}"
                                        ClipToBounds="False"
                                        CornerRadius="2"
                                        IsHitTestVisible="False"
                                        Visibility="Collapsed">
                                        <Path
                                            Width="12"
                                            Height="12"
                                            Data="{StaticResource CheckedGeometry}"
                                            Stretch="Uniform"
                                            Stroke="{DynamicResource TextIconBrush}"
                                            StrokeThickness="2"
                                            UseLayoutRounding="True" />
                                    </Border>
                                    <ContentPresenter
                                        x:Name="menuHeaderContainer"
                                        Grid.Column="1"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Center"
                                        ContentSource="Header"
                                        ContentStringFormat="{TemplateBinding HeaderStringFormat}"
                                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                                        RecognizesAccessKey="True"
                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                </Grid>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="Icon" Value="{x:Null}">
                                    <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
                                </Trigger>
                                <Trigger Property="IsChecked" Value="True">
                                    <Setter TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
                                    <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
                                </Trigger>
                                <Trigger Property="IsHighlighted" Value="True">
                                    <Setter TargetName="templateRoot" Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
                                    <Setter TargetName="menuHeaderContainer" Property="TextElement.Foreground" Value="{DynamicResource PrimaryTextBrush}" />
                                </Trigger>
                                <Trigger Property="IsSubmenuOpen" Value="True">
                                    <Setter TargetName="templateRoot" Property="Background" Value="White" />
                                    <Setter TargetName="menuHeaderContainer" Property="TextElement.Foreground" Value="{DynamicResource PrimaryTextBrush}" />
                                </Trigger>
                                <MultiTrigger>
                                    <MultiTrigger.Conditions>
                                        <Condition Property="IsHighlighted" Value="True" />
                                        <Condition Property="IsEnabled" Value="False" />
                                    </MultiTrigger.Conditions>
                                    <Setter TargetName="templateRoot" Property="Background" Value="#0A000000" />
                                    <Setter TargetName="templateRoot" Property="BorderBrush" Value="#21000000" />
                                </MultiTrigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger Property="Role" Value="SubmenuHeader">
                <Setter Property="DockPanel.Dock" Value="Top" />
                <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="MenuItem">
                            <Border
                                x:Name="Bd"
                                MinWidth="240"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                                SnapsToDevicePixels="True">
                                <Grid x:Name="Grid" Margin="{TemplateBinding Padding}">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="26" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="30" />
                                        <ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup" />
                                        <ColumnDefinition Width="20" />
                                    </Grid.ColumnDefinitions>
                                    <ContentPresenter
                                        x:Name="Icon"
                                        Width="16"
                                        Height="16"
                                        Margin="0,0,10,0"
                                        HorizontalAlignment="Right"
                                        VerticalAlignment="Center"
                                        ContentSource="Icon"
                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    <Border
                                        x:Name="GlyphPanel"
                                        Grid.Column="0"
                                        Width="16"
                                        Height="16"
                                        Margin="0,0,10,0"
                                        HorizontalAlignment="Right"
                                        VerticalAlignment="Center"
                                        Background="{DynamicResource PrimaryBrush}"
                                        ClipToBounds="False"
                                        CornerRadius="2"
                                        IsHitTestVisible="False"
                                        Visibility="Hidden">
                                        <Path
                                            Width="12"
                                            Height="12"
                                            Data="{StaticResource CheckedGeometry}"
                                            Stretch="Uniform"
                                            Stroke="{DynamicResource TextIconBrush}"
                                            StrokeThickness="2"
                                            UseLayoutRounding="True" />
                                    </Border>
                                    <ContentPresenter
                                        x:Name="ContentPresenter"
                                        Grid.Column="1"
                                        Margin="0,3"
                                        ContentSource="Header"
                                        ContentStringFormat="{TemplateBinding HeaderStringFormat}"
                                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                                        RecognizesAccessKey="True"
                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                        TextElement.Foreground="{TemplateBinding Foreground}" />
                                    <Path
                                        x:Name="Path"
                                        Grid.Column="4"
                                        Width="10"
                                        Height="10"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Center"
                                        Data="{StaticResource RightGeometry}"
                                        Fill="{TemplateBinding Foreground}"
                                        Stretch="Uniform" />
                                    <Popup
                                        x:Name="PART_Popup"
                                        Grid.Column="1"
                                        AllowsTransparency="True"
                                        Focusable="False"
                                        HorizontalOffset="{Binding Path=(hc:MenuAttach.PopupHorizontalOffset), RelativeSource={RelativeSource AncestorType=MenuBase}}"
                                        IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
                                        Placement="Right"
                                        VerticalOffset="{Binding Path=(hc:MenuAttach.PopupVerticalOffset), RelativeSource={RelativeSource AncestorType=MenuBase}}">
                                        <Border
                                            x:Name="SubMenuBorder"
                                            Margin="8"
                                            Background="{DynamicResource RegionBrush}"
                                            BorderBrush="{DynamicResource BorderBrush}"
                                            BorderThickness="1"
                                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                                            Effect="{StaticResource EffectShadow2}">
                                            <ScrollViewer Margin="2,2,2,0" Style="{StaticResource ScrollViewerUpDown}">
                                                <ItemsPresenter
                                                    x:Name="ItemsPresenter"
                                                    Grid.IsSharedSizeScope="True"
                                                    KeyboardNavigation.DirectionalNavigation="Cycle"
                                                    KeyboardNavigation.TabNavigation="Cycle"
                                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                            </ScrollViewer>
                                        </Border>
                                    </Popup>
                                </Grid>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsChecked" Value="True">
                                    <Setter TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger Property="IsHighlighted" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value=".4" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="MenuBaseStyle" TargetType="Menu">
        <Setter Property="hc:MenuAttach.ItemPadding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="hc:MenuAttach.PopupVerticalOffset" Value="-9" />
        <Setter Property="hc:MenuAttach.PopupHorizontalOffset" Value="10" />
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="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>
    <Style x:Key="WatermarkTextBoxBaseStyle" TargetType="hc:WatermarkTextBox">
        <Setter Property="Background" Value="{x:Null}" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="CaretBrush" Value="{Binding Foreground, RelativeSource={RelativeSource Self}}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Padding" Value="{StaticResource DefaultInputPadding}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:WatermarkTextBox">
                    <hc:SimplePanel>
                        <Border
                            x:Name="border"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            IsHitTestVisible="False"
                            SnapsToDevicePixels="True" />
                        <TextBlock
                            x:Name="PART_Watermark"
                            Margin="{TemplateBinding Padding}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Foreground="{DynamicResource TextInfoBrush}"
                            Text="{TemplateBinding Watermark}"
                            Visibility="{TemplateBinding Text,
                                                         Converter={StaticResource String2VisibilityReConverter}}" />
                        <ScrollViewer
                            x:Name="PART_ContentHost"
                            Margin="-2,0"
                            Padding="{TemplateBinding Padding}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            Focusable="false"
                            HorizontalScrollBarVisibility="Hidden"
                            VerticalScrollBarVisibility="Hidden" />
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource EmbellishBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="TextBoxBaseStyle"
        TargetType="TextBox"
        BasedOn="{StaticResource InputElementBaseStyle}">
        <Setter Property="CaretBrush" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <hc:SimplePanel x:Name="root">
                        <Border
                            x:Name="border"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            SnapsToDevicePixels="True" />
                        <ScrollViewer
                            x:Name="PART_ContentHost"
                            Margin="-2,0"
                            Padding="{TemplateBinding Padding}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            Focusable="false"
                            HorizontalScrollBarVisibility="Hidden"
                            VerticalScrollBarVisibility="Hidden" />
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="border" Property="Opacity" Value="0.4" />
                            <Setter TargetName="PART_ContentHost" Property="Opacity" Value="0.4" />
                        </Trigger>
                        <Trigger SourceName="PART_ContentHost" Property="IsMouseOver" Value="true">
                            <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
                        </Trigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="TextBoxExtendTopTemplate" TargetType="TextBox">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Border
                x:Name="border"
                Grid.Row="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                SnapsToDevicePixels="True" />
            <TextBlock
                x:Name="Placeholder"
                Grid.Row="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="Stretch"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                Style="{StaticResource TextBlockDefaultThiLight}"
                Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                Visibility="{TemplateBinding Text,
                                             Converter={StaticResource String2VisibilityReConverter}}" />
            <ScrollViewer
                x:Name="PART_ContentHost"
                Grid.Row="1"
                Margin="-2,0"
                Padding="{TemplateBinding Padding}"
                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                Focusable="false"
                HorizontalScrollBarVisibility="Hidden"
                VerticalScrollBarVisibility="Hidden" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="border" Property="Opacity" Value="0.4" />
                <Setter TargetName="PART_ContentHost" Property="Opacity" Value="0.4" />
                <Setter TargetName="Placeholder" Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger SourceName="PART_ContentHost" Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="TextBoxExtendLeftTemplate" TargetType="TextBox">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Border
                x:Name="border"
                Grid.Column="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                SnapsToDevicePixels="True" />
            <TextBlock
                x:Name="Placeholder"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="Stretch"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                Style="{StaticResource TextBlockDefaultThiLight}"
                Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                Visibility="{TemplateBinding Text,
                                             Converter={StaticResource String2VisibilityReConverter}}" />
            <ScrollViewer
                x:Name="PART_ContentHost"
                Grid.Column="1"
                Margin="-2,0"
                Padding="{TemplateBinding Padding}"
                Focusable="false"
                HorizontalScrollBarVisibility="Hidden"
                VerticalScrollBarVisibility="Hidden" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="border" Property="Opacity" Value="0.4" />
                <Setter TargetName="PART_ContentHost" Property="Opacity" Value="0.4" />
                <Setter TargetName="Placeholder" Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger SourceName="PART_ContentHost" Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="TextBoxExtendBaseStyle"
        TargetType="TextBox"
        BasedOn="{StaticResource TextBoxBaseStyle}">
        <Setter Property="hc:InfoElement.Symbol" Value="●" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="{x:Static system:Double.NaN}" />
        <Setter Property="hc:InfoElement.MinContentHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Height" Value="Auto" />
        <Setter Property="Template" Value="{StaticResource TextBoxExtendTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource TextBoxExtendLeftTemplate}" />
                <Setter Property="Width" Value="Auto" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="TextBoxPlusTopTemplate" TargetType="hc:TextBox">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Grid.Row="0"
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="root" Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <TextBlock
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <ScrollViewer
                    x:Name="PART_ContentHost"
                    Grid.Column="0"
                    Margin="-2,0,0,0"
                    Padding="{TemplateBinding Padding}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Focusable="false"
                    HorizontalScrollBarVisibility="Hidden"
                    VerticalScrollBarVisibility="Hidden" />
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="border" Property="Opacity" Value="0.4" />
                <Setter TargetName="root" Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger SourceName="root" Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                    <Condition Property="IsReadOnly" Value="False" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger Property="IsFocused" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="TextBoxPlusLeftTemplate" TargetType="hc:TextBox">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Grid.Column="0"
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="root" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <TextBlock
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <ScrollViewer
                    x:Name="PART_ContentHost"
                    Grid.Column="0"
                    Margin="-2,0,0,0"
                    Padding="{TemplateBinding Padding}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Focusable="false"
                    HorizontalScrollBarVisibility="Hidden"
                    VerticalScrollBarVisibility="Hidden" />
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="border" Property="Opacity" Value="0.4" />
                <Setter TargetName="root" Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger SourceName="root" Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                    <Condition Property="IsReadOnly" Value="False" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="TextBoxPlusBaseStyle"
        TargetType="hc:TextBox"
        BasedOn="{StaticResource TextBoxExtendBaseStyle}">
        <Setter Property="Template" Value="{StaticResource TextBoxPlusTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource TextBoxPlusLeftTemplate}" />
                <Setter Property="Width" Value="Auto" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="SearchBarBaseStyle"
        TargetType="hc:SearchBar"
        BasedOn="{StaticResource TextBoxBaseStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:SearchBar">
                    <hc:SimplePanel x:Name="root">
                        <Border
                            x:Name="border"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            SnapsToDevicePixels="True" />
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <ScrollViewer
                                x:Name="PART_ContentHost"
                                Grid.Row="0"
                                Grid.Column="0"
                                Margin="-2,0"
                                Padding="{TemplateBinding Padding}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                Focusable="false"
                                HorizontalScrollBarVisibility="Hidden"
                                VerticalScrollBarVisibility="Hidden" />
                            <Button
                                Grid.Row="0"
                                Grid.Column="1"
                                Width="Auto"
                                Height="Auto"
                                Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                hc:IconElement.Geometry="{StaticResource SearchGeometry}"
                                hc:IconElement.Width="14"
                                Command="interactivity:ControlCommands.Search"
                                Focusable="False"
                                Foreground="{TemplateBinding BorderBrush}"
                                Style="{StaticResource ButtonIcon}" />
                        </Grid>
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="root" Property="Opacity" Value="0.4" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
                        </Trigger>
                        <Trigger Property="IsFocused" Value="true">
                            <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="SearchBarExtendTopTemplate" TargetType="hc:SearchBar">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Border
                x:Name="border"
                Grid.Row="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
            <Grid
                x:Name="root"
                Grid.Row="1"
                SnapsToDevicePixels="true">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <TextBlock
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <ScrollViewer
                    x:Name="PART_ContentHost"
                    Grid.Column="0"
                    Margin="-2,0,0,0"
                    Padding="{TemplateBinding Padding}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Focusable="false"
                    HorizontalScrollBarVisibility="Hidden"
                    VerticalScrollBarVisibility="Hidden" />
                <Button
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    hc:IconElement.Geometry="{StaticResource SearchGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Search"
                    Foreground="{TemplateBinding BorderBrush}"
                    Style="{StaticResource ButtonIcon}" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="border" Property="Opacity" Value="0.4" />
                <Setter TargetName="root" Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="SearchBarExtendLeftTemplate" TargetType="hc:SearchBar">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Border
                x:Name="border"
                Grid.Column="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                SnapsToDevicePixels="True" />
            <Grid
                x:Name="root"
                Grid.Column="1"
                SnapsToDevicePixels="true">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <TextBlock
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <ScrollViewer
                    x:Name="PART_ContentHost"
                    Grid.Column="0"
                    Margin="-2,0,0,0"
                    Padding="{TemplateBinding Padding}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Focusable="false"
                    HorizontalScrollBarVisibility="Hidden"
                    VerticalScrollBarVisibility="Hidden" />
                <Button
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    hc:IconElement.Geometry="{StaticResource SearchGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Search"
                    Foreground="{TemplateBinding BorderBrush}"
                    Style="{StaticResource ButtonIcon}" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="border" Property="Opacity" Value="0.4" />
                <Setter TargetName="root" Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="SearchBarExtendBaseStyle"
        TargetType="hc:SearchBar"
        BasedOn="{StaticResource SearchBarBaseStyle}">
        <Setter Property="Height" Value="Auto" />
        <Setter Property="hc:InfoElement.Symbol" Value="●" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="{x:Static system:Double.NaN}" />
        <Setter Property="hc:InfoElement.MinContentHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Template" Value="{StaticResource SearchBarExtendTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource SearchBarExtendLeftTemplate}" />
                <Setter Property="Width" Value="Auto" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="SearchBarPlusTopTemplate" TargetType="hc:SearchBar">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Border
                x:Name="border"
                Grid.Row="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
            <Grid
                x:Name="root"
                Grid.Row="1"
                SnapsToDevicePixels="true">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{TemplateBinding BorderBrush}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Button
                    Grid.Row="0"
                    Grid.Column="2"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource SearchGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Search"
                    Focusable="False"
                    Foreground="{TemplateBinding BorderBrush}"
                    Style="{StaticResource ButtonIcon}" />
                <TextBlock
                    Grid.Row="0"
                    Grid.Column="0"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <ScrollViewer
                    x:Name="PART_ContentHost"
                    Grid.Row="0"
                    Grid.Column="0"
                    Margin="-2,0"
                    Padding="{TemplateBinding Padding}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Focusable="false"
                    HorizontalScrollBarVisibility="Hidden"
                    VerticalScrollBarVisibility="Hidden" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="border" Property="Opacity" Value="0.4" />
                <Setter TargetName="root" Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger SourceName="root" Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="root" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger Property="IsFocused" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="SearchBarPlusLeftTemplate" TargetType="hc:SearchBar">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Border
                x:Name="border"
                Grid.Column="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
            <Grid
                x:Name="root"
                Grid.Column="1"
                SnapsToDevicePixels="true">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{TemplateBinding BorderBrush}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Button
                    Grid.Row="0"
                    Grid.Column="2"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource SearchGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Search"
                    Focusable="False"
                    Foreground="{TemplateBinding BorderBrush}"
                    Style="{StaticResource ButtonIcon}" />
                <TextBlock
                    Grid.Row="0"
                    Grid.Column="0"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding Text,
                                                 Converter={StaticResource String2VisibilityReConverter}}" />
                <ScrollViewer
                    x:Name="PART_ContentHost"
                    Grid.Row="0"
                    Grid.Column="0"
                    Margin="-2,0"
                    Padding="{TemplateBinding Padding}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Focusable="false"
                    HorizontalScrollBarVisibility="Hidden"
                    VerticalScrollBarVisibility="Hidden" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="border" Property="Opacity" Value="0.4" />
                <Setter TargetName="root" Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger SourceName="root" Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="root" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger Property="IsFocused" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="SearchBarPlusBaseStyle"
        TargetType="hc:SearchBar"
        BasedOn="{StaticResource SearchBarExtendBaseStyle}">
        <Setter Property="Template" Value="{StaticResource SearchBarPlusTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource SearchBarPlusLeftTemplate}" />
                <Setter Property="Width" Value="Auto" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style TargetType="hc:Tag" BasedOn="{StaticResource TagBaseStyle}" />
    <Style TargetType="hc:TagContainer" BasedOn="{StaticResource TagContainerBaseStyle}" />
    <Style TargetType="hc:SearchBar" BasedOn="{StaticResource SearchBarBaseStyle}" />
    <Style
        x:Key="SearchBar.Small"
        TargetType="hc:SearchBar"
        BasedOn="{StaticResource SearchBarBaseStyle}">
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="Padding" Value="6,0" />
    </Style>
    <Style
        x:Key="SearchBarExtend"
        TargetType="hc:SearchBar"
        BasedOn="{StaticResource SearchBarExtendBaseStyle}" />
    <Style
        x:Key="SearchBarExtend.Small"
        TargetType="hc:SearchBar"
        BasedOn="{StaticResource SearchBarExtend}">
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style
        x:Key="SearchBarPlus"
        TargetType="hc:SearchBar"
        BasedOn="{StaticResource SearchBarPlusBaseStyle}" />
    <Style
        x:Key="SearchBarPlus.Small"
        TargetType="hc:SearchBar"
        BasedOn="{StaticResource SearchBarPlus}">
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style TargetType="ComboBox" BasedOn="{StaticResource ComboBoxBaseStyle}" />
    <Style
        x:Key="ComboBoxItem.Small"
        TargetType="ComboBoxItem"
        BasedOn="{StaticResource ComboBoxItemBaseStyle}">
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style
        x:Key="ComboBox.Small"
        TargetType="ComboBox"
        BasedOn="{StaticResource ComboBoxBaseStyle}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource ComboBoxItem.Small}" />
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="Padding" Value="6,0" />
    </Style>
    <Style
        x:Key="ComboBoxExtend"
        TargetType="ComboBox"
        BasedOn="{StaticResource ComboBoxExtendBaseStyle}" />
    <Style
        x:Key="ComboBoxExtend.Small"
        TargetType="ComboBox"
        BasedOn="{StaticResource ComboBoxExtend}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource ComboBoxItem.Small}" />
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style TargetType="hc:ComboBox" BasedOn="{StaticResource ComboBoxPlusBaseStyle}" />
    <Style
        x:Key="ComboBoxPlus.Small"
        TargetType="hc:ComboBox"
        BasedOn="{StaticResource ComboBoxPlusBaseStyle}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource ComboBoxItem.Small}" />
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style TargetType="hc:WatermarkTextBox" BasedOn="{StaticResource WatermarkTextBoxBaseStyle}" />
    <Style TargetType="TextBox" BasedOn="{StaticResource TextBoxBaseStyle}" />
    <Style
        x:Key="TextBox.Small"
        TargetType="TextBox"
        BasedOn="{StaticResource TextBoxBaseStyle}">
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="Padding" Value="6,0" />
    </Style>
    <Style
        x:Key="TextBoxExtend"
        TargetType="TextBox"
        BasedOn="{StaticResource TextBoxExtendBaseStyle}" />
    <Style
        x:Key="TextBoxExtend.Small"
        TargetType="TextBox"
        BasedOn="{StaticResource TextBoxExtend}">
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style TargetType="hc:TextBox" BasedOn="{StaticResource TextBoxPlusBaseStyle}" />
    <Style
        x:Key="TextBoxPlus.Small"
        TargetType="hc:TextBox"
        BasedOn="{StaticResource TextBoxPlusBaseStyle}">
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style TargetType="MenuItem" BasedOn="{StaticResource MenuItemBaseStyle}" />
    <Style TargetType="Menu" BasedOn="{StaticResource MenuBaseStyle}" />
    <Style
        x:Key="Menu.Small"
        TargetType="Menu"
        BasedOn="{StaticResource MenuBaseStyle}">
        <Setter Property="hc:MenuAttach.ItemPadding" Value="6,0" />
        <Setter Property="hc:MenuAttach.PopupVerticalOffset" Value="-3" />
        <Setter Property="hc:MenuAttach.PopupHorizontalOffset" Value="6" />
    </Style>
    <ControlTemplate x:Key="BadgeTextTemplate" TargetType="hc:Badge">
        <hc:SimplePanel>
            <ContentPresenter />
            <Border
                x:Name="Border"
                Margin="{TemplateBinding BadgeMargin}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                RenderTransformOrigin="0.5 0.5"
                Style="{StaticResource BorderCircular}"
                Visibility="{TemplateBinding ShowBadge,
                                             Converter={StaticResource Boolean2VisibilityConverter}}">
                <Border.RenderTransform>
                    <ScaleTransform />
                </Border.RenderTransform>
                <ContentPresenter Margin="{TemplateBinding Padding}" ContentSource="Text" />
            </Border>
        </hc:SimplePanel>
        <ControlTemplate.Triggers>
            <EventTrigger RoutedEvent="hc:Badge.ValueChanged">
                <BeginStoryboard>
                    <Storyboard AutoReverse="True">
                        <DoubleAnimation
                            BeginTime="0"
                            EasingFunction="{StaticResource SineEaseOut}"
                            Storyboard.TargetName="Border"
                            Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
                            From="1"
                            To="1.2"
                            Duration="0:0:.1" />
                        <DoubleAnimation
                            BeginTime="0"
                            EasingFunction="{StaticResource SineEaseOut}"
                            Storyboard.TargetName="Border"
                            Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
                            From="1"
                            To="1.2"
                            Duration="0:0:.1" />
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="BadgeProcessingTemplate" TargetType="hc:Badge">
        <hc:SimplePanel>
            <ContentPresenter />
            <Ellipse
                Width="10"
                Height="10"
                Margin="{TemplateBinding BadgeMargin}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                Fill="{TemplateBinding Background}"
                RenderTransformOrigin="0.5 0.5"
                Visibility="{TemplateBinding ShowBadge,
                                             Converter={StaticResource Boolean2VisibilityConverter}}">
                <Ellipse.OpacityMask>
                    <RadialGradientBrush>
                        <GradientStop Offset="0" Color="Transparent" />
                        <GradientStop Offset="1" Color="Black" />
                    </RadialGradientBrush>
                </Ellipse.OpacityMask>
                <Ellipse.RenderTransform>
                    <ScaleTransform />
                </Ellipse.RenderTransform>
                <Ellipse.Triggers>
                    <EventTrigger RoutedEvent="Loaded">
                        <BeginStoryboard>
                            <Storyboard DesiredFrameRate="20" RepeatBehavior="Forever">
                                <DoubleAnimation
                                    BeginTime="0"
                                    EasingFunction="{StaticResource SineEaseOut}"
                                    Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
                                    From="1"
                                    To="2"
                                    Duration="0:0:1" />
                                <DoubleAnimation
                                    BeginTime="0"
                                    EasingFunction="{StaticResource SineEaseOut}"
                                    Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
                                    From="1"
                                    To="2"
                                    Duration="0:0:1" />
                                <DoubleAnimation
                                    BeginTime="0"
                                    EasingFunction="{StaticResource SineEaseOut}"
                                    Storyboard.TargetProperty="Opacity"
                                    From="1"
                                    To="0"
                                    Duration="0:0:1" />
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger>
                </Ellipse.Triggers>
            </Ellipse>
            <Border
                Width="10"
                Height="10"
                Margin="{TemplateBinding BadgeMargin}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="5"
                Visibility="{TemplateBinding ShowBadge,
                                             Converter={StaticResource Boolean2VisibilityConverter}}" />
        </hc:SimplePanel>
    </ControlTemplate>
    <Style x:Key="BadgeBaseStyle" TargetType="hc:Badge">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{DynamicResource RegionBrush}" />
        <Setter Property="Padding" Value="6,2" />
        <Setter Property="Template" Value="{StaticResource BadgeTextTemplate}" />
        <Setter Property="HorizontalContentAlignment" Value="Right" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="BadgeMargin" Value="0,-10,-10,0" />
        <Style.Triggers>
            <Trigger Property="Status" Value="Dot">
                <Setter Property="Template" Value="{StaticResource BadgeDotTemplate}" />
                <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
                <Setter Property="BadgeMargin" Value="0,-5,-5,0" />
            </Trigger>
            <Trigger Property="Status" Value="Processing">
                <Setter Property="Template" Value="{StaticResource BadgeProcessingTemplate}" />
                <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
                <Setter Property="BadgeMargin" Value="0,-5,-5,0" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="CardBaseStyle"
        TargetType="hc:Card"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Card">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Border
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="0,0,0,1"
                                Visibility="{TemplateBinding Header,
                                                             Converter={StaticResource Object2VisibilityConverter}}">
                                <ContentPresenter
                                    ContentSource="Header"
                                    ContentStringFormat="{TemplateBinding HeaderStringFormat}"
                                    ContentTemplate="{TemplateBinding HeaderTemplate}"
                                    ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" />
                            </Border>
                            <ContentPresenter Grid.Row="1" />
                            <Border
                                Grid.Row="2"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="0,1,0,0"
                                Visibility="{TemplateBinding Footer,
                                                             Converter={StaticResource Object2VisibilityConverter}}">
                                <ContentPresenter
                                    ContentSource="Footer"
                                    ContentStringFormat="{TemplateBinding FooterStringFormat}"
                                    ContentTemplate="{TemplateBinding FooterTemplate}"
                                    ContentTemplateSelector="{TemplateBinding FooterTemplateSelector}" />
                            </Border>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="ChatBubbleStringBaseTemplate" TargetType="hc:ChatBubble">
        <hc:SimplePanel>
            <Path
                Name="Tail"
                Width="15"
                Height="15"
                HorizontalAlignment="Right"
                VerticalAlignment="Bottom"
                Data="{StaticResource BubbleTailGeometry}"
                Fill="{TemplateBinding Background}"
                RenderTransformOrigin="0.5,0.5"
                Stretch="Uniform" />
            <Border
                Name="Body"
                Margin="0,0,3,0"
                Background="{TemplateBinding Background}"
                CornerRadius="15">
                <TextBlock
                    Margin="{TemplateBinding Padding}"
                    VerticalAlignment="Center"
                    Text="{TemplateBinding Content}"
                    TextWrapping="Wrap" />
            </Border>
        </hc:SimplePanel>
        <ControlTemplate.Triggers>
            <Trigger Property="Role" Value="Receiver">
                <Setter TargetName="Tail" Property="HorizontalAlignment" Value="Left" />
                <Setter TargetName="Tail" Property="RenderTransform">
                    <Setter.Value>
                        <TransformGroup>
                            <ScaleTransform ScaleX="-1" ScaleY="1" />
                        </TransformGroup>
                    </Setter.Value>
                </Setter>
                <Setter TargetName="Body" Property="Margin" Value="3,0,0,0" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ChatBubbleImageBaseTemplate" TargetType="hc:ChatBubble">
        <hc:SimplePanel>
            <Path
                Name="Tail"
                Width="15"
                Height="15"
                HorizontalAlignment="Right"
                VerticalAlignment="Bottom"
                Data="{StaticResource BubbleTailGeometry}"
                Fill="{TemplateBinding Background}"
                RenderTransformOrigin="0.5,0.5"
                Stretch="Uniform" />
            <Border
                Name="Body"
                Margin="0,0,3,0"
                Background="{TemplateBinding Background}"
                CornerRadius="15">
                <hc:SimplePanel>
                    <Image
                        Margin="{TemplateBinding Padding}"
                        VerticalAlignment="Center"
                        Source="{TemplateBinding Content}" />
                    <Border
                        Background="{x:Null}"
                        BorderBrush="{TemplateBinding Background}"
                        BorderThickness="{TemplateBinding Padding}"
                        CornerRadius="15" />
                </hc:SimplePanel>
            </Border>
        </hc:SimplePanel>
        <ControlTemplate.Triggers>
            <Trigger Property="Role" Value="Receiver">
                <Setter TargetName="Tail" Property="HorizontalAlignment" Value="Left" />
                <Setter TargetName="Tail" Property="RenderTransform">
                    <Setter.Value>
                        <TransformGroup>
                            <ScaleTransform ScaleX="-1" ScaleY="1" />
                        </TransformGroup>
                    </Setter.Value>
                </Setter>
                <Setter TargetName="Body" Property="Margin" Value="3,0,0,0" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ChatBubbleAudioBaseTemplate" TargetType="hc:ChatBubble">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Name="Definition1" Width="12" />
                <ColumnDefinition Name="Definition2" />
            </Grid.ColumnDefinitions>
            <Ellipse
                Name="Dot"
                Width="6"
                Height="6"
                Margin="0,0,6,0"
                VerticalAlignment="Top"
                Fill="{DynamicResource DangerBrush}"
                Visibility="{TemplateBinding IsRead,
                                             Converter={StaticResource Boolean2VisibilityReConverter}}" />
            <Path
                Name="Tail"
                Grid.Column="1"
                Width="15"
                Height="15"
                HorizontalAlignment="Right"
                VerticalAlignment="Bottom"
                Data="{StaticResource BubbleTailGeometry}"
                Fill="{TemplateBinding Background}"
                RenderTransformOrigin="0.5,0.5"
                Stretch="Uniform" />
            <Border
                Name="Body"
                Grid.Column="1"
                Margin="0,0,3,0"
                Background="{TemplateBinding Background}"
                CornerRadius="15">
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <ContentPresenter Name="Presenter" VerticalAlignment="Center" />
                    <Path
                        Name="Audio"
                        Grid.Column="1"
                        Width="16"
                        Height="16"
                        Margin="6,0,0,0"
                        Data="{StaticResource AudioGeometry}"
                        Fill="{TemplateBinding Foreground}"
                        RenderTransformOrigin="0.5,0.5">
                        <Path.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="-1" ScaleY="1" />
                            </TransformGroup>
                        </Path.RenderTransform>
                    </Path>
                </Grid>
            </Border>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="Role" Value="Receiver">
                <Setter TargetName="Tail" Property="HorizontalAlignment" Value="Left" />
                <Setter TargetName="Tail" Property="RenderTransform">
                    <Setter.Value>
                        <TransformGroup>
                            <ScaleTransform ScaleX="-1" ScaleY="1" />
                        </TransformGroup>
                    </Setter.Value>
                </Setter>
                <Setter TargetName="Tail" Property="Grid.Column" Value="0" />
                <Setter TargetName="Dot" Property="Grid.Column" Value="1" />
                <Setter TargetName="Dot" Property="Margin" Value="6,0,0,0" />
                <Setter TargetName="Body" Property="Margin" Value="3,0,0,0" />
                <Setter TargetName="Body" Property="Grid.Column" Value="0" />
                <Setter TargetName="Definition1" Property="Width" Value="Auto" />
                <Setter TargetName="Definition2" Property="Width" Value="12" />
                <Setter TargetName="Audio" Property="Grid.Column" Value="0" />
                <Setter TargetName="Audio" Property="Margin" Value="0,0,6,0" />
                <Setter TargetName="Audio" Property="RenderTransform">
                    <Setter.Value>
                        <TransformGroup>
                            <ScaleTransform ScaleX="1" ScaleY="1" />
                        </TransformGroup>
                    </Setter.Value>
                </Setter>
                <Setter TargetName="Presenter" Property="Grid.Column" Value="1" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ChatBubbleCustomBaseTemplate" TargetType="hc:ChatBubble">
        <hc:SimplePanel>
            <Path
                Name="Tail"
                Width="15"
                Height="15"
                HorizontalAlignment="Right"
                VerticalAlignment="Bottom"
                Data="{StaticResource BubbleTailGeometry}"
                Fill="{TemplateBinding Background}"
                RenderTransformOrigin="0.5,0.5"
                Stretch="Uniform" />
            <Border
                Name="Body"
                Margin="0,0,3,0"
                Background="{TemplateBinding Background}"
                CornerRadius="15">
                <ContentPresenter Margin="{TemplateBinding Padding}" VerticalAlignment="Center" />
            </Border>
        </hc:SimplePanel>
        <ControlTemplate.Triggers>
            <Trigger Property="Role" Value="Receiver">
                <Setter TargetName="Tail" Property="HorizontalAlignment" Value="Left" />
                <Setter TargetName="Tail" Property="RenderTransform">
                    <Setter.Value>
                        <TransformGroup>
                            <ScaleTransform ScaleX="-1" ScaleY="1" />
                        </TransformGroup>
                    </Setter.Value>
                </Setter>
                <Setter TargetName="Body" Property="Margin" Value="3,0,0,0" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="ChatBubbleBaseStyle" TargetType="hc:ChatBubble">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="Background" Value="{DynamicResource DarkPrimaryBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
        <Setter Property="Padding" Value="10" />
        <Setter Property="Margin" Value="10" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Template" Value="{StaticResource ChatBubbleStringBaseTemplate}" />
        <Setter Property="IsRead" Value="{Binding IsSelected, RelativeSource={RelativeSource Self}}" />
        <Setter Property="MaxWidth" Value="280" />
        <Style.Triggers>
            <Trigger Property="Role" Value="Receiver">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
                <Setter Property="HorizontalAlignment" Value="Left" />
            </Trigger>
            <Trigger Property="Type" Value="Image">
                <Setter Property="Template" Value="{StaticResource ChatBubbleImageBaseTemplate}" />
                <Setter Property="MaxHeight" Value="280" />
            </Trigger>
            <Trigger Property="Type" Value="Audio">
                <Setter Property="Template" Value="{StaticResource ChatBubbleAudioBaseTemplate}" />
            </Trigger>
            <Trigger Property="Type" Value="Custom">
                <Setter Property="Template" Value="{StaticResource ChatBubbleCustomBaseTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="Tag4CheckComboBoxStyle"
        TargetType="hc:Tag"
        BasedOn="{StaticResource TagBaseStyle}">
        <Setter Property="Padding" Value="6,2,4,2" />
        <Setter Property="Height" Value="Auto" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Tag">
                    <Border
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        SnapsToDevicePixels="true">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <ContentPresenter
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            <Button
                                Name="ButtonClose"
                                Grid.Column="1"
                                Width="16"
                                Height="16"
                                Margin="10,0,0,0"
                                Padding="0,4"
                                hc:IconElement.Geometry="{StaticResource CloseGeometry}"
                                Command="interactivity:ControlCommands.Close"
                                Focusable="False"
                                Foreground="{TemplateBinding Foreground}"
                                Style="{StaticResource ButtonIcon}"
                                Visibility="{TemplateBinding ShowCloseButton,
                                                             Converter={StaticResource Boolean2VisibilityConverter}}" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger SourceName="ButtonClose" Property="IsMouseOver" Value="True">
                            <Setter TargetName="ButtonClose" Property="hc:IconElement.Geometry" Value="{StaticResource DeleteFillCircleGeometry}" />
                            <Setter TargetName="ButtonClose" Property="Padding" Value="0" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CheckComboBoxItemBaseStyle" TargetType="hc:CheckComboBoxItem">
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:CheckComboBoxItem">
                    <Border
                        x:Name="Bd"
                        Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='1,0,1,0'}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        SnapsToDevicePixels="true">
                        <CheckBox
                            MinHeight="{TemplateBinding MinHeight}"
                            HorizontalAlignment="Stretch"
                            FocusVisualStyle="{x:Null}"
                            Foreground="{TemplateBinding Foreground}"
                            IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
                            <ContentPresenter
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </CheckBox>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="CheckComboBoxTemplate" TargetType="hc:CheckComboBox">
        <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Border
                x:Name="border"
                Grid.ColumnSpan="2"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
            <ToggleButton
                Grid.Column="1"
                Width="Auto"
                Height="Auto"
                Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                HorizontalContentAlignment="Left"
                hc:IconElement.Width="14"
                hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}"
                hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"
                BorderThickness="0"
                ClickMode="Release"
                Focusable="False"
                Foreground="{TemplateBinding BorderBrush}"
                IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                Style="{StaticResource ToggleButtonIconTransparent}" />
            <Border Grid.Column="0" Margin="-4,0">
                <hc:UniformSpacingPanel
                    x:Name="PART_Panel"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ChildWrapping="Wrap"
                    ItemVerticalAlignment="Center"
                    Spacing="{TemplateBinding TagSpacing}" />
            </Border>
            <Popup
                x:Name="PART_Popup"
                Grid.ColumnSpan="2"
                AllowsTransparency="true"
                IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                Placement="Bottom"
                PlacementTarget="{Binding ElementName=border}"
                PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                StaysOpen="False">
                <Decorator Margin="8,0">
                    <Border
                        x:Name="dropDownBorder"
                        MinWidth="{Binding ActualWidth, ElementName=border}"
                        MaxHeight="{TemplateBinding MaxDropDownHeight}"
                        Margin="0,0,0,8"
                        Background="{DynamicResource RegionBrush}"
                        BorderBrush="{DynamicResource BorderBrush}"
                        BorderThickness="0,1,0,0"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        Effect="{StaticResource EffectShadow2}">
                        <hc:ToggleBlock
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Stretch"
                            IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <hc:ToggleBlock.CheckedContent>
                                <Grid Margin="2" ClipToBounds="False">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition />
                                    </Grid.RowDefinitions>
                                    <hc:CheckComboBoxItem
                                        x:Name="PART_SelectAll"
                                        HorizontalContentAlignment="Stretch"
                                        Content="{ex:Lang Key={x:Static langs:LangKeys.All}}"
                                        IsEnabled="{TemplateBinding ShowSelectAllButton}"
                                        Style="{TemplateBinding ItemContainerStyle}"
                                        Visibility="{Binding ShowSelectAllButton, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                                    <ScrollViewer x:Name="DropDownScrollViewer" Grid.Row="1">
                                        <ItemsPresenter
                                            x:Name="ItemsPresenter"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </ScrollViewer>
                                </Grid>
                            </hc:ToggleBlock.CheckedContent>
                            <hc:ToggleBlock.UnCheckedContent>
                                <hc:Empty />
                            </hc:ToggleBlock.UnCheckedContent>
                        </hc:ToggleBlock>
                    </Border>
                </Decorator>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="CheckComboBoxBaseStyle"
        TargetType="hc:CheckComboBox"
        BasedOn="{StaticResource InputElementBaseStyle}">
        <Setter Property="TagStyle" Value="{StaticResource Tag4CheckComboBoxStyle}" />
        <Setter Property="TagSpacing" Value="4" />
        <Setter Property="SelectionMode" Value="Multiple" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource CheckComboBoxItemBaseStyle}" />
        <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="Padding" Value="8,4" />
        <Setter Property="Template" Value="{StaticResource CheckComboBoxTemplate}" />
    </Style>
    <ControlTemplate x:Key="CheckComboBoxExtendTopTemplate" TargetType="hc:CheckComboBox">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="contentPanel" Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <TextBlock
                    Grid.Column="0"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType=hc:CheckComboBox}, Converter={StaticResource Object2VisibilityReConverter}}" />
                <ToggleButton
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Width="14"
                    hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}"
                    hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"
                    BorderThickness="0"
                    ClickMode="Release"
                    Focusable="False"
                    Foreground="{TemplateBinding BorderBrush}"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    Style="{StaticResource ToggleButtonIconTransparent}" />
                <Border Grid.Column="0" Margin="-4,0">
                    <hc:UniformSpacingPanel
                        x:Name="PART_Panel"
                        Margin="{TemplateBinding Padding}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        ChildWrapping="Wrap"
                        ItemVerticalAlignment="Center"
                        Spacing="{TemplateBinding TagSpacing}" />
                </Border>
                <Popup
                    x:Name="PART_Popup"
                    Margin="1"
                    AllowsTransparency="true"
                    IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <Grid Margin="2" ClipToBounds="False">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition />
                                        </Grid.RowDefinitions>
                                        <hc:CheckComboBoxItem
                                            x:Name="PART_SelectAll"
                                            HorizontalContentAlignment="Stretch"
                                            Content="{ex:Lang Key={x:Static langs:LangKeys.All}}"
                                            IsEnabled="{TemplateBinding ShowSelectAllButton}"
                                            Style="{TemplateBinding ItemContainerStyle}"
                                            Visibility="{Binding ShowSelectAllButton, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                                        <ScrollViewer x:Name="DropDownScrollViewer" Grid.Row="1">
                                            <ItemsPresenter
                                                x:Name="ItemsPresenter"
                                                KeyboardNavigation.DirectionalNavigation="Contained"
                                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                        </ScrollViewer>
                                    </Grid>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="contentPanel" Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="CheckComboBoxExtendLeftTemplate" TargetType="hc:CheckComboBox">
        <Grid
            x:Name="templateRoot"
            Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}"
            MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}"
            SnapsToDevicePixels="true">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="contentPanel" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <TextBlock
                    Grid.Column="0"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType=hc:CheckComboBox}, Converter={StaticResource Object2VisibilityReConverter}}" />
                <ToggleButton
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Width="14"
                    hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}"
                    hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"
                    BorderThickness="0"
                    ClickMode="Release"
                    Focusable="False"
                    Foreground="{TemplateBinding BorderBrush}"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    Style="{StaticResource ToggleButtonIconTransparent}" />
                <Border Grid.Column="0" Margin="-4,0">
                    <hc:UniformSpacingPanel
                        x:Name="PART_Panel"
                        Margin="{TemplateBinding Padding}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        ChildWrapping="Wrap"
                        ItemVerticalAlignment="Center"
                        Spacing="{TemplateBinding TagSpacing}" />
                </Border>
                <Popup
                    x:Name="PART_Popup"
                    Margin="1"
                    AllowsTransparency="true"
                    IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <Grid Margin="2" ClipToBounds="False">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition />
                                        </Grid.RowDefinitions>
                                        <hc:CheckComboBoxItem
                                            x:Name="PART_SelectAll"
                                            HorizontalContentAlignment="Stretch"
                                            Content="{ex:Lang Key={x:Static langs:LangKeys.All}}"
                                            IsEnabled="{TemplateBinding ShowSelectAllButton}"
                                            Style="{TemplateBinding ItemContainerStyle}"
                                            Visibility="{Binding ShowSelectAllButton, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                                        <ScrollViewer x:Name="DropDownScrollViewer" Grid.Row="1">
                                            <ItemsPresenter
                                                x:Name="ItemsPresenter"
                                                KeyboardNavigation.DirectionalNavigation="Contained"
                                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                        </ScrollViewer>
                                    </Grid>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="contentPanel" Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="CheckComboBoxExtendBaseStyle"
        TargetType="hc:CheckComboBox"
        BasedOn="{StaticResource CheckComboBoxBaseStyle}">
        <Setter Property="Height" Value="Auto" />
        <Setter Property="Template" Value="{StaticResource CheckComboBoxExtendTopTemplate}" />
        <Setter Property="hc:InfoElement.Symbol" Value="●" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="{x:Static system:Double.NaN}" />
        <Setter Property="hc:InfoElement.MinContentHeight" Value="{StaticResource DefaultControlHeight}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource CheckComboBoxExtendLeftTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="CheckComboBoxPlusTopTemplate" TargetType="hc:CheckComboBox">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Grid.ColumnSpan="2"
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="contentPanel" Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <TextBlock
                    Grid.Column="0"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType=hc:CheckComboBox}, Converter={StaticResource Object2VisibilityReConverter}}" />
                <ToggleButton
                    Grid.Column="2"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Width="14"
                    hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}"
                    hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"
                    BorderThickness="0"
                    ClickMode="Release"
                    Focusable="False"
                    Foreground="{TemplateBinding BorderBrush}"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    Style="{StaticResource ToggleButtonIconTransparent}" />
                <Border Grid.Column="0" Margin="-4,0">
                    <hc:UniformSpacingPanel
                        x:Name="PART_Panel"
                        Margin="{TemplateBinding Padding}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        ChildWrapping="Wrap"
                        ItemVerticalAlignment="Center"
                        Spacing="{TemplateBinding TagSpacing}" />
                </Border>
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,4,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Hidden" />
                <Popup
                    x:Name="PART_Popup"
                    Margin="1"
                    AllowsTransparency="true"
                    IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <Grid Margin="2" ClipToBounds="False">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition />
                                        </Grid.RowDefinitions>
                                        <hc:CheckComboBoxItem
                                            x:Name="PART_SelectAll"
                                            HorizontalContentAlignment="Stretch"
                                            Content="{ex:Lang Key={x:Static langs:LangKeys.All}}"
                                            IsEnabled="{TemplateBinding ShowSelectAllButton}"
                                            Style="{TemplateBinding ItemContainerStyle}"
                                            Visibility="{Binding ShowSelectAllButton, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                                        <ScrollViewer x:Name="DropDownScrollViewer" Grid.Row="1">
                                            <ItemsPresenter
                                                x:Name="ItemsPresenter"
                                                KeyboardNavigation.DirectionalNavigation="Contained"
                                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                        </ScrollViewer>
                                    </Grid>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="contentPanel" Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="CheckComboBoxPlusLeftTemplate" TargetType="hc:CheckComboBox">
        <Grid
            x:Name="templateRoot"
            Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}"
            MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}"
            SnapsToDevicePixels="true">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="contentPanel" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <TextBlock
                    Grid.Column="0"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TextBlockDefaultThiLight}"
                    Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType=hc:CheckComboBox}, Converter={StaticResource Object2VisibilityReConverter}}" />
                <ToggleButton
                    Grid.Column="2"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Width="14"
                    hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}"
                    hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"
                    BorderThickness="0"
                    ClickMode="Release"
                    Focusable="False"
                    Foreground="{TemplateBinding BorderBrush}"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    Style="{StaticResource ToggleButtonIconTransparent}" />
                <Border Grid.Column="0" Margin="-4,0">
                    <hc:UniformSpacingPanel
                        x:Name="PART_Panel"
                        Margin="{TemplateBinding Padding}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        ChildWrapping="Wrap"
                        ItemVerticalAlignment="Center"
                        Spacing="{TemplateBinding TagSpacing}" />
                </Border>
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,4,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Hidden" />
                <Popup
                    x:Name="PART_Popup"
                    Margin="1"
                    AllowsTransparency="true"
                    IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False">
                    <Decorator Margin="8,0">
                        <Border
                            x:Name="dropDownBorder"
                            MinWidth="{Binding ActualWidth, ElementName=border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0,0,0,8"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <Grid Margin="2" ClipToBounds="False">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition />
                                        </Grid.RowDefinitions>
                                        <hc:CheckComboBoxItem
                                            x:Name="PART_SelectAll"
                                            HorizontalContentAlignment="Stretch"
                                            Content="{ex:Lang Key={x:Static langs:LangKeys.All}}"
                                            IsEnabled="{TemplateBinding ShowSelectAllButton}"
                                            Style="{TemplateBinding ItemContainerStyle}"
                                            Visibility="{Binding ShowSelectAllButton, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                                        <ScrollViewer x:Name="DropDownScrollViewer" Grid.Row="1">
                                            <ItemsPresenter
                                                x:Name="ItemsPresenter"
                                                KeyboardNavigation.DirectionalNavigation="Contained"
                                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                        </ScrollViewer>
                                    </Grid>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                    </Decorator>
                </Popup>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=border}" />
                <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=border}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="contentPanel" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="ButtonClear" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="contentPanel" Property="Opacity" Value="0.4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="CheckComboBoxPlusBaseStyle"
        TargetType="hc:CheckComboBox"
        BasedOn="{StaticResource CheckComboBoxExtendBaseStyle}">
        <Setter Property="Template" Value="{StaticResource CheckComboBoxPlusTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource CheckComboBoxPlusLeftTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="ColorPickerSliderHorizontal" TargetType="Slider">
        <hc:SimplePanel>
            <Border
                MaxHeight="11"
                Margin="7,0"
                Background="{TemplateBinding Background}"
                CornerRadius="2" />
            <Border
                MaxHeight="11"
                Margin="7,0"
                Background="{TemplateBinding Foreground}"
                CornerRadius="2">
                <Border.OpacityMask>
                    <LinearGradientBrush StartPoint="1,0.5" EndPoint="0,0.5">
                        <GradientStop Offset="1" Color="Transparent" />
                        <GradientStop Offset="0" Color="White" />
                    </LinearGradientBrush>
                </Border.OpacityMask>
            </Border>
            <Track x:Name="PART_Track">
                <Track.DecreaseRepeatButton>
                    <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource ColorPickerSliderRepeatButtonBaseStyle}" />
                </Track.DecreaseRepeatButton>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource ColorPickerSliderRepeatButtonBaseStyle}" />
                </Track.IncreaseRepeatButton>
                <Track.Thumb>
                    <Thumb
                        x:Name="Thumb"
                        Width="13"
                        Height="13"
                        VerticalAlignment="Center"
                        Focusable="False"
                        OverridesDefaultStyle="True"
                        Template="{StaticResource ColorPickerSliderThumbTemplate}">
                        <Thumb.Effect>
                            <DropShadowEffect Opacity=".6" ShadowDepth="0" />
                        </Thumb.Effect>
                    </Thumb>
                </Track.Thumb>
            </Track>
        </hc:SimplePanel>
    </ControlTemplate>
    <ControlTemplate x:Key="ColorPickerSliderVertical" TargetType="Slider">
        <hc:SimplePanel>
            <Border
                MaxWidth="11"
                Margin="0,7"
                Background="{TemplateBinding Background}"
                CornerRadius="2" />
            <Border
                MaxWidth="11"
                Margin="0,7"
                Background="{TemplateBinding Foreground}"
                CornerRadius="2">
                <Border.OpacityMask>
                    <LinearGradientBrush StartPoint="1,0.5" EndPoint="0,0.5">
                        <GradientStop Offset="1" Color="Transparent" />
                        <GradientStop Offset="0" Color="White" />
                    </LinearGradientBrush>
                </Border.OpacityMask>
            </Border>
            <Track x:Name="PART_Track">
                <Track.DecreaseRepeatButton>
                    <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource ColorPickerSliderRepeatButtonBaseStyle}" />
                </Track.DecreaseRepeatButton>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource ColorPickerSliderRepeatButtonBaseStyle}" />
                </Track.IncreaseRepeatButton>
                <Track.Thumb>
                    <Thumb
                        x:Name="Thumb"
                        Width="13"
                        Height="13"
                        VerticalAlignment="Top"
                        Focusable="False"
                        OverridesDefaultStyle="True"
                        Template="{StaticResource ColorPickerSliderThumbTemplate}">
                        <Thumb.Effect>
                            <DropShadowEffect Opacity=".6" ShadowDepth="0" />
                        </Thumb.Effect>
                    </Thumb>
                </Track.Thumb>
            </Track>
        </hc:SimplePanel>
    </ControlTemplate>
    <Style
        x:Key="ColorPickerSlider"
        TargetType="Slider"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="Foreground" Value="Transparent" />
        <Setter Property="Template" Value="{StaticResource ColorPickerSliderHorizontal}" />
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Vertical">
                <Setter Property="Template" Value="{StaticResource ColorPickerSliderVertical}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ColorPickerBaseStyle" TargetType="hc:ColorPicker">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Width" Value="230" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="UseLayoutRounding" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:ColorPicker">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="122" />
                            <RowDefinition Height="110" />
                            <RowDefinition Height="62" />
                            <RowDefinition Height="auto" />
                        </Grid.RowDefinitions>
                        <Border
                            Grid.RowSpan="4"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="1" />
                        <hc:SimplePanel Grid.Row="0" Margin="1">
                            <Border Background="{TemplateBinding BackColor}" />
                            <Border>
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="1,0.5" EndPoint="0,0.5">
                                        <GradientStop Offset="1" Color="White" />
                                        <GradientStop Offset=".5" Color="#80ffffff" />
                                        <GradientStop Color="#00ffffff" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border>
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                        <GradientStop Offset="1" Color="Black" />
                                        <GradientStop Offset=".5" Color="#80000000" />
                                        <GradientStop Color="#00000000" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                        </hc:SimplePanel>
                        <Border
                            Name="PART_BorderColor"
                            Grid.Row="0"
                            ClipToBounds="True"
                            CornerRadius="2,2,0,0">
                            <Canvas Margin="-6">
                                <Border
                                    Name="PART_BorderPicker"
                                    Width="12"
                                    Height="12"
                                    Background="Transparent"
                                    BorderBrush="White"
                                    BorderThickness="1"
                                    CornerRadius="6">
                                    <Border.Effect>
                                        <DropShadowEffect Opacity=".4" ShadowDepth="0" />
                                    </Border.Effect>
                                </Border>
                            </Canvas>
                        </Border>
                        <Border
                            Name="PART_BorderDrag"
                            Grid.Row="0"
                            Background="Transparent" />
                        <Grid Grid.Row="1" Margin="16,16,10,0">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition />
                                <ColumnDefinition Width="28" />
                            </Grid.ColumnDefinitions>
                            <ToggleButton
                                Name="PART_ButtonDropper"
                                Width="16"
                                Height="16"
                                Margin="0,0,10,0"
                                hc:StatusSwitchElement.HideUncheckedElement="True"
                                Style="{StaticResource ToggleButtonCustom}">
                                <Path
                                    Data="{StaticResource DropperGeometry}"
                                    Fill="{DynamicResource PrimaryTextBrush}"
                                    Stretch="Uniform" />
                                <hc:StatusSwitchElement.CheckedElement>
                                    <Path
                                        Data="{StaticResource DropperGeometry}"
                                        Fill="{DynamicResource DarkPrimaryBrush}"
                                        Stretch="Uniform" />
                                </hc:StatusSwitchElement.CheckedElement>
                            </ToggleButton>
                            <Border
                                Grid.Row="0"
                                Grid.Column="1"
                                Width="32"
                                Height="32"
                                Background="{StaticResource ColorPickerOpacityBrush}"
                                BorderBrush="{DynamicResource BorderBrush}"
                                BorderThickness="1"
                                CornerRadius="16" />
                            <Border
                                Grid.Row="0"
                                Grid.Column="1"
                                Width="32"
                                Height="32"
                                Background="{TemplateBinding SelectedBrush}"
                                BorderBrush="{DynamicResource BorderBrush}"
                                BorderThickness="1"
                                CornerRadius="16" />
                            <Slider
                                Name="PART_SliderColor"
                                Grid.Row="0"
                                Grid.Column="2"
                                Grid.ColumnSpan="2"
                                Margin="2,1,0,0"
                                VerticalAlignment="Top"
                                Background="{StaticResource ColorPickerRainbowBrush}"
                                IsMoveToPointEnabled="True"
                                LargeChange="0.01"
                                Maximum="6"
                                SmallChange="0.01"
                                Style="{StaticResource ColorPickerSlider}"
                                Value="6" />
                            <Slider
                                Name="PART_SliderOpacity"
                                Grid.Row="0"
                                Grid.Column="2"
                                Grid.ColumnSpan="2"
                                Margin="2,0,0,0"
                                VerticalAlignment="Bottom"
                                Background="{StaticResource ColorPickerOpacityBrush}"
                                Foreground="{TemplateBinding SelectedBrushWithoutOpacity}"
                                IsMoveToPointEnabled="True"
                                IsSnapToTickEnabled="True"
                                Maximum="255"
                                SmallChange="1"
                                Style="{StaticResource ColorPickerSlider}"
                                Value="{Binding ChannelA, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" />
                            <StackPanel
                                Grid.Row="1"
                                Grid.Column="0"
                                Grid.ColumnSpan="3"
                                Margin="0,14,0,0"
                                VerticalAlignment="Top"
                                Visibility="{Binding ShowList[0], RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}">
                                <TextBox
                                    Width="176"
                                    Height="24"
                                    Padding="0"
                                    HorizontalContentAlignment="Center"
                                    FontSize="10"
                                    MaxLength="10"
                                    Text="{Binding SelectedBrush, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Converter={StaticResource Color2HexStringConverter}, UpdateSourceTrigger=LostFocus}" />
                                <TextBlock
                                    Margin="0,2,0,0"
                                    HorizontalAlignment="Center"
                                    FontSize="10"
                                    Foreground="{DynamicResource ThirdlyTextBrush}"
                                    Text="HEX" />
                            </StackPanel>
                            <UniformGrid
                                Name="PART_PanelRgb"
                                Grid.Row="1"
                                Grid.Column="0"
                                Grid.ColumnSpan="3"
                                Margin="-2,14,-2,0"
                                VerticalAlignment="Top"
                                Rows="1"
                                Visibility="{Binding ShowList[1], RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}">
                                <StackPanel Margin="2,0">
                                    <hc:NumericUpDown
                                        Height="24"
                                        Padding="2,0"
                                        HorizontalContentAlignment="Center"
                                        FontSize="10"
                                        Maximum="255"
                                        Minimum="0"
                                        ShowUpDownButton="False"
                                        Tag="R"
                                        Value="{Binding ChannelR, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" />
                                    <TextBlock
                                        Margin="0,2,0,0"
                                        HorizontalAlignment="Center"
                                        FontSize="10"
                                        Foreground="{DynamicResource ThirdlyTextBrush}"
                                        Text="R" />
                                </StackPanel>
                                <StackPanel Margin="2,0">
                                    <hc:NumericUpDown
                                        Height="24"
                                        Padding="0"
                                        HorizontalContentAlignment="Center"
                                        FontSize="10"
                                        Maximum="255"
                                        Minimum="0"
                                        ShowUpDownButton="False"
                                        Tag="G"
                                        Value="{Binding ChannelG, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" />
                                    <TextBlock
                                        Margin="0,2,0,0"
                                        HorizontalAlignment="Center"
                                        FontSize="10"
                                        Foreground="{DynamicResource ThirdlyTextBrush}"
                                        Text="G" />
                                </StackPanel>
                                <StackPanel Margin="2,0">
                                    <hc:NumericUpDown
                                        Height="24"
                                        Padding="0"
                                        HorizontalContentAlignment="Center"
                                        FontSize="10"
                                        Maximum="255"
                                        Minimum="0"
                                        ShowUpDownButton="False"
                                        Tag="B"
                                        Value="{Binding ChannelB, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" />
                                    <TextBlock
                                        Margin="0,2,0,0"
                                        HorizontalAlignment="Center"
                                        FontSize="10"
                                        Foreground="{DynamicResource ThirdlyTextBrush}"
                                        Text="B" />
                                </StackPanel>
                                <StackPanel Margin="2,0">
                                    <hc:NumericUpDown
                                        Height="24"
                                        Padding="0"
                                        HorizontalContentAlignment="Center"
                                        FontSize="10"
                                        Maximum="255"
                                        Minimum="0"
                                        ShowUpDownButton="False"
                                        Value="{Binding ChannelA, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                    <TextBlock
                                        Margin="0,2,0,0"
                                        HorizontalAlignment="Center"
                                        FontSize="10"
                                        Foreground="{DynamicResource ThirdlyTextBrush}"
                                        Text="A" />
                                </StackPanel>
                            </UniformGrid>
                            <Button
                                Grid.Row="1"
                                Grid.Column="3"
                                Width="20"
                                Height="24"
                                Padding="6"
                                HorizontalAlignment="Right"
                                BorderThickness="0"
                                Command="interactivity:ControlCommands.Switch"
                                FontSize="8">
                                <Button.Content>
                                    <Path Fill="#323534" Style="{StaticResource UpDownPathStyle}" />
                                </Button.Content>
                            </Button>
                        </Grid>
                        <Border
                            Grid.Row="2"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0">
                            <WrapPanel
                                Name="PART_PanelColor"
                                Margin="6"
                                HorizontalAlignment="Center" />
                        </Border>
                        <Border
                            Grid.Row="3"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="0,1,0,0"
                            Visibility="{Binding ShowList[2], RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}">
                            <StackPanel
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Orientation="Horizontal">
                                <Button
                                    Width="80"
                                    Margin="0,0,16,0"
                                    Command="interactivity:ControlCommands.Cancel"
                                    Content="{ex:Lang Key={x:Static langs:LangKeys.Cancel}}" />
                                <Button
                                    Width="80"
                                    Command="interactivity:ControlCommands.Confirm"
                                    Content="{ex:Lang Key={x:Static langs:LangKeys.Confirm}}"
                                    Style="{StaticResource ButtonPrimary}" />
                            </StackPanel>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ContextMenuBaseStyle" TargetType="ContextMenu">
        <Setter Property="hc:MenuAttach.ItemPadding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="hc:MenuAttach.PopupVerticalOffset" Value="-9" />
        <Setter Property="hc:MenuAttach.PopupHorizontalOffset" Value="10" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Padding" Value="2,2,2,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContextMenu">
                    <Border
                        MaxHeight="{TemplateBinding MaxHeight}"
                        Margin="8"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{DynamicResource BorderBrush}"
                        BorderThickness="1"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        Effect="{StaticResource EffectShadow2}">
                        <ScrollViewer Margin="{TemplateBinding Padding}" Style="{StaticResource ScrollViewerUpDown}">
                            <ItemsPresenter />
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CoverViewContentBaseStyle" TargetType="hc:CoverViewContent">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Margin" Value="0,0,0,8" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:CoverViewContent">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="16" />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Border
                            x:Name="PART_Triangle"
                            Grid.Row="0"
                            Grid.RowSpan="2"
                            Width="30"
                            Height="30"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Top"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="1"
                            RenderTransformOrigin="0.5,0.5"
                            Visibility="Visible">
                            <Border.RenderTransform>
                                <TransformGroup>
                                    <TranslateTransform X="5" Y="5" />
                                    <RotateTransform Angle="45" />
                                </TransformGroup>
                            </Border.RenderTransform>
                        </Border>
                        <Border
                            x:Name="PART_Content"
                            Grid.Row="1"
                            Height="0"
                            MinHeight="30"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                            <ContentPresenter Margin="{TemplateBinding Padding}" />
                        </Border>
                        <Rectangle
                            Grid.Row="1"
                            Width="28"
                            Height="1"
                            Margin="{Binding Margin, ElementName=PART_Triangle}"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Top"
                            Fill="{TemplateBinding Background}"
                            SnapsToDevicePixels="True"
                            Visibility="{Binding Visibility, ElementName=PART_Triangle}">
                            <Rectangle.RenderTransform>
                                <TransformGroup>
                                    <TranslateTransform X="1" />
                                </TransformGroup>
                            </Rectangle.RenderTransform>
                        </Rectangle>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CoverViewBaseStyle" TargetType="hc:CoverView">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource CoverViewItemBaseStyle}" />
        <Setter Property="CoverViewContentStyle" Value="{StaticResource CoverViewContentBaseStyle}" />
        <Setter Property="ItemMargin" Value="8" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:CoverView">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <WrapPanel x:Name="PART_Panel" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="DatePickerTextBoxStyle" TargetType="DatePickerTextBox">
        <Setter Property="Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource AncestorType=DatePicker}}" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="CaretBrush" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DatePickerTextBox">
                    <hc:SimplePanel>
                        <TextBlock
                            Margin="{TemplateBinding Padding}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource AncestorType=DatePicker}}"
                            TextElement.Foreground="{DynamicResource ThirdlyTextBrush}"
                            Visibility="{TemplateBinding Text,
                                                         Converter={StaticResource String2VisibilityReConverter}}" />
                        <ScrollViewer
                            x:Name="PART_ContentHost"
                            Margin="-2,0"
                            Padding="{TemplateBinding Padding}"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </hc:SimplePanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="DatePickerBaseStyle"
        TargetType="DatePicker"
        BasedOn="{StaticResource InputElementBaseStyle}">
        <Setter Property="CalendarStyle" Value="{StaticResource CalendarBaseStyle}" />
        <Setter Property="IsTodayHighlighted" Value="True" />
        <Setter Property="SelectedDateFormat" Value="Short" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DatePicker">
                    <Grid x:Name="PART_Root">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Border
                            x:Name="border"
                            Grid.ColumnSpan="2"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                        <Button
                            x:Name="PART_Button"
                            Grid.Row="0"
                            Grid.Column="1"
                            Width="Auto"
                            Height="Auto"
                            Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            hc:IconElement.Geometry="{StaticResource CalendarGeometry}"
                            hc:IconElement.Width="14"
                            Focusable="False"
                            Foreground="{Binding BorderBrush, ElementName=border}"
                            Style="{StaticResource ButtonIcon}" />
                        <DatePickerTextBox
                            x:Name="PART_TextBox"
                            Grid.Row="0"
                            Grid.Column="0"
                            Padding="{TemplateBinding Padding}"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            Focusable="{TemplateBinding Focusable}"
                            Style="{StaticResource DatePickerTextBoxStyle}" />
                        <Popup
                            x:Name="PART_Popup"
                            Grid.Column="0"
                            AllowsTransparency="True"
                            Placement="Bottom"
                            PlacementTarget="{Binding ElementName=border}"
                            PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                            StaysOpen="False" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="hc:InfoElement.IsReadOnly" Value="True">
                            <Setter TargetName="PART_Button" Property="IsEnabled" Value="False" />
                            <Setter TargetName="PART_Button" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="PART_Root" Property="Opacity" Value="0.4" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="true" />
                                <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="true" />
                                <Condition SourceName="PART_Popup" Property="IsOpen" Value="true" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </MultiTrigger>
                        <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                        <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="DatePickerExtendTopTemplate" TargetType="DatePicker">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="PART_Root" Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    x:Name="PART_Button"
                    Grid.Row="0"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    hc:IconElement.Geometry="{StaticResource CalendarGeometry}"
                    hc:IconElement.Width="14"
                    Focusable="False"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}" />
                <DatePickerTextBox
                    x:Name="PART_TextBox"
                    Grid.Row="0"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Focusable="{TemplateBinding Focusable}"
                    Style="{StaticResource DatePickerTextBoxStyle}" />
                <Popup
                    x:Name="PART_Popup"
                    Grid.Column="0"
                    AllowsTransparency="True"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="hc:InfoElement.IsReadOnly" Value="True">
                <Setter TargetName="PART_Button" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="PART_Root" Property="Opacity" Value="0.4" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="true" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </MultiTrigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="DatePickerExtendLeftTemplate" TargetType="DatePicker">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="PART_Root" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    x:Name="PART_Button"
                    Grid.Row="0"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    hc:IconElement.Geometry="{StaticResource CalendarGeometry}"
                    hc:IconElement.Width="14"
                    Focusable="False"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}" />
                <DatePickerTextBox
                    x:Name="PART_TextBox"
                    Grid.Row="0"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Focusable="{TemplateBinding Focusable}"
                    Style="{StaticResource DatePickerTextBoxStyle}" />
                <Popup
                    x:Name="PART_Popup"
                    Grid.Column="0"
                    AllowsTransparency="True"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="hc:InfoElement.IsReadOnly" Value="True">
                <Setter TargetName="PART_Button" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="PART_Root" Property="Opacity" Value="0.4" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="true" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </MultiTrigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="DatePickerExtendBaseStyle"
        TargetType="DatePicker"
        BasedOn="{StaticResource DatePickerBaseStyle}">
        <Setter Property="Height" Value="Auto" />
        <Setter Property="hc:InfoElement.Symbol" Value="●" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="{x:Static system:Double.NaN}" />
        <Setter Property="hc:InfoElement.MinContentHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Template" Value="{StaticResource DatePickerExtendTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource DatePickerExtendLeftTemplate}" />
                <Setter Property="Width" Value="Auto" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="DatePickerPlusTopTemplate" TargetType="hc:DatePicker">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="PART_Root" Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Button
                    x:Name="PART_Button"
                    Grid.Row="0"
                    Grid.Column="2"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource CalendarGeometry}"
                    hc:IconElement.Width="14"
                    Focusable="False"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}" />
                <DatePickerTextBox
                    x:Name="PART_TextBox"
                    Grid.Row="0"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Focusable="{TemplateBinding Focusable}"
                    Style="{StaticResource DatePickerTextBoxStyle}" />
                <Popup
                    x:Name="PART_Popup"
                    Grid.Column="0"
                    AllowsTransparency="True"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="hc:InfoElement.IsReadOnly" Value="True">
                <Setter TargetName="ButtonClear" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="PART_Root" Property="Opacity" Value="0.4" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="true" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                    <Condition Property="hc:InfoElement.IsReadOnly" Value="False" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="DatePickerPlusLeftTemplate" TargetType="hc:DatePicker">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="PART_Root" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Button
                    x:Name="PART_Button"
                    Grid.Row="0"
                    Grid.Column="2"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource CalendarGeometry}"
                    hc:IconElement.Width="14"
                    Focusable="False"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}" />
                <DatePickerTextBox
                    x:Name="PART_TextBox"
                    Grid.Row="0"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Focusable="{TemplateBinding Focusable}"
                    Style="{StaticResource DatePickerTextBoxStyle}" />
                <Popup
                    x:Name="PART_Popup"
                    Grid.Column="0"
                    AllowsTransparency="True"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="hc:InfoElement.IsReadOnly" Value="True">
                <Setter TargetName="ButtonClear" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="PART_Root" Property="Opacity" Value="0.4" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="true" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                    <Condition Property="hc:InfoElement.IsReadOnly" Value="False" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="DatePickerPlusBaseStyle"
        TargetType="hc:DatePicker"
        BasedOn="{StaticResource DatePickerExtendBaseStyle}">
        <Setter Property="CaretBrush" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Template" Value="{StaticResource DatePickerPlusTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource DatePickerPlusLeftTemplate}" />
                <Setter Property="Width" Value="Auto" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="DateTimePickerBaseStyle"
        TargetType="hc:DateTimePicker"
        BasedOn="{StaticResource InputElementBaseStyle}">
        <Setter Property="CaretBrush" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:DateTimePicker">
                    <Grid x:Name="PART_Root">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Border
                            x:Name="border"
                            Grid.ColumnSpan="2"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                        <Button
                            x:Name="PART_Button"
                            Grid.Row="0"
                            Grid.Column="1"
                            Width="Auto"
                            Height="Auto"
                            Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            hc:IconElement.Geometry="{StaticResource ClockGeometry}"
                            hc:IconElement.Width="14"
                            Focusable="False"
                            Foreground="{Binding BorderBrush, ElementName=border}"
                            Style="{StaticResource ButtonIcon}" />
                        <hc:WatermarkTextBox
                            x:Name="PART_TextBox"
                            Grid.Row="0"
                            Grid.Column="0"
                            Padding="{TemplateBinding Padding}"
                            HorizontalAlignment="Stretch"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            CaretBrush="{TemplateBinding CaretBrush}"
                            Focusable="{TemplateBinding Focusable}"
                            Foreground="{TemplateBinding Foreground}" />
                        <Popup
                            x:Name="PART_Popup"
                            Grid.Column="0"
                            AllowsTransparency="True"
                            Placement="Bottom"
                            PlacementTarget="{Binding ElementName=border}"
                            PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                            StaysOpen="False" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="hc:InfoElement.IsReadOnly" Value="True">
                            <Setter TargetName="PART_Button" Property="IsEnabled" Value="False" />
                            <Setter TargetName="PART_Button" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="PART_Root" Property="Opacity" Value="0.4" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="true" />
                                <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="true" />
                                <Condition SourceName="PART_Popup" Property="IsOpen" Value="true" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </MultiTrigger>
                        <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                        <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="DateTimePickerExtendTopTemplate" TargetType="hc:DateTimePicker">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="PART_Root" Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    x:Name="PART_Button"
                    Grid.Row="0"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    hc:IconElement.Geometry="{StaticResource ClockGeometry}"
                    hc:IconElement.Width="14"
                    Focusable="False"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}" />
                <hc:WatermarkTextBox
                    x:Name="PART_TextBox"
                    Grid.Row="0"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    CaretBrush="{TemplateBinding CaretBrush}"
                    Focusable="{TemplateBinding Focusable}"
                    Foreground="{TemplateBinding Foreground}"
                    Watermark="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" />
                <Popup
                    x:Name="PART_Popup"
                    Grid.Column="0"
                    AllowsTransparency="True"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="hc:InfoElement.IsReadOnly" Value="True">
                <Setter TargetName="PART_Button" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="PART_Root" Property="Opacity" Value="0.4" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="true" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </MultiTrigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="DateTimePickerExtendLeftTemplate" TargetType="hc:DateTimePicker">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="PART_Root" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    x:Name="PART_Button"
                    Grid.Row="0"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    hc:IconElement.Geometry="{StaticResource ClockGeometry}"
                    hc:IconElement.Width="14"
                    Focusable="False"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}" />
                <hc:WatermarkTextBox
                    x:Name="PART_TextBox"
                    Grid.Row="0"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    CaretBrush="{TemplateBinding CaretBrush}"
                    Focusable="{TemplateBinding Focusable}"
                    Foreground="{TemplateBinding Foreground}"
                    Watermark="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" />
                <Popup
                    x:Name="PART_Popup"
                    Grid.Column="0"
                    AllowsTransparency="True"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="hc:InfoElement.IsReadOnly" Value="True">
                <Setter TargetName="PART_Button" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="PART_Root" Property="Opacity" Value="0.4" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="true" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </MultiTrigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="DateTimePickerExtendBaseStyle"
        TargetType="hc:DateTimePicker"
        BasedOn="{StaticResource DateTimePickerBaseStyle}">
        <Setter Property="Height" Value="Auto" />
        <Setter Property="hc:InfoElement.Symbol" Value="●" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="{x:Static system:Double.NaN}" />
        <Setter Property="hc:InfoElement.MinContentHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Template" Value="{StaticResource DateTimePickerExtendTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource DateTimePickerExtendLeftTemplate}" />
                <Setter Property="Width" Value="Auto" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="DateTimePickerPlusTopTemplate" TargetType="hc:DateTimePicker">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="PART_Root" Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Button
                    x:Name="PART_Button"
                    Grid.Row="0"
                    Grid.Column="2"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource ClockGeometry}"
                    hc:IconElement.Width="14"
                    Focusable="False"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}" />
                <hc:WatermarkTextBox
                    x:Name="PART_TextBox"
                    Grid.Row="0"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    CaretBrush="{TemplateBinding CaretBrush}"
                    Focusable="{TemplateBinding Focusable}"
                    Foreground="{TemplateBinding Foreground}"
                    Watermark="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" />
                <Popup
                    x:Name="PART_Popup"
                    Grid.Column="0"
                    AllowsTransparency="True"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="hc:InfoElement.IsReadOnly" Value="True">
                <Setter TargetName="ButtonClear" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="PART_Root" Property="Opacity" Value="0.4" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="true" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                    <Condition Property="hc:InfoElement.IsReadOnly" Value="False" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="DateTimePickerPlusLeftTemplate" TargetType="hc:DateTimePicker">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="PART_Root" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Button
                    x:Name="PART_Button"
                    Grid.Row="0"
                    Grid.Column="2"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource ClockGeometry}"
                    hc:IconElement.Width="14"
                    Focusable="False"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}" />
                <hc:WatermarkTextBox
                    x:Name="PART_TextBox"
                    Grid.Row="0"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    CaretBrush="{TemplateBinding CaretBrush}"
                    Focusable="{TemplateBinding Focusable}"
                    Foreground="{TemplateBinding Foreground}"
                    Watermark="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" />
                <Popup
                    x:Name="PART_Popup"
                    Grid.Column="0"
                    AllowsTransparency="True"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="hc:InfoElement.IsReadOnly" Value="True">
                <Setter TargetName="ButtonClear" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="PART_Root" Property="Opacity" Value="0.4" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="true" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                    <Condition Property="hc:InfoElement.IsReadOnly" Value="False" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="DateTimePickerPlusBaseStyle"
        TargetType="hc:DateTimePicker"
        BasedOn="{StaticResource DateTimePickerExtendBaseStyle}">
        <Setter Property="Template" Value="{StaticResource DateTimePickerPlusTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource DateTimePickerPlusLeftTemplate}" />
                <Setter Property="Width" Value="Auto" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="DialogBaseStyle" TargetType="hc:Dialog">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="MaskBrush" Value="{DynamicResource DarkOpacityBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Dialog">
                    <Border x:Name="PART_BackElement" Background="{TemplateBinding MaskBrush}">
                        <ContentPresenter
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="DividerBaseStyle" TargetType="hc:Divider">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Margin" Value="0,24" />
        <Setter Property="Padding" Value="24,0" />
        <Setter Property="LineStroke" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Divider">
                    <hc:Row>
                        <hc:Col x:Name="ColStart" Layout="12">
                            <Line
                                VerticalAlignment="Center"
                                Stretch="Fill"
                                Stroke="{TemplateBinding LineStroke}"
                                StrokeDashArray="{TemplateBinding LineStrokeDashArray}"
                                StrokeEndLineCap="Square"
                                StrokeStartLineCap="Square"
                                StrokeThickness="{TemplateBinding LineStrokeThickness}"
                                X2="1" />
                        </hc:Col>
                        <hc:Col IsFixed="True">
                            <ContentPresenter
                                Margin="{TemplateBinding Padding}"
                                ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
                        </hc:Col>
                        <hc:Col x:Name="ColEnd" Layout="12">
                            <Line
                                VerticalAlignment="Center"
                                Stretch="Fill"
                                Stroke="{TemplateBinding LineStroke}"
                                StrokeDashArray="{TemplateBinding LineStrokeDashArray}"
                                StrokeEndLineCap="Square"
                                StrokeStartLineCap="Square"
                                StrokeThickness="{TemplateBinding LineStrokeThickness}"
                                X2="1" />
                        </hc:Col>
                    </hc:Row>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter Property="Padding" Value="0" />
                        </Trigger>
                        <Trigger Property="HorizontalContentAlignment" Value="Left">
                            <Setter TargetName="ColStart" Property="Layout" Value="0" />
                            <Setter TargetName="ColStart" Property="IsFixed" Value="True" />
                            <Setter TargetName="ColStart" Property="Width" Value="20" />
                            <Setter TargetName="ColEnd" Property="Layout" Value="24" />
                        </Trigger>
                        <Trigger Property="HorizontalContentAlignment" Value="Right">
                            <Setter TargetName="ColEnd" Property="Layout" Value="0" />
                            <Setter TargetName="ColEnd" Property="IsFixed" Value="True" />
                            <Setter TargetName="ColEnd" Property="Width" Value="20" />
                            <Setter TargetName="ColStart" Property="Layout" Value="24" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Content" Value="{x:Null}">
                <Setter Property="Padding" Value="0" />
            </Trigger>
            <Trigger Property="Orientation" Value="Vertical">
                <Setter Property="Margin" Value="6,0" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="hc:Divider">
                            <Line
                                HorizontalAlignment="Center"
                                Stretch="Fill"
                                Stroke="{TemplateBinding LineStroke}"
                                StrokeDashArray="{TemplateBinding LineStrokeDashArray}"
                                StrokeEndLineCap="Square"
                                StrokeStartLineCap="Square"
                                StrokeThickness="{TemplateBinding LineStrokeThickness}"
                                Y2="1" />
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="DrawerBaseStyle" TargetType="hc:Drawer">
        <Setter Property="Dock" Value="Right" />
        <Setter Property="MaskBrush" Value="{DynamicResource DarkOpacityBrush}" />
    </Style>
    <DrawingBrush x:Key="EmptySimpleLogo" o:Freeze="True">
        <DrawingBrush.Drawing>
            <DrawingGroup o:Freeze="True">
                <GeometryDrawing
                    o:Freeze="True"
                    Brush="{DynamicResource SecondaryRegionBrush}"
                    Geometry="F1 M1638,1024z M0,0z M0,844.8C0,942.250667 361.096533,1021.269333 806.536533,1021.269333 1251.976533,1021.269333 1613.038933,942.250666 1613.038933,844.8 1613.038933,747.383467 1251.9424,668.398933 806.536533,668.398933 361.096533,668.398933 0,747.383467 0,844.8z" />
                <GeometryDrawing
                    o:Freeze="True"
                    Brush="{DynamicResource BorderBrush}"
                    Geometry="F1 M1638,1024z M0,0z M1398.784,580.164267L214.254933,580.164267 214.254933,330.6496 473.873067,35.771733C486.4,13.1072,509.1328,0.477867,531.797333,0.477867L1081.2416,0.477867C1103.940267,0.477867,1126.638933,13.1072,1141.725867,38.2976L1398.818133,330.6496 1398.818133,580.164267z M239.479467,555.008L1373.627733,555.008 1373.627733,338.261333 1121.553067,50.858667C1108.992,33.245867,1096.362667,23.210667,1081.2416,23.210667L531.797333,23.210667C516.676266,23.210667,504.081066,33.28,493.9776,48.401067L239.445333,340.753067 239.445333,554.973867z" />
                <GeometryDrawing
                    o:Freeze="True"
                    Brush="{DynamicResource SecondaryRegionBrush}"
                    Geometry="F1 M1638,1024z M0,0z M1048.4736,413.832533C1048.4736,373.521066,1073.664,340.753066,1103.940267,340.753067L1386.222933,340.753067 1386.222933,796.945067C1386.222933,849.851734,1353.454933,895.249067,1310.583467,895.249067L302.455467,895.249067C262.109867,895.249067,226.850134,852.3776,226.850133,796.945067L226.850133,340.753067 509.1328,340.753067C539.374933,340.753067 564.565333,373.521067 564.565333,413.832533 564.565333,454.143999 589.755733,486.912 619.997867,486.912L993.041067,486.912C1023.2832,489.437867,1048.4736,454.144,1048.4736,413.832533z" />
                <GeometryDrawing
                    o:Freeze="True"
                    Brush="{DynamicResource BorderBrush}"
                    Geometry="F1 M1638,1024z M0,0z M1310.583467,907.844267L302.455467,907.844267C254.5664,907.844267,214.2208,857.429334,214.2208,796.910933L214.2208,328.192 509.1328,328.192C546.9184,328.192 577.160533,365.9776 577.160533,413.866667 577.160533,446.634667 597.2992,474.350934 619.997867,474.350933L993.041067,474.350933C1015.7056,474.350933 1035.8784,446.634666 1035.8784,413.866667 1035.8784,365.9776 1066.120533,328.192 1103.940267,328.192L1398.818133,328.192 1398.818133,796.9792C1398.818133,857.463467,1360.9984,907.8784,1310.583467,907.8784z M239.445333,353.348267L239.445333,796.945067C239.445333,844.834134,267.1616,882.619734,302.455467,882.619733L1310.583467,882.619733C1345.877334,882.619733,1373.5936,844.834133,1373.5936,796.945067L1373.5936,353.348267 1103.940267,353.348267C1081.2416,353.348267 1061.0688,381.064534 1061.0688,413.832533 1061.0688,461.7216 1030.826667,499.5072 993.041067,499.5072L619.997867,499.5072C582.212267,499.5072 551.970134,461.7216 551.970133,413.832533 551.970133,381.064533 531.831466,350.8224 509.1328,350.8224L239.445333,350.8224 239.445333,353.348267z" />
            </DrawingGroup>
        </DrawingBrush.Drawing>
    </DrawingBrush>
    <Rectangle
        x:Key="LogoRectangle4Empty"
        Width="64"
        Height="41"
        HorizontalAlignment="Center"
        x:Shared="False"
        Fill="{StaticResource EmptySimpleLogo}" />
    <TextBlock
        x:Key="DescriptionTextBlock4Empty"
        Margin="0,10,0,0"
        HorizontalAlignment="Center"
        x:Shared="False"
        Foreground="{DynamicResource ThirdlyTextBrush}"
        Text="{ex:Lang Key={x:Static langs:LangKeys.NoData}}" />
    <Style x:Key="EmptyBaseStyle" TargetType="hc:Empty">
        <Setter Property="Logo" Value="{StaticResource LogoRectangle4Empty}" />
        <Setter Property="Description" Value="{StaticResource DescriptionTextBlock4Empty}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Visibility" Value="{Binding Path=(hc:Empty.ShowEmpty), RelativeSource={RelativeSource Self}, Converter={StaticResource Boolean2VisibilityConverter}}" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Empty">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <hc:SimpleStackPanel
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                            <ContentPresenter ContentSource="Logo" />
                            <ContentPresenter ContentSource="Description" />
                            <ContentPresenter HorizontalAlignment="Center" />
                        </hc:SimpleStackPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="ExpanderLeftTemplate" TargetType="Expander">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <ToggleButton
                x:Name="ToggleButton"
                Grid.Column="1"
                MinWidth="{TemplateBinding MinWidth}"
                Padding="0,0,0,10"
                VerticalAlignment="Stretch"
                VerticalContentAlignment="Stretch"
                hc:BorderElement.CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                Focusable="False"
                Foreground="{TemplateBinding Foreground}"
                IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                Style="{StaticResource ToggleButtonCustom}">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="30" />
                    </Grid.ColumnDefinitions>
                    <Grid.LayoutTransform>
                        <TransformGroup>
                            <RotateTransform Angle="-90" />
                        </TransformGroup>
                    </Grid.LayoutTransform>
                    <ContentPresenter
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        ContentSource="Header" />
                    <Path
                        Name="PathArrow"
                        Grid.Column="1"
                        Width="12"
                        HorizontalAlignment="Center"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Data="{StaticResource UpGeometry}"
                        Fill="{TemplateBinding Foreground}"
                        IsHitTestVisible="False"
                        Stretch="Uniform" />
                </Grid>
            </ToggleButton>
            <ContentPresenter
                Name="ExpandSite"
                Grid.Column="0"
                Visibility="Collapsed" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsExpanded" Value="true">
                <Setter TargetName="ToggleButton" Property="hc:BorderElement.CornerRadius" Value="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='0,1,1,0'}" />
                <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
                <Setter TargetName="PathArrow" Property="Data" Value="{StaticResource DownGeometry}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Opacity" Value=".4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ExpanderUpTemplate" TargetType="Expander">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <ToggleButton
                x:Name="ToggleButton"
                Grid.Row="1"
                MinHeight="{TemplateBinding MinHeight}"
                Padding="10,0,0,0"
                HorizontalAlignment="Stretch"
                HorizontalContentAlignment="Stretch"
                hc:BorderElement.CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                Focusable="False"
                Foreground="{TemplateBinding Foreground}"
                IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                Style="{StaticResource ToggleButtonCustom}">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="30" />
                    </Grid.ColumnDefinitions>
                    <ContentPresenter
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        ContentSource="Header" />
                    <Path
                        Name="PathArrow"
                        Grid.Column="1"
                        Width="12"
                        HorizontalAlignment="Center"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Data="{StaticResource UpGeometry}"
                        Fill="{TemplateBinding Foreground}"
                        IsHitTestVisible="False"
                        Stretch="Uniform" />
                </Grid>
            </ToggleButton>
            <ContentPresenter
                Name="ExpandSite"
                Grid.Row="0"
                Visibility="Collapsed" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsExpanded" Value="true">
                <Setter TargetName="ToggleButton" Property="hc:BorderElement.CornerRadius" Value="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='0,0,1,1'}" />
                <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
                <Setter TargetName="PathArrow" Property="Data" Value="{StaticResource DownGeometry}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Opacity" Value=".4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ExpanderRightTemplate" TargetType="Expander">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <ToggleButton
                x:Name="ToggleButton"
                MinWidth="{TemplateBinding MinWidth}"
                Padding="0,0,0,10"
                VerticalAlignment="Stretch"
                VerticalContentAlignment="Stretch"
                hc:BorderElement.CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                Focusable="False"
                Foreground="{TemplateBinding Foreground}"
                IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                Style="{StaticResource ToggleButtonCustom}">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="30" />
                    </Grid.ColumnDefinitions>
                    <Grid.LayoutTransform>
                        <TransformGroup>
                            <RotateTransform Angle="-90" />
                        </TransformGroup>
                    </Grid.LayoutTransform>
                    <ContentPresenter
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        ContentSource="Header" />
                    <Path
                        Name="PathArrow"
                        Grid.Column="1"
                        Width="12"
                        HorizontalAlignment="Center"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Data="{StaticResource DownGeometry}"
                        Fill="{TemplateBinding Foreground}"
                        IsHitTestVisible="False"
                        Stretch="Uniform" />
                </Grid>
            </ToggleButton>
            <ContentPresenter
                Name="ExpandSite"
                Grid.Column="1"
                Visibility="Collapsed" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsExpanded" Value="true">
                <Setter TargetName="ToggleButton" Property="hc:BorderElement.CornerRadius" Value="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='1,0,0,1'}" />
                <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
                <Setter TargetName="PathArrow" Property="Data" Value="{StaticResource UpGeometry}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Opacity" Value=".4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ExpanderDownTemplate" TargetType="Expander">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <ToggleButton
                x:Name="ToggleButton"
                MinHeight="{TemplateBinding MinHeight}"
                Padding="10,0,0,0"
                HorizontalAlignment="Stretch"
                HorizontalContentAlignment="Stretch"
                hc:BorderElement.CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                Focusable="False"
                Foreground="{TemplateBinding Foreground}"
                IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                Style="{StaticResource ToggleButtonCustom}">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="30" />
                    </Grid.ColumnDefinitions>
                    <ContentPresenter
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        ContentSource="Header" />
                    <Path
                        Name="PathArrow"
                        Grid.Column="1"
                        Width="12"
                        HorizontalAlignment="Center"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Data="{StaticResource DownGeometry}"
                        Fill="{TemplateBinding Foreground}"
                        IsHitTestVisible="False"
                        Stretch="Uniform" />
                </Grid>
            </ToggleButton>
            <ContentPresenter
                Name="ExpandSite"
                Grid.Row="1"
                Visibility="Collapsed" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsExpanded" Value="true">
                <Setter TargetName="ToggleButton" Property="hc:BorderElement.CornerRadius" Value="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='1,1,0,0'}" />
                <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
                <Setter TargetName="PathArrow" Property="Data" Value="{StaticResource UpGeometry}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Opacity" Value=".4" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="ExpanderBaseStyle" TargetType="Expander">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="MinWidth" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template" Value="{StaticResource ExpanderDownTemplate}" />
        <Style.Triggers>
            <Trigger Property="ExpandDirection" Value="Left">
                <Setter Property="Template" Value="{StaticResource ExpanderLeftTemplate}" />
            </Trigger>
            <Trigger Property="ExpandDirection" Value="Up">
                <Setter Property="Template" Value="{StaticResource ExpanderUpTemplate}" />
            </Trigger>
            <Trigger Property="ExpandDirection" Value="Right">
                <Setter Property="Template" Value="{StaticResource ExpanderRightTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="FlowDocumentScrollViewerBaseStyle" TargetType="FlowDocumentScrollViewer">
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Local" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="FlowDocumentScrollViewer">
                    <DockPanel Background="{TemplateBinding Background}" LastChildFill="True">
                        <Grid
                            x:Name="PART_ToolBarHost"
                            Margin="0,6"
                            Panel.ZIndex="1"
                            DockPanel.Dock="Bottom">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Border
                                x:Name="PART_FindToolBarHost"
                                Grid.Column="0"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Center"
                                Visibility="Collapsed" />
                            <Grid
                                Grid.Column="1"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Center">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <RepeatButton
                                    Grid.Column="0"
                                    Width="20"
                                    Height="20"
                                    Padding="5,8"
                                    hc:BorderElement.CornerRadius="10"
                                    hc:IconElement.Geometry="{StaticResource SubGeometry}"
                                    Command="NavigationCommands.DecreaseZoom"
                                    IsEnabled="{TemplateBinding CanDecreaseZoom}"
                                    ToolTip="{x:Static langs:Lang.ZoomOut}" />
                                <Slider
                                    Grid.Column="1"
                                    Width="180"
                                    HorizontalAlignment="Stretch"
                                    VerticalAlignment="Center"
                                    hc:TipElement.Placement="Top"
                                    hc:TipElement.Visibility="Visible"
                                    LargeChange="{TemplateBinding ZoomIncrement}"
                                    Maximum="{TemplateBinding MaxZoom}"
                                    Minimum="{TemplateBinding MinZoom}"
                                    SmallChange="{TemplateBinding ZoomIncrement}"
                                    TickFrequency="{TemplateBinding ZoomIncrement}"
                                    Value="{Binding Zoom, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                                <RepeatButton
                                    Grid.Column="2"
                                    Width="20"
                                    Height="20"
                                    Padding="4"
                                    hc:BorderElement.CornerRadius="10"
                                    hc:IconElement.Geometry="{StaticResource AddGeometry}"
                                    Command="NavigationCommands.IncreaseZoom"
                                    IsEnabled="{TemplateBinding CanIncreaseZoom}"
                                    ToolTip="{x:Static langs:Lang.ZoomIn}" />
                            </Grid>
                        </Grid>
                        <Border
                            Margin="{TemplateBinding Padding}"
                            Panel.ZIndex="0"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                            <ScrollViewer
                                x:Name="PART_ContentHost"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                CanContentScroll="True" />
                        </Border>
                    </DockPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="FlowDocumentPageViewerBaseStyle" TargetType="FlowDocumentPageViewer">
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Local" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="FlowDocumentPageViewer">
                    <DockPanel Background="{TemplateBinding Background}" LastChildFill="True">
                        <Grid
                            Margin="0,6"
                            HorizontalAlignment="Stretch"
                            Panel.ZIndex="1"
                            DockPanel.Dock="Bottom">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Border
                                x:Name="PART_FindToolBarHost"
                                Grid.Column="0"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Center"
                                Visibility="Collapsed" />
                            <StackPanel
                                Grid.Column="1"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Orientation="Horizontal">
                                <RepeatButton
                                    Width="20"
                                    Height="20"
                                    Padding="4"
                                    hc:BorderElement.CornerRadius="10"
                                    hc:IconElement.Geometry="{StaticResource LeftGeometry}"
                                    Command="NavigationCommands.PreviousPage"
                                    IsEnabled="{TemplateBinding CanGoToPreviousPage}"
                                    ToolTip="{x:Static langs:Lang.PreviousPage}" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
                                    <Run Text=" " />
                                    <InlineUIContainer>
                                        <TextBlock Text="{Binding MasterPageNumber, RelativeSource={RelativeSource TemplatedParent}}" />
                                    </InlineUIContainer>
                                    <Run Text=" " />
                                    <Run Text="/" />
                                    <Run Text=" " />
                                    <InlineUIContainer>
                                        <TextBlock Text="{Binding PageCount, RelativeSource={RelativeSource TemplatedParent}}" />
                                    </InlineUIContainer>
                                    <Run Text=" " />
                                </TextBlock>
                                <RepeatButton
                                    Width="20"
                                    Height="20"
                                    Padding="4"
                                    hc:BorderElement.CornerRadius="10"
                                    hc:IconElement.Geometry="{StaticResource RightGeometry}"
                                    Command="NavigationCommands.NextPage"
                                    IsEnabled="{TemplateBinding CanGoToNextPage}"
                                    ToolTip="{x:Static langs:Lang.NextPage}" />
                            </StackPanel>
                            <Grid
                                Grid.Column="2"
                                Margin="32,0,0,0"
                                VerticalAlignment="Center">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <RepeatButton
                                    Grid.Column="0"
                                    Width="20"
                                    Height="20"
                                    Padding="5,8"
                                    hc:BorderElement.CornerRadius="10"
                                    hc:IconElement.Geometry="{StaticResource SubGeometry}"
                                    Command="NavigationCommands.DecreaseZoom"
                                    IsEnabled="{TemplateBinding CanDecreaseZoom}"
                                    ToolTip="{x:Static langs:Lang.ZoomOut}" />
                                <Slider
                                    Grid.Column="1"
                                    HorizontalAlignment="Stretch"
                                    VerticalAlignment="Center"
                                    hc:TipElement.Placement="Top"
                                    hc:TipElement.Visibility="Visible"
                                    LargeChange="{TemplateBinding ZoomIncrement}"
                                    Maximum="{TemplateBinding MaxZoom}"
                                    Minimum="{TemplateBinding MinZoom}"
                                    SmallChange="{TemplateBinding ZoomIncrement}"
                                    TickFrequency="{TemplateBinding ZoomIncrement}"
                                    Value="{Binding Zoom, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                                <RepeatButton
                                    Grid.Column="2"
                                    Width="20"
                                    Height="20"
                                    Padding="4"
                                    hc:BorderElement.CornerRadius="10"
                                    hc:IconElement.Geometry="{StaticResource AddGeometry}"
                                    Command="NavigationCommands.IncreaseZoom"
                                    IsEnabled="{TemplateBinding CanIncreaseZoom}"
                                    ToolTip="{x:Static langs:Lang.ZoomIn}" />
                            </Grid>
                        </Grid>
                        <Border
                            Margin="{TemplateBinding Padding}"
                            Panel.ZIndex="0"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                            <AdornerDecorator>
                                <DocumentPageView
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    DocumentPaginator="{x:Null}"
                                    DocumentViewerBase.IsMasterPage="True"
                                    KeyboardNavigation.IsTabStop="False"
                                    KeyboardNavigation.TabIndex="1"
                                    KeyboardNavigation.TabNavigation="Local"
                                    PageNumber="0" />
                            </AdornerDecorator>
                        </Border>
                    </DockPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="FlowDocumentReaderBaseStyle" TargetType="FlowDocumentReader">
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Local" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="FlowDocumentReader">
                    <DockPanel Background="{TemplateBinding Background}" LastChildFill="True">
                        <Grid
                            Margin="0,6"
                            HorizontalAlignment="Stretch"
                            Panel.ZIndex="1"
                            DockPanel.Dock="Bottom">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <StackPanel Orientation="Horizontal">
                                <ToggleButton
                                    x:Name="FindButton"
                                    Width="24"
                                    Height="24"
                                    Margin="0,0,10,0"
                                    Padding="5"
                                    hc:IconElement.Geometry="{StaticResource SearchGeometry}"
                                    Command="ApplicationCommands.Find"
                                    ToolTip="{x:Static langs:Lang.Find}" />
                                <Border
                                    x:Name="PART_FindToolBarHost"
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Center"
                                    Visibility="Collapsed" />
                            </StackPanel>
                            <StackPanel
                                x:Name="PageCountAndButtons"
                                Grid.Column="1"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Orientation="Horizontal">
                                <RepeatButton
                                    Width="20"
                                    Height="20"
                                    Padding="4"
                                    hc:BorderElement.CornerRadius="10"
                                    hc:IconElement.Geometry="{StaticResource LeftGeometry}"
                                    Command="NavigationCommands.PreviousPage"
                                    IsEnabled="{TemplateBinding CanGoToPreviousPage}"
                                    ToolTip="{x:Static langs:Lang.PreviousPage}" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
                                    <Run Text=" " />
                                    <InlineUIContainer>
                                        <TextBlock Text="{Binding PageNumber, RelativeSource={RelativeSource TemplatedParent}}" />
                                    </InlineUIContainer>
                                    <Run Text=" " />
                                    <Run Text="/" />
                                    <Run Text=" " />
                                    <InlineUIContainer>
                                        <TextBlock Text="{Binding PageCount, RelativeSource={RelativeSource TemplatedParent}}" />
                                    </InlineUIContainer>
                                    <Run Text=" " />
                                </TextBlock>
                                <RepeatButton
                                    Width="20"
                                    Height="20"
                                    Padding="4"
                                    hc:BorderElement.CornerRadius="10"
                                    hc:IconElement.Geometry="{StaticResource RightGeometry}"
                                    Command="NavigationCommands.NextPage"
                                    IsEnabled="{TemplateBinding CanGoToNextPage}"
                                    ToolTip="{x:Static langs:Lang.NextPage}" />
                            </StackPanel>
                            <Grid
                                Grid.Column="2"
                                Margin="32,0,0,0"
                                VerticalAlignment="Center">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <hc:ButtonGroup Width="90">
                                    <RadioButton
                                        x:Name="PageViewButton"
                                        Padding="0"
                                        hc:IconElement.Geometry="{StaticResource PageModeGeometry}"
                                        Command="FlowDocumentReader.SwitchViewingModeCommand"
                                        CommandParameter="Page"
                                        GroupName="ViewingMode"
                                        IsEnabled="{TemplateBinding IsPageViewEnabled}"
                                        ToolTip="{x:Static langs:Lang.PageMode}" />
                                    <RadioButton
                                        x:Name="TwoPageViewButton"
                                        Padding="0"
                                        hc:IconElement.Geometry="{StaticResource TwoPageModeGeometry}"
                                        Command="FlowDocumentReader.SwitchViewingModeCommand"
                                        CommandParameter="TwoPage"
                                        GroupName="ViewingMode"
                                        IsEnabled="{TemplateBinding IsTwoPageViewEnabled}"
                                        ToolTip="{x:Static langs:Lang.TwoPageMode}" />
                                    <RadioButton
                                        x:Name="ScrollViewButton"
                                        Padding="0"
                                        hc:IconElement.Geometry="{StaticResource ScrollModeGeometry}"
                                        Command="FlowDocumentReader.SwitchViewingModeCommand"
                                        CommandParameter="Scroll"
                                        GroupName="ViewingMode"
                                        IsEnabled="{TemplateBinding IsScrollViewEnabled}"
                                        ToolTip="{x:Static langs:Lang.ScrollMode}" />
                                </hc:ButtonGroup>
                                <RepeatButton
                                    Grid.Column="1"
                                    Width="20"
                                    Height="20"
                                    Margin="32,0,0,0"
                                    Padding="5,8"
                                    hc:BorderElement.CornerRadius="10"
                                    hc:IconElement.Geometry="{StaticResource SubGeometry}"
                                    Command="NavigationCommands.DecreaseZoom"
                                    IsEnabled="{TemplateBinding CanDecreaseZoom}"
                                    ToolTip="{x:Static langs:Lang.ZoomOut}" />
                                <Slider
                                    Grid.Column="2"
                                    HorizontalAlignment="Stretch"
                                    VerticalAlignment="Center"
                                    hc:TipElement.Placement="Top"
                                    hc:TipElement.Visibility="Visible"
                                    LargeChange="{TemplateBinding ZoomIncrement}"
                                    Maximum="{TemplateBinding MaxZoom}"
                                    Minimum="{TemplateBinding MinZoom}"
                                    SmallChange="{TemplateBinding ZoomIncrement}"
                                    TickFrequency="{TemplateBinding ZoomIncrement}"
                                    Value="{Binding Zoom, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                                <RepeatButton
                                    Grid.Column="3"
                                    Width="20"
                                    Height="20"
                                    Padding="4"
                                    hc:BorderElement.CornerRadius="10"
                                    hc:IconElement.Geometry="{StaticResource AddGeometry}"
                                    Command="NavigationCommands.IncreaseZoom"
                                    IsEnabled="{TemplateBinding CanIncreaseZoom}"
                                    ToolTip="{x:Static langs:Lang.ZoomIn}" />
                            </Grid>
                        </Grid>
                        <Border
                            x:Name="PART_ContentHost"
                            Margin="{TemplateBinding Padding}"
                            Panel.ZIndex="0"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            KeyboardNavigation.IsTabStop="False"
                            KeyboardNavigation.TabIndex="1"
                            KeyboardNavigation.TabNavigation="Local" />
                    </DockPanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="ViewingMode" Value="Page">
                            <Setter TargetName="PageViewButton" Property="IsChecked" Value="True" />
                        </Trigger>
                        <Trigger Property="ViewingMode" Value="TwoPage">
                            <Setter TargetName="TwoPageViewButton" Property="IsChecked" Value="True" />
                            <Setter Property="BorderThickness" Value="0" />
                        </Trigger>
                        <Trigger Property="ViewingMode" Value="Scroll">
                            <Setter TargetName="ScrollViewButton" Property="IsChecked" Value="True" />
                            <Setter TargetName="PageCountAndButtons" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="Document" Value="{x:Null}">
                            <Setter TargetName="FindButton" Property="IsEnabled" Value="False" />
                        </Trigger>
                        <Trigger Property="IsFindEnabled" Value="False">
                            <Setter TargetName="FindButton" Property="IsEnabled" Value="False" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="MenuItem4FrameStyle"
        TargetType="MenuItem"
        BasedOn="{StaticResource MenuItemBaseStyle}">
        <Setter Property="Header" Value="{Binding (JournalEntry.Name)}" />
        <Setter Property="Command" Value="NavigationCommands.NavigateJournal" />
        <Setter Property="CommandTarget" Value="{Binding TemplatedParent, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
        <Setter Property="CommandParameter" Value="{Binding RelativeSource={RelativeSource Self}}" />
    </Style>
    <ControlTemplate x:Key="FrameWithNavigationUIStyle" TargetType="Frame">
        <Border
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
            <DockPanel LastChildFill="True">
                <Border
                    Background="{DynamicResource DarkDefaultBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="0,0,0,1"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='1,1,0,0'}"
                    DockPanel.Dock="Top">
                    <hc:ButtonGroup
                        x:Name="NavChrome"
                        Width="90"
                        Margin="10,6"
                        HorizontalAlignment="Left">
                        <Button
                            Padding="6"
                            hc:IconElement.Geometry="{StaticResource LeftGeometry}"
                            Command="NavigationCommands.BrowseBack">
                            <Button.ContextMenu>
                                <ContextMenu
                                    x:Name="BackNavMenu"
                                    ItemContainerStyle="{StaticResource MenuItem4FrameStyle}"
                                    ItemsSource="{Binding Path=(NavigationWindow.BackStack), RelativeSource={RelativeSource TemplatedParent}}" />
                            </Button.ContextMenu>
                        </Button>
                        <Button
                            Padding="6"
                            hc:IconElement.Geometry="{StaticResource RightGeometry}"
                            Command="NavigationCommands.BrowseForward">
                            <Button.ContextMenu>
                                <ContextMenu
                                    x:Name="ForwardNavMenu"
                                    ItemContainerStyle="{StaticResource MenuItem4FrameStyle}"
                                    ItemsSource="{Binding Path=(NavigationWindow.ForwardStack), RelativeSource={RelativeSource TemplatedParent}}" />
                            </Button.ContextMenu>
                        </Button>
                        <Button
                            Padding="6"
                            hc:IconElement.Geometry="{StaticResource RotateRightGeometry}"
                            Command="NavigationCommands.Refresh" />
                    </hc:ButtonGroup>
                </Border>
                <ContentPresenter
                    x:Name="PART_NavWinCP"
                    ClipToBounds="true"
                    SnapsToDevicePixels="True" />
            </DockPanel>
        </Border>
    </ControlTemplate>
    <Style x:Key="FrameBaseStyle" TargetType="Frame">
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Frame">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <ContentPresenter x:Name="PART_FrameCP" SnapsToDevicePixels="True" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="NavigationUIVisibility" Value="Visible">
                <Setter Property="Template" Value="{StaticResource FrameWithNavigationUIStyle}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="JournalOwnership" Value="OwnsJournal" />
                    <Condition Property="NavigationUIVisibility" Value="Automatic" />
                </MultiTrigger.Conditions>
                <Setter Property="Template" Value="{StaticResource FrameWithNavigationUIStyle}" />
            </MultiTrigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="GotoTopBaseStyle"
        TargetType="hc:GotoTop"
        BasedOn="{StaticResource ButtonBaseStyle}">
        <Setter Property="Width" Value="50" />
        <Setter Property="Height" Value="50" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="25" />
        <Setter Property="hc:IconElement.Geometry" Value="{StaticResource UpGeometry}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Padding" Value="16" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="FocusVisualStyle">
            <Setter.Value>
                <Style>
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle Style="{StaticResource RectangleFocusVisualCircular}" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="GravatarBaseStyle" TargetType="hc:Gravatar">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Width" Value="72" />
        <Setter Property="Height" Value="72" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Padding" Value="6" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Gravatar">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        ClipToBounds="True"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <ContentPresenter Margin="{TemplateBinding Padding}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ImageSelectorBaseStyle" TargetType="hc:ImageSelector">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Stretch" Value="UniformToFill" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="StrokeThickness" Value="1" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="StrokeDashArray" Value="2,2" />
        <Setter Property="hc:IconSwitchElement.Geometry" Value="{StaticResource AddGeometry}" />
        <Setter Property="hc:IconSwitchElement.GeometrySelected" Value="{StaticResource RemoveGeometry}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:ImageSelector">
                    <Button
                        HorizontalContentAlignment="Stretch"
                        VerticalContentAlignment="Stretch"
                        Command="interactivity:ControlCommands.Switch"
                        Style="{StaticResource ButtonCustom}">
                        <Border Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                            <hc:DashedBorder
                                Background="{TemplateBinding PreviewBrush}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderDashArray="{TemplateBinding StrokeDashArray}"
                                BorderDashThickness="{TemplateBinding StrokeThickness}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                                <Border
                                    Width="30"
                                    Height="30"
                                    Background="{TemplateBinding Background}"
                                    Style="{StaticResource BorderCircular}">
                                    <hc:ToggleBlock IsChecked="{TemplateBinding HasValue}">
                                        <hc:ToggleBlock.CheckedContent>
                                            <Path
                                                Width="12"
                                                Height="12"
                                                Data="{TemplateBinding hc:IconSwitchElement.GeometrySelected}"
                                                Fill="{DynamicResource PrimaryBrush}" />
                                        </hc:ToggleBlock.CheckedContent>
                                        <hc:ToggleBlock.UnCheckedContent>
                                            <Path
                                                Width="16"
                                                Height="16"
                                                Data="{TemplateBinding hc:IconSwitchElement.Geometry}"
                                                Fill="{DynamicResource PrimaryBrush}" />
                                        </hc:ToggleBlock.UnCheckedContent>
                                    </hc:ToggleBlock>
                                </Border>
                            </hc:DashedBorder>
                        </Border>
                    </Button>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="ListBoxItemBaseStyle"
        TargetType="ListBoxItem"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualRadius0Margin0}" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Padding" Value="10,0" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType=ItemsControl}}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Margin" Value="0,0,0,2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Border
                        x:Name="Bd"
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        SnapsToDevicePixels="true">
                        <ContentPresenter
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsSelected" Value="true">
                <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="true" />
                    <Condition Property="Selector.IsSelectionActive" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
            </MultiTrigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Opacity" Value=".4" />
            </Trigger>
            <Trigger Property="hc:EdgeElement.ShowEdgeContent" Value="true">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ListBoxItem">
                            <Border
                                x:Name="Bd"
                                Padding="{TemplateBinding Padding}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                SnapsToDevicePixels="true">
                                <StackPanel Orientation="Horizontal">
                                    <ContentControl
                                        Width="16"
                                        Height="16"
                                        Content="{Binding Path=(hc:EdgeElement.LeftContent), RelativeSource={RelativeSource TemplatedParent}}" />
                                    <ContentPresenter
                                        Margin="6,0,0,0"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                </StackPanel>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ListBoxBaseStyle" TargetType="ListBox">
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="hc:ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
        <Setter Property="hc:ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="hc:ScrollViewer.CanContentScroll" Value="true" />
        <Setter Property="hc:ScrollViewer.PanningMode" Value="Both" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="2,2,2,0" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemBaseStyle}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBox">
                    <Border
                        x:Name="Bd"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        SnapsToDevicePixels="true">
                        <hc:ToggleBlock
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Stretch"
                            IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <hc:ToggleBlock.CheckedContent>
                                <hc:ScrollViewer
                                    Padding="{TemplateBinding Padding}"
                                    Focusable="false"
                                    HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                    IsInertiaEnabled="{Binding Path=(hc:ScrollViewer.IsInertiaEnabled), RelativeSource={RelativeSource TemplatedParent}}"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                    VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                                    <ItemsPresenter />
                                </hc:ScrollViewer>
                            </hc:ToggleBlock.CheckedContent>
                            <hc:ToggleBlock.UnCheckedContent>
                                <hc:Empty />
                            </hc:ToggleBlock.UnCheckedContent>
                        </hc:ToggleBlock>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="GridViewColumnHeader">
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Padding" Value="12,0" />
        <Setter Property="MinHeight" Value="{Binding Path=(hc:GridViewAttach.ColumnHeaderHeight), RelativeSource={RelativeSource AncestorType=ListView}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="GridViewColumnHeader">
                    <hc:SimplePanel SnapsToDevicePixels="true">
                        <Border
                            x:Name="HeaderBorder"
                            Background="Transparent"
                            BorderBrush="{TemplateBinding BorderBrush}">
                            <ContentPresenter
                                x:Name="HeaderContent"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                        <Canvas>
                            <Thumb x:Name="PART_HeaderGripper" Style="{StaticResource GridViewColumnHeaderGripper}" />
                        </Canvas>
                    </hc:SimplePanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ListViewItemBaseStyle" TargetType="ListViewItem">
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="Margin" Value="0,0,0,4" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="MinHeight" Value="44" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListViewItem">
                    <Border
                        x:Name="Bd"
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="4"
                        SnapsToDevicePixels="true">
                        <GridViewRowPresenter Columns="{TemplateBinding GridView.ColumnCollection}" Content="{TemplateBinding Content}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}" />
            </Trigger>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
                <Setter Property="TextElement.Foreground" Value="{DynamicResource TextIconBrush}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="true" />
                    <Condition Property="Selector.IsSelectionActive" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
            </MultiTrigger>
            <Trigger Property="GridView.ColumnCollection" Value="{x:Null}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ListViewItem">
                            <Border
                                x:Name="Bd"
                                Padding="{TemplateBinding Padding}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="4"
                                SnapsToDevicePixels="true">
                                <ContentPresenter
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="LoadingBaseStyle" TargetType="hc:LoadingBase">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="DotDiameter" Value="10" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="LoadingCircleBaseStyle"
        TargetType="hc:LoadingCircle"
        BasedOn="{StaticResource LoadingBaseStyle}">
        <Setter Property="Width" Value="40" />
        <Setter Property="Height" Value="40" />
        <Setter Property="DotDiameter" Value="5" />
        <Setter Property="DotInterval" Value="30" />
        <Setter Property="DotOffSet" Value="60" />
        <Setter Property="DotDelayTime" Value="90" />
        <Setter Property="DotSpeed" Value="4" />
    </Style>
    <Style
        x:Key="LoadingLineBaseStyle"
        TargetType="hc:LoadingLine"
        BasedOn="{StaticResource LoadingBaseStyle}">
        <Setter Property="DotDiameter" Value="5" />
    </Style>
    <Style x:Key="MagnifierBaseStyle" TargetType="hc:Magnifier">
        <Setter Property="IsHitTestVisible" Value="False" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="Width" Value="180" />
        <Setter Property="Height" Value="180" />
        <Setter Property="BorderThickness" Value="8" />
        <Setter Property="Background" Value="{DynamicResource BackgroundBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Magnifier">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Style="{StaticResource BorderCircular}">
                        <Ellipse>
                            <Ellipse.Fill>
                                <VisualBrush
                                    x:Name="PART_VisualBrush"
                                    ViewboxUnits="Absolute"
                                    Visual="{Binding Target, RelativeSource={RelativeSource TemplatedParent}}" />
                            </Ellipse.Fill>
                        </Ellipse>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="MenuItem4NavigationWindowStyle"
        TargetType="MenuItem"
        BasedOn="{StaticResource MenuItemBaseStyle}">
        <Setter Property="Header" Value="{Binding (JournalEntry.Name)}" />
        <Setter Property="Command" Value="NavigationCommands.NavigateJournal" />
        <Setter Property="CommandTarget" Value="{Binding TemplatedParent, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
        <Setter Property="CommandParameter" Value="{Binding RelativeSource={RelativeSource Self}}" />
    </Style>
    <Style x:Key="NavigationWindowBaseStyle" TargetType="NavigationWindow">
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="UseLayoutRounding" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="NavigationWindow">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <DockPanel LastChildFill="True">
                            <Border
                                Background="{DynamicResource DarkDefaultBrush}"
                                BorderBrush="{DynamicResource BorderBrush}"
                                BorderThickness="0,0,0,1"
                                DockPanel.Dock="Top">
                                <hc:ButtonGroup
                                    x:Name="NavChrome"
                                    Width="90"
                                    Margin="10,6"
                                    HorizontalAlignment="Left">
                                    <Button
                                        Padding="6"
                                        hc:IconElement.Geometry="{StaticResource LeftGeometry}"
                                        Command="NavigationCommands.BrowseBack">
                                        <Button.ContextMenu>
                                            <ContextMenu
                                                x:Name="BackNavMenu"
                                                ItemContainerStyle="{StaticResource MenuItem4NavigationWindowStyle}"
                                                ItemsSource="{Binding Path=(NavigationWindow.BackStack), RelativeSource={RelativeSource TemplatedParent}}" />
                                        </Button.ContextMenu>
                                    </Button>
                                    <Button
                                        Padding="6"
                                        hc:IconElement.Geometry="{StaticResource RightGeometry}"
                                        Command="NavigationCommands.BrowseForward">
                                        <Button.ContextMenu>
                                            <ContextMenu
                                                x:Name="ForwardNavMenu"
                                                ItemContainerStyle="{StaticResource MenuItem4NavigationWindowStyle}"
                                                ItemsSource="{Binding Path=(NavigationWindow.ForwardStack), RelativeSource={RelativeSource TemplatedParent}}" />
                                        </Button.ContextMenu>
                                    </Button>
                                    <Button
                                        Padding="6"
                                        hc:IconElement.Geometry="{StaticResource RotateRightGeometry}"
                                        Command="NavigationCommands.Refresh" />
                                </hc:ButtonGroup>
                            </Border>
                            <hc:SimplePanel>
                                <AdornerDecorator>
                                    <ContentPresenter x:Name="PART_NavWinCP" ClipToBounds="true" />
                                </AdornerDecorator>
                                <ResizeGrip
                                    x:Name="WindowResizeGrip"
                                    HorizontalAlignment="Right"
                                    VerticalAlignment="Bottom"
                                    IsTabStop="false"
                                    Visibility="Collapsed" />
                            </hc:SimplePanel>
                        </DockPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="ShowsNavigationUI" Value="False">
                            <Setter TargetName="NavChrome" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="CanGoBack" Value="False">
                            <Setter TargetName="BackNavMenu" Property="IsEnabled" Value="false" />
                        </Trigger>
                        <Trigger Property="CanGoForward" Value="False">
                            <Setter TargetName="ForwardNavMenu" Property="IsEnabled" Value="false" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="ResizeMode" Value="CanResizeWithGrip" />
                                <Condition Property="WindowState" Value="Normal" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="WindowResizeGrip" Property="Visibility" Value="Visible" />
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="NumericUpDownBaseStyle"
        TargetType="hc:NumericUpDown"
        BasedOn="{StaticResource InputElementBaseStyle}">
        <Setter Property="CaretBrush" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Once" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:NumericUpDown">
                    <hc:SimplePanel x:Name="root">
                        <Border
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <hc:WatermarkTextBox
                                x:Name="PART_TextBox"
                                Grid.RowSpan="2"
                                Padding="{TemplateBinding Padding}"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                CaretBrush="{TemplateBinding CaretBrush}"
                                Focusable="True"
                                Foreground="{TemplateBinding Foreground}"
                                IsReadOnly="{TemplateBinding IsReadOnly}"
                                Watermark="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" />
                            <Button
                                x:Name="UpButton"
                                Grid.Row="0"
                                Grid.Column="1"
                                Width="Auto"
                                Height="Auto"
                                Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                VerticalContentAlignment="Bottom"
                                hc:IconElement.Geometry="{StaticResource UpGeometry}"
                                hc:IconElement.Height="6"
                                hc:IconElement.Width="14"
                                Command="interactivity:ControlCommands.Prev"
                                Foreground="{TemplateBinding BorderBrush}"
                                IsEnabled="{TemplateBinding IsReadOnly,
                                                            Converter={StaticResource Boolean2BooleanReConverter}}"
                                Style="{StaticResource ButtonIcon}"
                                Visibility="{TemplateBinding ShowUpDownButton,
                                                             Converter={StaticResource Boolean2VisibilityConverter}}" />
                            <Button
                                x:Name="DownButton"
                                Grid.Row="1"
                                Grid.Column="1"
                                Width="Auto"
                                Height="Auto"
                                Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                VerticalContentAlignment="Top"
                                hc:IconElement.Geometry="{StaticResource DownGeometry}"
                                hc:IconElement.Height="6"
                                hc:IconElement.Width="14"
                                Command="interactivity:ControlCommands.Next"
                                Foreground="{TemplateBinding BorderBrush}"
                                IsEnabled="{TemplateBinding IsReadOnly,
                                                            Converter={StaticResource Boolean2BooleanReConverter}}"
                                Style="{StaticResource ButtonIcon}"
                                Visibility="{TemplateBinding ShowUpDownButton,
                                                             Converter={StaticResource Boolean2VisibilityConverter}}" />
                        </Grid>
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="root" Property="Opacity" Value="0.4" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
                        </Trigger>
                        <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                            <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="NumericUpDownExtendTopTemplate" TargetType="hc:NumericUpDown">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Border
                x:Name="border"
                Grid.Row="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                SnapsToDevicePixels="True" />
            <Grid
                x:Name="root"
                Grid.Row="1"
                SnapsToDevicePixels="true">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <hc:WatermarkTextBox
                    x:Name="PART_TextBox"
                    Grid.RowSpan="2"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    CaretBrush="{TemplateBinding CaretBrush}"
                    Focusable="True"
                    Foreground="{TemplateBinding Foreground}"
                    IsReadOnly="{TemplateBinding IsReadOnly}"
                    Watermark="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    x:Name="UpButton"
                    Grid.Row="0"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    VerticalContentAlignment="Bottom"
                    hc:IconElement.Geometry="{StaticResource UpGeometry}"
                    hc:IconElement.Height="6"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Prev"
                    Foreground="{TemplateBinding BorderBrush}"
                    IsEnabled="{TemplateBinding IsReadOnly,
                                                Converter={StaticResource Boolean2BooleanReConverter}}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="{TemplateBinding ShowUpDownButton,
                                                 Converter={StaticResource Boolean2VisibilityConverter}}" />
                <Button
                    x:Name="DownButton"
                    Grid.Row="1"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    VerticalContentAlignment="Top"
                    hc:IconElement.Geometry="{StaticResource DownGeometry}"
                    hc:IconElement.Height="6"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Next"
                    Foreground="{TemplateBinding BorderBrush}"
                    IsEnabled="{TemplateBinding IsReadOnly,
                                                Converter={StaticResource Boolean2BooleanReConverter}}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="{TemplateBinding ShowUpDownButton,
                                                 Converter={StaticResource Boolean2VisibilityConverter}}" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="border" Property="Opacity" Value="0.4" />
                <Setter TargetName="root" Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger SourceName="root" Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsReadOnly" Value="True">
                <Setter TargetName="UpButton" Property="IsEnabled" Value="False" />
                <Setter TargetName="DownButton" Property="IsEnabled" Value="False" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="NumericUpDownExtendLeftTemplate" TargetType="hc:NumericUpDown">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Border
                x:Name="border"
                Grid.Column="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                SnapsToDevicePixels="True" />
            <Grid
                x:Name="root"
                Grid.Column="1"
                SnapsToDevicePixels="true">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <hc:WatermarkTextBox
                    x:Name="PART_TextBox"
                    Grid.RowSpan="2"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    CaretBrush="{TemplateBinding CaretBrush}"
                    Focusable="True"
                    Foreground="{TemplateBinding Foreground}"
                    IsReadOnly="{TemplateBinding IsReadOnly}"
                    Watermark="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    x:Name="UpButton"
                    Grid.Row="0"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    VerticalContentAlignment="Bottom"
                    hc:IconElement.Geometry="{StaticResource UpGeometry}"
                    hc:IconElement.Height="6"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Prev"
                    Foreground="{TemplateBinding BorderBrush}"
                    IsEnabled="{TemplateBinding IsReadOnly,
                                                Converter={StaticResource Boolean2BooleanReConverter}}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="{TemplateBinding ShowUpDownButton,
                                                 Converter={StaticResource Boolean2VisibilityConverter}}" />
                <Button
                    x:Name="DownButton"
                    Grid.Row="1"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    VerticalContentAlignment="Top"
                    hc:IconElement.Geometry="{StaticResource DownGeometry}"
                    hc:IconElement.Height="6"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Next"
                    Foreground="{TemplateBinding BorderBrush}"
                    IsEnabled="{TemplateBinding IsReadOnly,
                                                Converter={StaticResource Boolean2BooleanReConverter}}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="{TemplateBinding ShowUpDownButton,
                                                 Converter={StaticResource Boolean2VisibilityConverter}}" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="border" Property="Opacity" Value="0.4" />
                <Setter TargetName="root" Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger SourceName="root" Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="NumericUpDownExtendBaseStyle"
        TargetType="hc:NumericUpDown"
        BasedOn="{StaticResource NumericUpDownBaseStyle}">
        <Setter Property="hc:InfoElement.Symbol" Value="●" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="{x:Static system:Double.NaN}" />
        <Setter Property="hc:InfoElement.MinContentHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Height" Value="Auto" />
        <Setter Property="Template" Value="{StaticResource NumericUpDownExtendTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource NumericUpDownExtendLeftTemplate}" />
                <Setter Property="Width" Value="Auto" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="NumericUpDownPlusTopTemplate" TargetType="hc:NumericUpDown">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Grid.ColumnSpan="2"
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Border
                x:Name="border"
                Grid.Row="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
            <Grid
                x:Name="root"
                Grid.Row="1"
                SnapsToDevicePixels="true">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <hc:WatermarkTextBox
                    x:Name="PART_TextBox"
                    Grid.RowSpan="2"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    CaretBrush="{TemplateBinding CaretBrush}"
                    Focusable="True"
                    Foreground="{TemplateBinding Foreground}"
                    IsReadOnly="{TemplateBinding IsReadOnly}"
                    Watermark="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    Name="ButtonClear"
                    Grid.RowSpan="2"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{TemplateBinding BorderBrush}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Button
                    x:Name="UpButton"
                    Grid.Row="0"
                    Grid.Column="2"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    VerticalContentAlignment="Bottom"
                    hc:IconElement.Geometry="{StaticResource UpGeometry}"
                    hc:IconElement.Height="6"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Prev"
                    Foreground="{TemplateBinding BorderBrush}"
                    IsEnabled="{TemplateBinding IsReadOnly,
                                                Converter={StaticResource Boolean2BooleanReConverter}}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="{TemplateBinding ShowUpDownButton,
                                                 Converter={StaticResource Boolean2VisibilityConverter}}" />
                <Button
                    x:Name="DownButton"
                    Grid.Row="1"
                    Grid.Column="2"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    VerticalContentAlignment="Top"
                    hc:IconElement.Geometry="{StaticResource DownGeometry}"
                    hc:IconElement.Height="6"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Next"
                    Foreground="{TemplateBinding BorderBrush}"
                    IsEnabled="{TemplateBinding IsReadOnly,
                                                Converter={StaticResource Boolean2BooleanReConverter}}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="{TemplateBinding ShowUpDownButton,
                                                 Converter={StaticResource Boolean2VisibilityConverter}}" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="border" Property="Opacity" Value="0.4" />
                <Setter TargetName="root" Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger SourceName="root" Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                    <Condition Property="IsReadOnly" Value="False" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="NumericUpDownPlusLeftTemplate" TargetType="hc:NumericUpDown">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Grid.Column="0"
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Border
                x:Name="border"
                Grid.Column="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
            <Grid
                x:Name="root"
                Grid.Column="1"
                SnapsToDevicePixels="true">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <hc:WatermarkTextBox
                    x:Name="PART_TextBox"
                    Grid.RowSpan="2"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    CaretBrush="{TemplateBinding CaretBrush}"
                    Focusable="True"
                    Foreground="{TemplateBinding Foreground}"
                    IsReadOnly="{TemplateBinding IsReadOnly}"
                    Watermark="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    Name="ButtonClear"
                    Grid.RowSpan="2"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{TemplateBinding BorderBrush}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Button
                    x:Name="UpButton"
                    Grid.Row="0"
                    Grid.Column="2"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    VerticalContentAlignment="Bottom"
                    hc:IconElement.Geometry="{StaticResource UpGeometry}"
                    hc:IconElement.Height="6"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Prev"
                    Foreground="{TemplateBinding BorderBrush}"
                    IsEnabled="{TemplateBinding IsReadOnly,
                                                Converter={StaticResource Boolean2BooleanReConverter}}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="{TemplateBinding ShowUpDownButton,
                                                 Converter={StaticResource Boolean2VisibilityConverter}}" />
                <Button
                    x:Name="DownButton"
                    Grid.Row="1"
                    Grid.Column="2"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    VerticalContentAlignment="Top"
                    hc:IconElement.Geometry="{StaticResource DownGeometry}"
                    hc:IconElement.Height="6"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Next"
                    Foreground="{TemplateBinding BorderBrush}"
                    IsEnabled="{TemplateBinding IsReadOnly,
                                                Converter={StaticResource Boolean2BooleanReConverter}}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="{TemplateBinding ShowUpDownButton,
                                                 Converter={StaticResource Boolean2VisibilityConverter}}" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="border" Property="Opacity" Value="0.4" />
                <Setter TargetName="root" Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger SourceName="root" Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                    <Condition Property="IsReadOnly" Value="False" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="NumericUpDownPlusBaseStyle"
        TargetType="hc:NumericUpDown"
        BasedOn="{StaticResource NumericUpDownExtendBaseStyle}">
        <Setter Property="Template" Value="{StaticResource NumericUpDownPlusTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource NumericUpDownPlusLeftTemplate}" />
                <Setter Property="Width" Value="Auto" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="PasswordBoxBaseStyle"
        TargetType="PasswordBox"
        BasedOn="{StaticResource InputElementBaseStyle}">
        <Setter Property="PasswordChar" Value="●" />
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="PasswordBox">
                    <hc:SimplePanel x:Name="root">
                        <Border
                            x:Name="border"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            SnapsToDevicePixels="True" />
                        <ScrollViewer
                            x:Name="PART_ContentHost"
                            Margin="-2,0"
                            Padding="{TemplateBinding Padding}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            Focusable="false"
                            HorizontalScrollBarVisibility="Hidden"
                            VerticalScrollBarVisibility="Hidden" />
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="border" Property="Opacity" Value="0.4" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
                        </Trigger>
                        <Trigger Property="IsFocused" Value="true">
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="PasswordBoxExtendTopTemplate" TargetType="PasswordBox">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Border
                x:Name="border"
                Grid.Row="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                SnapsToDevicePixels="True" />
            <TextBlock
                x:Name="placeholder"
                Grid.Row="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="Stretch"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                Style="{StaticResource TextBlockDefaultThiLight}"
                Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                Visibility="Collapsed" />
            <ScrollViewer
                x:Name="PART_ContentHost"
                Grid.Row="1"
                Margin="-2,0"
                Padding="{TemplateBinding Padding}"
                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                Focusable="false"
                HorizontalScrollBarVisibility="Hidden"
                VerticalScrollBarVisibility="Hidden" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="hc:PasswordBoxAttach.PasswordLength" Value="0">
                <Setter TargetName="placeholder" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="border" Property="Opacity" Value="0.4" />
                <Setter TargetName="placeholder" Property="Opacity" Value="0.4" />
                <Setter TargetName="PART_ContentHost" Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger SourceName="PART_ContentHost" Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="PasswordBoxExtendLeftTemplate" TargetType="PasswordBox">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Border
                x:Name="border"
                Grid.Column="1"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                SnapsToDevicePixels="True" />
            <TextBlock
                x:Name="placeholder"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="Stretch"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                Style="{StaticResource TextBlockDefaultThiLight}"
                Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                Visibility="Collapsed" />
            <ScrollViewer
                x:Name="PART_ContentHost"
                Grid.Column="1"
                Margin="-2,0"
                Padding="{TemplateBinding Padding}"
                Focusable="false"
                HorizontalScrollBarVisibility="Hidden"
                VerticalScrollBarVisibility="Hidden" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="hc:PasswordBoxAttach.PasswordLength" Value="0">
                <Setter TargetName="placeholder" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="border" Property="Opacity" Value="0.4" />
                <Setter TargetName="placeholder" Property="Opacity" Value="0.4" />
                <Setter TargetName="PART_ContentHost" Property="Opacity" Value="0.4" />
            </Trigger>
            <Trigger SourceName="PART_ContentHost" Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="PasswordBoxExtendBaseStyle"
        TargetType="PasswordBox"
        BasedOn="{StaticResource PasswordBoxBaseStyle}">
        <Setter Property="Height" Value="Auto" />
        <Setter Property="hc:InfoElement.Symbol" Value="●" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="{x:Static system:Double.NaN}" />
        <Setter Property="hc:InfoElement.MinContentHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="hc:PasswordBoxAttach.IsMonitoring" Value="True" />
        <Setter Property="Template" Value="{StaticResource PasswordBoxExtendTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource PasswordBoxExtendLeftTemplate}" />
                <Setter Property="Width" Value="Auto" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="PasswordBoxPlusInternalStyle" TargetType="PasswordBox">
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
        <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="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="{StaticResource DefaultInputPadding}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="PasswordBox">
                    <hc:SimplePanel>
                        <TextBlock
                            x:Name="placeholder"
                            Padding="{TemplateBinding Padding}"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Focusable="False"
                            Style="{StaticResource TextBlockDefaultThiLight}"
                            Text="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}"
                            Visibility="Collapsed" />
                        <ScrollViewer
                            x:Name="PART_ContentHost"
                            Margin="-2,0"
                            Padding="{TemplateBinding Padding}"
                            Focusable="false"
                            HorizontalScrollBarVisibility="Hidden"
                            VerticalScrollBarVisibility="Hidden" />
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="hc:PasswordBoxAttach.PasswordLength" Value="0">
                            <Setter TargetName="placeholder" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="PasswordBoxPlusTopTemplate" TargetType="hc:PasswordBox">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <DockPanel
                Grid.ColumnSpan="3"
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Border
                Grid.Row="1"
                Grid.Column="0"
                Grid.ColumnSpan="3"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                SnapsToDevicePixels="True" />
            <PasswordBox
                x:Name="PART_PasswordBox"
                Grid.Row="1"
                Grid.Column="0"
                Padding="{TemplateBinding Padding}"
                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                Background="{TemplateBinding Background}"
                Foreground="{TemplateBinding Foreground}"
                PasswordChar="{TemplateBinding PasswordChar}"
                Style="{StaticResource PasswordBoxPlusInternalStyle}"
                Visibility="{Binding ShowPassword, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityReConverter}}" />
            <hc:WatermarkTextBox
                x:Name="PART_TextBox"
                Grid.Row="1"
                Grid.Column="0"
                Padding="{TemplateBinding Padding}"
                HorizontalAlignment="Stretch"
                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                Visibility="{Binding ShowPassword, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}"
                Watermark="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" />
            <Button
                Name="ButtonClear"
                Grid.Row="1"
                Grid.Column="1"
                Width="Auto"
                Height="Auto"
                Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                HorizontalContentAlignment="Left"
                hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                hc:IconElement.Width="14"
                Command="interactivity:ControlCommands.Clear"
                Foreground="{TemplateBinding BorderBrush}"
                Style="{StaticResource ButtonIcon}"
                Visibility="Collapsed" />
            <ToggleButton
                x:Name="ButtonEye"
                Grid.Row="1"
                Grid.Column="2"
                Width="Auto"
                Height="Auto"
                Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                HorizontalContentAlignment="Left"
                hc:IconElement.Width="14"
                hc:IconSwitchElement.Geometry="{StaticResource EyeCloseGeometry}"
                hc:IconSwitchElement.GeometrySelected="{StaticResource EyeOpenGeometry}"
                Focusable="False"
                Foreground="{TemplateBinding BorderBrush}"
                IsChecked="{Binding ShowPassword, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                Style="{StaticResource ToggleButtonIconTransparent}"
                Visibility="{TemplateBinding ShowEyeButton,
                                             Converter={StaticResource Boolean2VisibilityConverter}}" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <Trigger SourceName="PART_PasswordBox" Property="IsFocused" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource EmbellishBrush}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger Property="ShowEyeButton" Value="true">
                <Setter TargetName="ButtonClear" Property="Padding" Value="0,0,2,0" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="PasswordBoxPlusLeftTemplate" TargetType="hc:PasswordBox">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Border
                Grid.Column="1"
                Grid.ColumnSpan="3"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                SnapsToDevicePixels="True" />
            <PasswordBox
                x:Name="PART_PasswordBox"
                Grid.Column="1"
                Padding="{TemplateBinding Padding}"
                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                Background="{TemplateBinding Background}"
                Foreground="{TemplateBinding Foreground}"
                PasswordChar="{TemplateBinding PasswordChar}"
                Style="{StaticResource PasswordBoxPlusInternalStyle}"
                Visibility="{Binding ShowPassword, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityReConverter}}" />
            <hc:WatermarkTextBox
                x:Name="PART_TextBox"
                Grid.Column="1"
                Padding="{TemplateBinding Padding}"
                HorizontalAlignment="Stretch"
                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                Visibility="{Binding ShowPassword, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}"
                Watermark="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" />
            <Button
                Name="ButtonClear"
                Grid.Column="2"
                Width="Auto"
                Height="Auto"
                Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                HorizontalContentAlignment="Left"
                hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                hc:IconElement.Width="14"
                Command="interactivity:ControlCommands.Clear"
                Foreground="{TemplateBinding BorderBrush}"
                Style="{StaticResource ButtonIcon}"
                Visibility="Collapsed" />
            <ToggleButton
                x:Name="ButtonEye"
                Grid.Column="3"
                Width="Auto"
                Height="Auto"
                Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                HorizontalContentAlignment="Left"
                hc:IconElement.Width="14"
                hc:IconSwitchElement.Geometry="{StaticResource EyeCloseGeometry}"
                hc:IconSwitchElement.GeometrySelected="{StaticResource EyeOpenGeometry}"
                Focusable="False"
                Foreground="{TemplateBinding BorderBrush}"
                IsChecked="{Binding ShowPassword, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                Style="{StaticResource ToggleButtonIconTransparent}"
                Visibility="{TemplateBinding ShowEyeButton,
                                             Converter={StaticResource Boolean2VisibilityConverter}}" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </Trigger>
            <Trigger SourceName="PART_PasswordBox" Property="IsFocused" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger Property="ShowEyeButton" Value="true">
                <Setter TargetName="ButtonClear" Property="Padding" Value="0,0,2,0" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="PasswordBoxPlusBaseStyle"
        TargetType="hc:PasswordBox"
        BasedOn="{StaticResource InputElementBaseStyle}">
        <Setter Property="PasswordChar" Value="●" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Height" Value="Auto" />
        <Setter Property="Padding" Value="{StaticResource DefaultInputPadding}" />
        <Setter Property="hc:InfoElement.Symbol" Value="●" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="{x:Static system:Double.NaN}" />
        <Setter Property="hc:PasswordBoxAttach.IsMonitoring" Value="True" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Template" Value="{StaticResource PasswordBoxPlusTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource PasswordBoxPlusLeftTemplate}" />
                <Setter Property="Width" Value="Auto" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="PinBoxBaseStyle" TargetType="hc:PinBox">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="ItemMargin" Value="4,0" />
        <Setter Property="ItemWidth" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="ItemHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:PinBox">
                    <UniformGrid
                        Name="PART_Panel"
                        Columns="{TemplateBinding Length}"
                        Rows="1" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="PoptipBaseStyle" TargetType="hc:Poptip">
        <Setter Property="IsHitTestVisible" Value="False" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Poptip">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <ContentPresenter
                            Margin="{TemplateBinding Padding}"
                            ContentStringFormat="{TemplateBinding ContentStringFormat}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ProgressBarFlat4ProgressButton" TargetType="ProgressBar">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Foreground" Value="{DynamicResource DarkMaskBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ProgressBar">
                    <Border x:Name="PART_Track">
                        <Decorator x:Name="PART_Indicator" HorizontalAlignment="Left">
                            <Border
                                x:Name="Indicator"
                                Background="{TemplateBinding Foreground}"
                                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                        </Decorator>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ProgressButtonBaseStyle"
        TargetType="hc:ProgressButton"
        BasedOn="{StaticResource ToggleButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="ProgressStyle" Value="{StaticResource ProgressBarFlat4ProgressButton}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:ProgressButton">
                    <Border
                        x:Name="Chrome"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <hc:SimplePanel>
                            <ProgressBar
                                x:Name="ProgressBar"
                                Height="Auto"
                                Maximum="100"
                                Style="{TemplateBinding ProgressStyle}"
                                Visibility="Collapsed"
                                Value="{TemplateBinding Progress}" />
                            <ContentPresenter
                                Name="UnCheckedElement"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            <ContentPresenter
                                Name="CheckedElement"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Content="{Binding Path=(hc:StatusSwitchElement.CheckedElement), RelativeSource={RelativeSource TemplatedParent}}"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                Visibility="Collapsed" />
                        </hc:SimplePanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" Value=".9" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Opacity" Value=".6" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="ProgressBar" Property="Visibility" Value="Visible" />
                            <Setter TargetName="CheckedElement" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="hc:StatusSwitchElement.HideUncheckedElement" Value="True" />
                                <Condition Property="IsChecked" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="UnCheckedElement" Property="Visibility" Value="Collapsed" />
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="PropertyItemToolTipBaseStyle"
        TargetType="ToolTip"
        BasedOn="{StaticResource {x:Type ToolTip}}">
        <Setter Property="Padding" Value="10" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToolTip">
                    <Border
                        Margin="8"
                        Padding="{TemplateBinding Padding}"
                        Background="{DynamicResource RegionBrush}"
                        BorderBrush="{DynamicResource BorderBrush}"
                        BorderThickness="1"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        Effect="{StaticResource EffectShadow2}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <ContentPresenter x:Name="Presenter" Margin="0,0,0,10" />
                            <StackPanel Grid.Row="1" Orientation="Horizontal">
                                <TextBlock FontWeight="Bold" Text="{Binding PropertyTypeName, RelativeSource={RelativeSource AncestorType=hc:PropertyItem}}" />
                                <TextBlock Margin="6,0,0,0" Text="{Binding PropertyName, RelativeSource={RelativeSource AncestorType=hc:PropertyItem}}" />
                            </StackPanel>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="Presenter" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="Content" Value="">
                            <Setter TargetName="Presenter" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="PropertyItemBaseStyle" TargetType="hc:PropertyItem">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Margin" Value="0,0,0,6" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:PropertyItem">
                    <GroupBox hc:TitleElement.TitlePlacement="Left" Style="{StaticResource GroupBoxOriginal}">
                        <GroupBox.Header>
                            <TextBlock
                                Width="{Binding Path=(hc:TitleElement.TitleWidth).Value, RelativeSource={RelativeSource TemplatedParent}}"
                                Padding="0,0,10,0"
                                Text="{TemplateBinding DisplayName}"
                                TextTrimming="CharacterEllipsis">
                                <TextBlock.ToolTip>
                                    <ToolTip Content="{TemplateBinding Description}" Style="{StaticResource PropertyItemToolTipBaseStyle}" />
                                </TextBlock.ToolTip>
                            </TextBlock>
                        </GroupBox.Header>
                        <ContentPresenter ContentSource="EditorElement" />
                    </GroupBox>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="PropertyItemsControlBaseStyle" TargetType="hc:PropertyItemsControl">
        <Setter Property="ItemContainerStyle" Value="{StaticResource PropertyItemBaseStyle}" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:PropertyItemsControl">
                    <hc:ScrollViewer Focusable="false" HorizontalScrollBarVisibility="Disabled">
                        <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </hc:ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsGrouping" Value="False">
                <Setter Property="ScrollViewer.CanContentScroll" Value="True" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="PropertyGroupItemBaseStyle" TargetType="GroupItem">
        <Setter Property="Margin" Value="0,0,0,6" />
        <Setter Property="Padding" Value="10,6,6,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="GroupItem">
                    <Expander Header="{Binding Name}" IsExpanded="True">
                        <Border
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="1,0,1,1"
                            CornerRadius="0,0,4,4">
                            <ItemsPresenter Margin="{TemplateBinding Padding}" />
                        </Border>
                    </Expander>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="PropertyGridBaseStyle" TargetType="hc:PropertyGrid">
        <Setter Property="MaxTitleWidth" Value="200" />
        <Setter Property="MinTitleWidth" Value="120" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Padding" Value="10" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:PropertyGrid">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid Margin="{TemplateBinding Padding}">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <DockPanel Margin="0,0,0,6" LastChildFill="True">
                                <hc:ButtonGroup
                                    Margin="0,0,6,0"
                                    Style="{StaticResource ButtonGroupSolid}"
                                    Visibility="{Binding ShowSortButton, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}">
                                    <RadioButton Command="interactivity:ControlCommands.SortByCategory" IsChecked="True">
                                        <Rectangle
                                            Width="16"
                                            Height="16"
                                            Fill="{StaticResource SortByCategoryDrawingBrush}" />
                                    </RadioButton>
                                    <RadioButton Command="interactivity:ControlCommands.SortByName">
                                        <Rectangle
                                            Width="16"
                                            Height="16"
                                            Fill="{StaticResource SortByNameDrawingBrush}" />
                                    </RadioButton>
                                </hc:ButtonGroup>
                                <hc:SearchBar
                                    x:Name="PART_SearchBar"
                                    hc:InfoElement.ShowClearButton="True"
                                    IsRealTime="True"
                                    Style="{StaticResource SearchBarPlus}" />
                            </DockPanel>
                            <hc:PropertyItemsControl
                                x:Name="PART_ItemsControl"
                                Grid.Row="1"
                                Style="{StaticResource PropertyItemsControlBaseStyle}">
                                <hc:PropertyItemsControl.GroupStyle>
                                    <GroupStyle ContainerStyle="{StaticResource PropertyGroupItemBaseStyle}" />
                                </hc:PropertyItemsControl.GroupStyle>
                            </hc:PropertyItemsControl>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RateRateItemBaseStyle" TargetType="hc:RateItem">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:RateItem">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="OnMouseEnter">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CanvasRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                <EasingDoubleKeyFrame KeyTime="0" Value="1.1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CanvasRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <EasingDoubleKeyFrame KeyTime="0" Value="1.1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="OnMouseLeave">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CanvasRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CanvasRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Canvas x:Name="CanvasRoot" RenderTransformOrigin="0.5,0.5">
                        <Canvas.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform />
                            </TransformGroup>
                        </Canvas.RenderTransform>
                        <Path
                            Width="{Binding ActualWidth, ElementName=CanvasRoot}"
                            Height="{Binding ActualHeight, ElementName=CanvasRoot}"
                            Data="{TemplateBinding Icon}"
                            Fill="{TemplateBinding Background}"
                            Stretch="Uniform" />
                        <Border x:Name="PART_Icon" Visibility="Collapsed">
                            <Path
                                Width="{Binding ActualWidth, ElementName=CanvasRoot}"
                                Height="{Binding ActualHeight, ElementName=CanvasRoot}"
                                HorizontalAlignment="Left"
                                Data="{TemplateBinding Icon}"
                                Fill="{TemplateBinding Foreground}"
                                Stretch="Uniform" />
                        </Border>
                    </Canvas>
                    <ControlTemplate.Triggers>
                        <EventTrigger RoutedEvent="UIElement.MouseEnter" SourceName="CanvasRoot">
                            <BeginStoryboard Storyboard="{StaticResource OnMouseEnter}" />
                        </EventTrigger>
                        <EventTrigger RoutedEvent="UIElement.MouseLeave" SourceName="CanvasRoot">
                            <BeginStoryboard Storyboard="{StaticResource OnMouseLeave}" />
                        </EventTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RateBaseStyle" TargetType="hc:Rate">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="ItemMargin" Value="5,0" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="Icon" Value="{StaticResource StarGeometry}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource RateRateItemBaseStyle}" />
        <Setter Property="Text" Value="{Binding Value, RelativeSource={RelativeSource Self}, StringFormat={}{0:0.0}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Rate">
                    <StackPanel Background="Transparent" Orientation="Horizontal">
                        <UniformGrid
                            x:Name="PART_Panel"
                            Margin="-5,0"
                            Rows="1" />
                        <TextBlock
                            Margin="10,0,0,0"
                            VerticalAlignment="Center"
                            Text="{TemplateBinding Text}"
                            Visibility="{TemplateBinding ShowText,
                                                         Converter={StaticResource Boolean2VisibilityConverter}}" />
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="RunningBlockBaseStyle"
        TargetType="hc:RunningBlock"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="0,10" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:RunningBlock">
                    <hc:RunningBorder
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <hc:SimplePanel ClipToBounds="True">
                            <hc:SimplePanel x:Name="PART_Panel" HorizontalAlignment="Left">
                                <ContentPresenter
                                    x:Name="PART_ContentElement"
                                    HorizontalAlignment="Left"
                                    RenderTransformOrigin="0.5,0.5">
                                    <ContentPresenter.RenderTransform>
                                        <TransformGroup>
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </ContentPresenter.RenderTransform>
                                </ContentPresenter>
                            </hc:SimplePanel>
                        </hc:SimplePanel>
                    </hc:RunningBorder>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Vertical">
                <Setter Property="Padding" Value="10,0" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="SeparatorBaseStyle" TargetType="Separator">
        <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
    </Style>
    <Style
        x:Key="ShieldBaseStyle"
        TargetType="hc:Shield"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="3" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Color" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Shield">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Border
                            Grid.Column="0"
                            Background="#555"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='1,0,0,1'}">
                            <TextBlock
                                Margin="4,0"
                                VerticalAlignment="Center"
                                Text="{TemplateBinding Subject}" />
                        </Border>
                        <Border
                            Grid.Column="1"
                            Background="{TemplateBinding Color}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='0,1,1,0'}">
                            <ContentPresenter
                                Margin="4,0"
                                VerticalAlignment="Center"
                                ContentSource="Status"
                                ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                TextElement.Foreground="{TemplateBinding Foreground}" />
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="SideMenuItemBaseStyle"
        TargetType="hc:SideMenuItem"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualRadius0Margin0}" />
        <Setter Property="Role" Value="Item" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="MinHeight" Value="40" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:SideMenuItem">
                    <Border Name="BorderRoot" Background="{TemplateBinding Background}">
                        <hc:SimplePanel>
                            <Rectangle
                                Width="4"
                                HorizontalAlignment="Left"
                                Fill="{TemplateBinding BorderBrush}" />
                            <ContentControl Margin="4,0,0,0">
                                <DockPanel Margin="{TemplateBinding Padding}">
                                    <ContentControl Name="PresenterIcon" Width="40">
                                        <ContentPresenter
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            ContentSource="Icon" />
                                    </ContentControl>
                                    <ContentPresenter
                                        Name="PresenterHeader"
                                        Margin="6,0,0,0"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        ContentSource="Header" />
                                </DockPanel>
                            </ContentControl>
                        </hc:SimplePanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Icon" Value="{x:Null}">
                            <Setter TargetName="PresenterIcon" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=hc:SideMenuItem}}" Value="True">
                            <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
                        </DataTrigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                            <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
                            <Setter TargetName="PresenterHeader" Property="TextElement.FontWeight" Value="Bold" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="SideMenuItemAccordionBaseStyle"
        TargetType="hc:SideMenuItem"
        BasedOn="{StaticResource SideMenuItemBaseStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:SideMenuItem">
                    <Border Name="BorderRoot" Background="{TemplateBinding Background}">
                        <hc:SimplePanel>
                            <Rectangle
                                Width="4"
                                HorizontalAlignment="Left"
                                Fill="{TemplateBinding BorderBrush}" />
                            <ContentControl Margin="4,0,0,0">
                                <DockPanel Margin="{TemplateBinding Padding}">
                                    <ContentControl Name="PresenterIcon" Width="40">
                                        <ContentPresenter
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            ContentSource="Icon" />
                                    </ContentControl>
                                    <ContentPresenter
                                        Name="PresenterHeader"
                                        Margin="6,0,0,0"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        ContentSource="Header" />
                                </DockPanel>
                            </ContentControl>
                        </hc:SimplePanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Icon" Value="{x:Null}">
                            <Setter TargetName="PresenterIcon" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=hc:SideMenuItem}}" Value="True">
                            <Setter Property="BorderBrush" Value="Transparent" />
                        </DataTrigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                            <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
                            <Setter TargetName="PresenterHeader" Property="TextElement.FontWeight" Value="Bold" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="SideMenuItemHeaderBaseStyle"
        TargetType="hc:SideMenuItem"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualRadius0Margin0}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource SideMenuItemBaseStyle}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:SideMenuItem">
                    <Border Name="BorderRoot" Background="{TemplateBinding Background}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition MinHeight="48" />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <Border Name="BorderBack" Background="{TemplateBinding Background}" />
                            <ContentControl Grid.Row="0" Margin="4,0,0,0">
                                <DockPanel
                                    Name="PanelHeader"
                                    Margin="{TemplateBinding Padding}"
                                    Background="Transparent">
                                    <ContentControl Name="PresenterIcon" Width="40">
                                        <ContentPresenter
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            ContentSource="Icon" />
                                    </ContentControl>
                                    <ContentPresenter
                                        Name="PresenterHeader"
                                        Margin="6,0,0,0"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        ContentSource="Header" />
                                </DockPanel>
                            </ContentControl>
                            <StackPanel
                                x:Name="PART_Panel"
                                Grid.Row="1"
                                Height="{Binding PanelAreaLength, RelativeSource={RelativeSource AncestorType=hc:SideMenu}}"
                                Visibility="Collapsed" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Icon" Value="{x:Null}">
                            <Setter TargetName="PresenterIcon" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="BorderBack" Property="BorderThickness" Value="4,0,0,0" />
                            <Setter TargetName="BorderBack" Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
                            <Setter TargetName="PresenterHeader" Property="TextElement.FontWeight" Value="Bold" />
                        </Trigger>
                        <Trigger SourceName="PanelHeader" Property="IsMouseOver" Value="true">
                            <Setter TargetName="BorderBack" Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="SideMenuItemHeaderAccordionBaseStyle"
        TargetType="hc:SideMenuItem"
        BasedOn="{StaticResource SideMenuItemHeaderBaseStyle}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource SideMenuItemAccordionBaseStyle}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:SideMenuItem">
                    <Border Name="BorderRoot" Background="{TemplateBinding Background}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition MinHeight="48" />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <Border Name="BorderBack" Background="{TemplateBinding Background}" />
                            <ContentControl Grid.Row="0" Margin="4,0,0,0">
                                <DockPanel
                                    Name="PanelHeader"
                                    Margin="{TemplateBinding Padding}"
                                    Background="Transparent">
                                    <ContentControl Name="PresenterIcon" Width="40">
                                        <ContentPresenter
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            ContentSource="Icon" />
                                    </ContentControl>
                                    <ContentPresenter
                                        Name="PresenterHeader"
                                        Margin="6,0,0,0"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        ContentSource="Header" />
                                </DockPanel>
                            </ContentControl>
                            <ScrollViewer
                                Grid.Row="1"
                                Height="{Binding PanelAreaLength, RelativeSource={RelativeSource AncestorType=hc:SideMenu}}"
                                Visibility="{Binding Visibility, ElementName=PART_Panel}">
                                <StackPanel x:Name="PART_Panel" Visibility="Collapsed" />
                            </ScrollViewer>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Icon" Value="{x:Null}">
                            <Setter TargetName="PresenterIcon" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="BorderBack" Property="BorderThickness" Value="4,0,0,0" />
                            <Setter TargetName="BorderBack" Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
                            <Setter TargetName="PresenterHeader" Property="TextElement.FontWeight" Value="Bold" />
                        </Trigger>
                        <Trigger SourceName="PanelHeader" Property="IsMouseOver" Value="true">
                            <Setter TargetName="BorderBack" Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="SideMenuBaseStyle" TargetType="hc:SideMenu">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource SideMenuItemHeaderBaseStyle}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:SideMenu">
                    <Border
                        Name="BorderRoot"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <ScrollViewer>
                            <StackPanel x:Name="PART_Panel" />
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="SplitButtonBaseStyle"
        TargetType="hc:SplitButton"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Height" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:SplitButton">
                    <hc:SimplePanel x:Name="templateRoot">
                        <Border Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                        <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <StackPanel
                                    Margin="{TemplateBinding Padding}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    Orientation="Horizontal">
                                    <Path
                                        x:Name="PathMain"
                                        Width="{TemplateBinding hc:IconElement.Width}"
                                        Height="{TemplateBinding hc:IconElement.Height}"
                                        Data="{TemplateBinding hc:IconElement.Geometry}"
                                        Fill="{TemplateBinding Foreground}"
                                        SnapsToDevicePixels="True"
                                        Stretch="Uniform" />
                                    <ContentPresenter
                                        x:Name="ContentPresenterMain"
                                        Margin="6,0,0,0"
                                        VerticalAlignment="Center"
                                        RecognizesAccessKey="True"
                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                </StackPanel>
                                <ToggleButton
                                    x:Name="PART_Arrow"
                                    Grid.Column="1"
                                    Width="Auto"
                                    Height="Auto"
                                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,1,1,1'}"
                                    hc:IconElement.Geometry="{StaticResource DownGeometry}"
                                    hc:IconElement.Width="14"
                                    hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"
                                    Foreground="{TemplateBinding Foreground}"
                                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                    Style="{StaticResource ToggleButtonIconTransparent}" />
                            </Grid>
                        </Border>
                        <Popup
                            Margin="1"
                            AllowsTransparency="true"
                            IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                            Placement="Bottom"
                            PopupAnimation="Fade"
                            StaysOpen="False">
                            <Border
                                x:Name="dropDownBorder"
                                MinWidth="{Binding ActualWidth, ElementName=templateRoot}"
                                MaxHeight="{TemplateBinding MaxDropDownHeight}"
                                Background="{DynamicResource RegionBrush}"
                                BorderBrush="{DynamicResource BorderBrush}"
                                BorderThickness="1"
                                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                                <ScrollViewer x:Name="DropDownScrollViewer" Margin="0,4">
                                    <hc:SimplePanel 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>
                                        <ContentPresenter ContentSource="DropDownContent" />
                                    </hc:SimplePanel>
                                </ScrollViewer>
                            </Border>
                        </Popup>
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="ContentPresenterMain" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
                            <Setter TargetName="PathMain" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ContentPresenterMain" Property="Margin" Value="0" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="HitMode" Value="Click" />
                                <Condition SourceName="PART_Arrow" Property="IsChecked" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="IsDropDownOpen" Value="True" />
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Opacity" Value=".9" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Opacity" Value=".6" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="{x:Static StatusBar.SeparatorStyleKey}"
        TargetType="Separator"
        BasedOn="{StaticResource SeparatorBaseStyle}" />
    <Style x:Key="StatusBarBaseStyle" TargetType="StatusBar">
        <Setter Property="BorderThickness" Value="0,1,0,0" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
    </Style>
    <Style x:Key="StatusBarItemBaseStyle" TargetType="StatusBarItem">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.4" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="StepBarItemBaseStyle" TargetType="hc:StepBarItem">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Foreground" Value="{DynamicResource ThirdlyTextBrush}" />
        <Style.Triggers>
            <Trigger Property="Status" Value="Complete">
                <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
            </Trigger>
            <Trigger Property="Status" Value="UnderWay">
                <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="Status" Value="Waiting">
                <Setter Property="Foreground" Value="{DynamicResource ThirdlyTextBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="StepBarItemHorizontalTop"
        TargetType="hc:StepBarItem"
        BasedOn="{StaticResource StepBarItemBaseStyle}">
        <Setter Property="Margin" Value="10,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:StepBarItem">
                    <Border Background="Transparent">
                        <StackPanel>
                            <Border
                                Height="24"
                                MinWidth="24"
                                HorizontalAlignment="Center"
                                Background="{DynamicResource RegionBrush}"
                                BorderBrush="{TemplateBinding Foreground}"
                                BorderThickness="2"
                                CornerRadius="12">
                                <TextBlock
                                    Foreground="{TemplateBinding Foreground}"
                                    Style="{StaticResource TextBlockDefaultThiLight}"
                                    Text="{Binding Index, RelativeSource={RelativeSource TemplatedParent}}" />
                            </Border>
                            <ContentPresenter
                                Margin="0,4,0,0"
                                HorizontalAlignment="Center"
                                ContentTemplate="{Binding ItemTemplate, RelativeSource={RelativeSource AncestorType=hc:StepBar}}"
                                TextElement.Foreground="{TemplateBinding Foreground}" />
                        </StackPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="StepBarItemHorizontalBottom"
        TargetType="hc:StepBarItem"
        BasedOn="{StaticResource StepBarItemBaseStyle}">
        <Setter Property="Margin" Value="10,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:StepBarItem">
                    <StackPanel>
                        <ContentPresenter
                            Margin="0,0,0,4"
                            HorizontalAlignment="Center"
                            ContentTemplate="{Binding ItemTemplate, RelativeSource={RelativeSource AncestorType=hc:StepBar}}"
                            TextElement.Foreground="{TemplateBinding Foreground}" />
                        <Border
                            Height="24"
                            MinWidth="24"
                            HorizontalAlignment="Center"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{TemplateBinding Foreground}"
                            BorderThickness="2"
                            CornerRadius="12">
                            <TextBlock
                                Foreground="{TemplateBinding Foreground}"
                                Style="{StaticResource TextBlockDefaultThiLight}"
                                Text="{Binding Index, RelativeSource={RelativeSource TemplatedParent}}" />
                        </Border>
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="StepBarItemVertical"
        TargetType="hc:StepBarItem"
        BasedOn="{StaticResource StepBarItemBaseStyle}">
        <Setter Property="Margin" Value="0,10" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:StepBarItem">
                    <StackPanel Orientation="Horizontal">
                        <Border
                            Height="24"
                            MinWidth="24"
                            HorizontalAlignment="Center"
                            Background="{DynamicResource RegionBrush}"
                            BorderBrush="{TemplateBinding Foreground}"
                            BorderThickness="2"
                            CornerRadius="12">
                            <TextBlock
                                Foreground="{TemplateBinding Foreground}"
                                Style="{StaticResource TextBlockDefaultThiLight}"
                                Text="{Binding Index, RelativeSource={RelativeSource TemplatedParent}}" />
                        </Border>
                        <ContentPresenter
                            Margin="10,4,0,0"
                            HorizontalAlignment="Left"
                            ContentTemplate="{Binding ItemTemplate, RelativeSource={RelativeSource AncestorType=hc:StepBar}}"
                            TextElement.Foreground="{TemplateBinding Foreground}" />
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="StepBarHorizontalTopControlTemplate" TargetType="hc:StepBar">
        <hc:SimplePanel>
            <ProgressBar
                Name="PART_ProgressBarBack"
                Margin="0,10,0,0"
                HorizontalAlignment="Center"
                VerticalAlignment="Top"
                Background="{DynamicResource ThirdlyTextBrush}"
                Style="{StaticResource ProgressBarFlat}" />
            <ItemsPresenter />
        </hc:SimplePanel>
    </ControlTemplate>
    <ControlTemplate x:Key="StepBarHorizontalBottomControlTemplate" TargetType="hc:StepBar">
        <hc:SimplePanel>
            <ProgressBar
                Name="PART_ProgressBarBack"
                Margin="0,0,0,10"
                HorizontalAlignment="Center"
                VerticalAlignment="Bottom"
                Background="{DynamicResource ThirdlyTextBrush}"
                Style="{StaticResource ProgressBarFlat}" />
            <ItemsPresenter VerticalAlignment="Bottom" />
        </hc:SimplePanel>
    </ControlTemplate>
    <ControlTemplate x:Key="StepBarVerticalControlTemplate" TargetType="hc:StepBar">
        <hc:SimplePanel>
            <ProgressBar
                Name="PART_ProgressBarBack"
                Width="4"
                Margin="10,0,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Center"
                Background="{DynamicResource ThirdlyTextBrush}"
                Orientation="Vertical"
                RenderTransformOrigin="0.5,0.5"
                Style="{StaticResource ProgressBarFlat}">
                <ProgressBar.RenderTransform>
                    <TransformGroup>
                        <RotateTransform Angle="180" />
                    </TransformGroup>
                </ProgressBar.RenderTransform>
            </ProgressBar>
            <ItemsPresenter />
        </hc:SimplePanel>
    </ControlTemplate>
    <Style x:Key="StepBarBaseStyle" TargetType="hc:StepBar">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource StepBarItemHorizontalTop}" />
        <Setter Property="Template" Value="{StaticResource StepBarHorizontalTopControlTemplate}" />
        <Setter Property="ItemsPanel" Value="{StaticResource UniformHorizontalItemsPanelTemplate}" />
        <Style.Triggers>
            <Trigger Property="Dock" Value="Left">
                <Setter Property="ItemContainerStyle" Value="{StaticResource StepBarItemVertical}" />
                <Setter Property="Template" Value="{StaticResource StepBarVerticalControlTemplate}" />
                <Setter Property="ItemsPanel" Value="{StaticResource UniformVerticalItemsPanelTemplate}" />
            </Trigger>
            <Trigger Property="Dock" Value="Bottom">
                <Setter Property="ItemContainerStyle" Value="{StaticResource StepBarItemHorizontalBottom}" />
                <Setter Property="Template" Value="{StaticResource StepBarHorizontalBottomControlTemplate}" />
                <Setter Property="ItemsPanel" Value="{StaticResource UniformHorizontalItemsPanelTemplate}" />
            </Trigger>
            <Trigger Property="Dock" Value="Right">
                <Setter Property="FlowDirection" Value="RightToLeft" />
                <Setter Property="ItemContainerStyle" Value="{StaticResource StepBarItemVertical}" />
                <Setter Property="Template" Value="{StaticResource StepBarVerticalControlTemplate}" />
                <Setter Property="ItemsPanel" Value="{StaticResource UniformVerticalItemsPanelTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="TabItemStyle" TargetType="TabItem">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource TitleBrush}" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TabItem">
                    <hc:SimplePanel x:Name="templateRoot" SnapsToDevicePixels="true">
                        <Border
                            x:Name="mainBorder"
                            Margin="0"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="0" />
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            ContentSource="Header"
                            Focusable="False"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                            TextElement.Foreground="{DynamicResource PrimaryTextBrush}" />
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="False">
                            <Setter TargetName="mainBorder" Property="BorderThickness" Value="0,0,0,0" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="contentPresenter" Property="Opacity" Value="0.4" />
                        </Trigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
                                <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Top" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Panel.ZIndex" Value="1" />
                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" />
                            <Setter TargetName="mainBorder" Property="BorderThickness" Value="0,0,0,2" />
                        </MultiDataTrigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
                                <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Left" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Panel.ZIndex" Value="1" />
                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" />
                            <Setter TargetName="mainBorder" Property="BorderThickness" Value="0,0,2,0" />
                        </MultiDataTrigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
                                <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Bottom" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Panel.ZIndex" Value="1" />
                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" />
                            <Setter TargetName="mainBorder" Property="BorderThickness" Value="0,2,0,0" />
                        </MultiDataTrigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
                                <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Right" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Panel.ZIndex" Value="1" />
                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" />
                            <Setter TargetName="mainBorder" Property="BorderThickness" Value="2,0,0,0" />
                        </MultiDataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="TabControlBaseStyle" TargetType="TabControl">
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource TabItemStyle}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TabControl">
                    <Grid
                        x:Name="templateRoot"
                        Background="{TemplateBinding Background}"
                        ClipToBounds="true"
                        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="0"
                            Background="Transparent"
                            IsItemsHost="true" />
                        <Border
                            x:Name="contentPanel"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                            <ContentPresenter
                                x:Name="PART_SelectedContentHost"
                                Margin="0"
                                ContentSource="SelectedContent"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TabStripPlacement" Value="Bottom">
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
                            <Setter TargetName="headerPanel" Property="Grid.Row" Value="1" />
                            <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Left">
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
                            <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
                            <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
                            <Setter TargetName="headerPanel" Property="Grid.Column" Value="0" />
                            <Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
                            <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Right">
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
                            <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
                            <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
                            <Setter TargetName="headerPanel" Property="Grid.Column" Value="1" />
                            <Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
                            <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="TabItemCapsuleBaseStyle" TargetType="TabItem">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Padding" Value="10,0" />
        <Setter Property="Margin" Value="-1,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TabItem">
                    <Border
                        x:Name="BorderRoot"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            ContentSource="Header"
                            Focusable="False"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                            TextElement.Foreground="{TemplateBinding Foreground}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderRoot" Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter TargetName="BorderRoot" Property="BorderBrush" Value="{Binding Path=(hc:TitleElement.BorderBrush), RelativeSource={RelativeSource TemplatedParent}}" />
                            <Setter TargetName="BorderRoot" Property="Background" Value="{Binding Path=(hc:TitleElement.Background), RelativeSource={RelativeSource TemplatedParent}}" />
                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{Binding Path=(hc:TitleElement.Foreground), RelativeSource={RelativeSource TemplatedParent}}" />
                        </Trigger>
                        <DataTrigger Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Left">
                            <Setter Property="Margin" Value="0,-1,0,0" />
                        </DataTrigger>
                        <DataTrigger Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Right">
                            <Setter Property="Margin" Value="0,-1,0,0" />
                        </DataTrigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="contentPresenter" Property="Opacity" Value="0.4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="Panel.ZIndex" Value="{x:Static system:Int32.MaxValue}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="TabItemPlusBaseStyle" TargetType="hc:TabItem">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="BorderThickness" Value="1,0,1,1" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Padding" Value="10,0,0,0" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Menu" Value="{StaticResource TabItemMenu}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:TabItem">
                    <Grid
                        x:Name="templateRoot"
                        ContextMenu="{TemplateBinding Menu}"
                        SnapsToDevicePixels="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Border
                            x:Name="mainBorder"
                            Grid.ColumnSpan="3"
                            Margin="0"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                            <Border
                                x:Name="innerBorder"
                                Margin="0,0,0,-1"
                                Background="{DynamicResource RegionBrush}"
                                Visibility="Collapsed" />
                        </Border>
                        <Path
                            x:Name="PathMain"
                            Grid.Column="0"
                            Width="{TemplateBinding hc:IconElement.Width}"
                            Height="{TemplateBinding hc:IconElement.Height}"
                            Margin="10,0,0,0"
                            Data="{TemplateBinding hc:IconElement.Geometry}"
                            Fill="{TemplateBinding Foreground}"
                            SnapsToDevicePixels="True"
                            Stretch="Uniform" />
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Grid.Column="1"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Center"
                            ContentSource="Header"
                            Focusable="False"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        <Border
                            Name="BorderMask"
                            Grid.Column="1"
                            Width="20"
                            Margin="0,0,1,1"
                            HorizontalAlignment="Right"
                            Background="{TemplateBinding Background}">
                            <Border.OpacityMask>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                                    <GradientStop Offset="1" Color="White" />
                                    <GradientStop Offset="0" />
                                </LinearGradientBrush>
                            </Border.OpacityMask>
                        </Border>
                        <Button
                            Grid.Column="2"
                            Width="28"
                            Background="Transparent"
                            Command="interactivity:ControlCommands.Close"
                            Focusable="False"
                            Style="{StaticResource ButtonCustom}"
                            Visibility="{TemplateBinding ShowCloseButton,
                                                         Converter={StaticResource Boolean2VisibilityConverter}}">
                            <Path
                                Width="8"
                                Height="8"
                                Fill="{DynamicResource PrimaryTextBrush}"
                                Style="{StaticResource ClosePathStyle}" />
                        </Button>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Panel.ZIndex" Value="1" />
                            <Setter TargetName="innerBorder" Property="Visibility" Value="Visible" />
                            <Setter TargetName="BorderMask" Property="Background" Value="{DynamicResource RegionBrush}" />
                        </Trigger>
                        <Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
                            <Setter TargetName="PathMain" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="ShowCloseButton" Value="True">
                            <Setter TargetName="BorderMask" Property="Margin" Value="0,0,0,1" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="contentPresenter" Property="Opacity" Value="0.4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="TabControlPlusTemplate" TargetType="hc:TabControl">
        <Border
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}">
            <Grid
                x:Name="templateRoot"
                ClipToBounds="true"
                SnapsToDevicePixels="true">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition x:Name="ColumnDefinition0" />
                    <ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="0,0,0,1">
                    <hc:TabPanel
                        x:Name="PART_HeaderPanel"
                        MinHeight="{TemplateBinding TabItemHeight}"
                        Margin="0,0,-1,-1"
                        HorizontalAlignment="Left"
                        Background="{DynamicResource SecondaryTextBrush}"
                        IsItemsHost="true"
                        IsTabFillEnabled="{TemplateBinding IsTabFillEnabled}"
                        TabItemHeight="{TemplateBinding TabItemHeight}"
                        TabItemWidth="{TemplateBinding TabItemWidth}">
                        <interactivity:Interaction.Behaviors>
                            <interactivity:FluidMoveBehavior AppliesTo="Children" Duration="{Binding FluidMoveDuration, ElementName=PART_HeaderPanel}">
                                <interactivity:FluidMoveBehavior.EaseX>
                                    <CubicEase EasingMode="EaseOut" />
                                </interactivity:FluidMoveBehavior.EaseX>
                            </interactivity:FluidMoveBehavior>
                        </interactivity:Interaction.Behaviors>
                    </hc:TabPanel>
                </Border>
                <Border
                    x:Name="contentPanel"
                    Grid.Row="1"
                    Grid.Column="0"
                    Background="{DynamicResource SecondaryRegionBrush}">
                    <ContentPresenter
                        x:Name="PART_SelectedContentHost"
                        Margin="{TemplateBinding Padding}"
                        ContentSource="SelectedContent"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                </Border>
                <Border
                    Grid.Row="0"
                    Grid.Column="0"
                    Margin="0,-1,0,0"
                    HorizontalAlignment="Right"
                    Background="{DynamicResource RegionBrush}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="1,0,0,1"
                    Visibility="{Binding Visibility, ElementName=PART_OverflowButton}">
                    <hc:ContextMenuToggleButton
                        x:Name="PART_OverflowButton"
                        Height="Auto"
                        Padding="0"
                        hc:IconElement.Width="14"
                        hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}"
                        hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"
                        Background="{DynamicResource SecondaryRegionBrush}"
                        BorderThickness="0"
                        Style="{StaticResource ToggleButtonIconTransparent}"
                        Visibility="Collapsed" />
                </Border>
            </Grid>
        </Border>
    </ControlTemplate>
    <ControlTemplate x:Key="TabControlPlusScrollableTemplate" TargetType="hc:TabControl">
        <Border
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}">
            <Grid
                x:Name="templateRoot"
                ClipToBounds="true"
                SnapsToDevicePixels="true">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Border
                    Grid.Row="0"
                    Grid.Column="0"
                    Margin="0,-1,0,0"
                    HorizontalAlignment="Left"
                    Panel.ZIndex="2"
                    Background="{DynamicResource RegionBrush}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="0,0,1,1"
                    Visibility="{TemplateBinding ShowScrollButton,
                                                 Converter={StaticResource Boolean2VisibilityConverter}}">
                    <Border.CacheMode>
                        <BitmapCache SnapsToDevicePixels="True" />
                    </Border.CacheMode>
                    <RepeatButton
                        x:Name="PART_ScrollButtonLeft"
                        Width="{StaticResource DefaultControlHeight}"
                        Height="Auto"
                        Padding="8,0"
                        VerticalAlignment="Stretch"
                        hc:IconElement.Geometry="{StaticResource LeftGeometry}"
                        hc:IconElement.Height="14"
                        Background="{DynamicResource SecondaryRegionBrush}"
                        BorderThickness="0"
                        Focusable="False"
                        Foreground="{DynamicResource PrimaryTextBrush}"
                        Style="{StaticResource RepeatButtonIcon}" />
                </Border>
                <hc:ScrollViewer
                    x:Name="PART_OverflowScrollviewer"
                    Grid.Row="0"
                    Grid.Column="1"
                    hc:ScrollViewerAttach.Orientation="Horizontal"
                    CanMouseWheel="True"
                    HorizontalScrollBarVisibility="Hidden"
                    IsDeferredScrollingEnabled="True"
                    IsInertiaEnabled="True">
                    <Border
                        Name="PART_HeaderBorder"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{DynamicResource BorderBrush}"
                        BorderThickness="0,0,0,1">
                        <hc:TabPanel
                            x:Name="PART_HeaderPanel"
                            MinHeight="{TemplateBinding TabItemHeight}"
                            Margin="0,0,-1,-1"
                            HorizontalAlignment="Left"
                            Background="{DynamicResource SecondaryTextBrush}"
                            IsItemsHost="true"
                            IsTabFillEnabled="{TemplateBinding IsTabFillEnabled}"
                            TabItemHeight="{TemplateBinding TabItemHeight}"
                            TabItemWidth="{TemplateBinding TabItemWidth}">
                            <interactivity:Interaction.Behaviors>
                                <interactivity:FluidMoveBehavior AppliesTo="Children" Duration="{Binding FluidMoveDuration, ElementName=PART_HeaderPanel}">
                                    <interactivity:FluidMoveBehavior.EaseX>
                                        <CubicEase EasingMode="EaseOut" />
                                    </interactivity:FluidMoveBehavior.EaseX>
                                </interactivity:FluidMoveBehavior>
                            </interactivity:Interaction.Behaviors>
                        </hc:TabPanel>
                    </Border>
                </hc:ScrollViewer>
                <Border
                    Grid.Row="0"
                    Grid.Column="2"
                    Margin="0,-1,0,0"
                    HorizontalAlignment="Right"
                    Background="{DynamicResource RegionBrush}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="1,0,0,1">
                    <Border.CacheMode>
                        <BitmapCache SnapsToDevicePixels="True" />
                    </Border.CacheMode>
                    <StackPanel Orientation="Horizontal">
                        <RepeatButton
                            x:Name="PART_ScrollButtonRight"
                            Width="{StaticResource DefaultControlHeight}"
                            Height="Auto"
                            Padding="8,0"
                            VerticalAlignment="Stretch"
                            hc:IconElement.Geometry="{StaticResource RightGeometry}"
                            hc:IconElement.Height="14"
                            Background="{DynamicResource SecondaryRegionBrush}"
                            BorderThickness="0"
                            Focusable="False"
                            Foreground="{DynamicResource PrimaryTextBrush}"
                            Style="{StaticResource RepeatButtonIcon}"
                            Visibility="{TemplateBinding ShowScrollButton,
                                                         Converter={StaticResource Boolean2VisibilityConverter}}" />
                        <Border
                            Width="1"
                            Background="{DynamicResource BorderBrush}"
                            Visibility="{Binding Visibility, ElementName=PART_OverflowButton}" />
                        <hc:ContextMenuToggleButton
                            x:Name="PART_OverflowButton"
                            Height="Auto"
                            Padding="0"
                            hc:IconElement.Width="14"
                            hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}"
                            hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"
                            Background="{DynamicResource SecondaryRegionBrush}"
                            BorderThickness="0"
                            Style="{StaticResource ToggleButtonIconTransparent}"
                            Visibility="Collapsed" />
                    </StackPanel>
                </Border>
                <Border
                    x:Name="contentPanel"
                    Grid.Row="1"
                    Grid.Column="0"
                    Grid.ColumnSpan="3"
                    Background="{DynamicResource SecondaryRegionBrush}">
                    <ContentPresenter
                        x:Name="PART_SelectedContentHost"
                        Margin="{TemplateBinding Padding}"
                        ContentSource="SelectedContent"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                </Border>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="TabControlPlusBaseStyle" TargetType="hc:TabControl">
        <Setter Property="Padding" Value="0" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource TabItemPlusBaseStyle}" />
        <Setter Property="Template" Value="{StaticResource TabControlPlusTemplate}" />
        <Style.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsScrollable" Value="True" />
                    <Condition Property="IsTabFillEnabled" Value="False" />
                </MultiTrigger.Conditions>
                <Setter Property="Template" Value="{StaticResource TabControlPlusScrollableTemplate}" />
            </MultiTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="SlidingTabContainerBaseStyle" TargetType="hc:SlidingTabContainer">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="Padding" Value="2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:SlidingTabContainer">
                    <Border
                        Padding="{TemplateBinding Padding}"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Background="{TemplateBinding Background}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <hc:SimplePanel>
                            <Border
                                x:Name="PART_Sliding"
                                Width="0"
                                Height="0"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Top"
                                Background="{Binding Path=(hc:TitleElement.Background), RelativeSource={RelativeSource TemplatedParent}}"
                                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                                Effect="{StaticResource EffectShadow1}">
                                <Border.RenderTransform>
                                    <TranslateTransform />
                                </Border.RenderTransform>
                            </Border>
                            <ContentPresenter />
                        </hc:SimplePanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="TimePickerBaseStyle"
        TargetType="hc:TimePicker"
        BasedOn="{StaticResource InputElementBaseStyle}">
        <Setter Property="CaretBrush" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:TimePicker">
                    <Grid x:Name="PART_Root">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Border
                            x:Name="border"
                            Grid.ColumnSpan="2"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                        <Button
                            x:Name="PART_Button"
                            Grid.Row="0"
                            Grid.Column="1"
                            Width="Auto"
                            Height="Auto"
                            Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            hc:IconElement.Geometry="{StaticResource ClockGeometry}"
                            hc:IconElement.Width="14"
                            Focusable="False"
                            Foreground="{Binding BorderBrush, ElementName=border}"
                            Style="{StaticResource ButtonIcon}" />
                        <hc:WatermarkTextBox
                            x:Name="PART_TextBox"
                            Grid.Row="0"
                            Grid.Column="0"
                            Padding="{TemplateBinding Padding}"
                            HorizontalAlignment="Stretch"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            CaretBrush="{TemplateBinding CaretBrush}"
                            Focusable="{TemplateBinding Focusable}"
                            Foreground="{TemplateBinding Foreground}" />
                        <Popup
                            x:Name="PART_Popup"
                            Grid.Column="0"
                            AllowsTransparency="True"
                            Placement="Bottom"
                            PlacementTarget="{Binding ElementName=border}"
                            PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                            StaysOpen="False" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="hc:InfoElement.IsReadOnly" Value="True">
                            <Setter TargetName="PART_Button" Property="IsEnabled" Value="False" />
                            <Setter TargetName="PART_Button" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="PART_Root" Property="Opacity" Value="0.4" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="true" />
                                <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="true" />
                                <Condition SourceName="PART_Popup" Property="IsOpen" Value="true" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </MultiTrigger>
                        <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                        <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="TimePickerExtendTopTemplate" TargetType="hc:TimePicker">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="PART_Root" Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    x:Name="PART_Button"
                    Grid.Row="0"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    hc:IconElement.Geometry="{StaticResource ClockGeometry}"
                    hc:IconElement.Width="14"
                    Focusable="False"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}" />
                <hc:WatermarkTextBox
                    x:Name="PART_TextBox"
                    Grid.Row="0"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    CaretBrush="{TemplateBinding CaretBrush}"
                    Focusable="{TemplateBinding Focusable}"
                    Foreground="{TemplateBinding Foreground}"
                    Watermark="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" />
                <Popup
                    x:Name="PART_Popup"
                    Grid.Column="0"
                    AllowsTransparency="True"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="hc:InfoElement.IsReadOnly" Value="True">
                <Setter TargetName="PART_Button" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="PART_Root" Property="Opacity" Value="0.4" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="true" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </MultiTrigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="TimePickerExtendLeftTemplate" TargetType="hc:TimePicker">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="PART_Root" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    x:Name="PART_Button"
                    Grid.Row="0"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    hc:IconElement.Geometry="{StaticResource ClockGeometry}"
                    hc:IconElement.Width="14"
                    Focusable="False"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}" />
                <hc:WatermarkTextBox
                    x:Name="PART_TextBox"
                    Grid.Row="0"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    CaretBrush="{TemplateBinding CaretBrush}"
                    Focusable="{TemplateBinding Focusable}"
                    Foreground="{TemplateBinding Foreground}"
                    Watermark="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" />
                <Popup
                    x:Name="PART_Popup"
                    Grid.Column="0"
                    AllowsTransparency="True"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="hc:InfoElement.IsReadOnly" Value="True">
                <Setter TargetName="PART_Button" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="PART_Root" Property="Opacity" Value="0.4" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="true" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </MultiTrigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="TimePickerExtendBaseStyle"
        TargetType="hc:TimePicker"
        BasedOn="{StaticResource TimePickerBaseStyle}">
        <Setter Property="Height" Value="Auto" />
        <Setter Property="hc:InfoElement.Symbol" Value="●" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="{x:Static system:Double.NaN}" />
        <Setter Property="hc:InfoElement.MinContentHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Template" Value="{StaticResource TimePickerExtendTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource TimePickerExtendLeftTemplate}" />
                <Setter Property="Width" Value="Auto" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="TimePickerPlusTopTemplate" TargetType="hc:TimePicker">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Double2GridLengthConverter}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid.RowDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheTop), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="PART_Root" Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Button
                    x:Name="PART_Button"
                    Grid.Row="0"
                    Grid.Column="2"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource ClockGeometry}"
                    hc:IconElement.Width="14"
                    Focusable="False"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}" />
                <hc:WatermarkTextBox
                    x:Name="PART_TextBox"
                    Grid.Row="0"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    CaretBrush="{TemplateBinding CaretBrush}"
                    Focusable="{TemplateBinding Focusable}"
                    Foreground="{TemplateBinding Foreground}"
                    Watermark="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" />
                <Popup
                    x:Name="PART_Popup"
                    Grid.Column="0"
                    AllowsTransparency="True"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="hc:InfoElement.IsReadOnly" Value="True">
                <Setter TargetName="ButtonClear" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="PART_Root" Property="Opacity" Value="0.4" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="true" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                    <Condition Property="hc:InfoElement.IsReadOnly" Value="False" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="TimePickerPlusLeftTemplate" TargetType="hc:TimePicker">
        <Grid Height="{Binding Path=(hc:InfoElement.ContentHeight), RelativeSource={RelativeSource TemplatedParent}}" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth), RelativeSource={RelativeSource TemplatedParent}}" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <DockPanel
                Margin="{Binding Path=(hc:TitleElement.MarginOnTheLeft), RelativeSource={RelativeSource TemplatedParent}}"
                HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment), RelativeSource={RelativeSource TemplatedParent}}"
                LastChildFill="True"
                Visibility="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource String2VisibilityConverter}}">
                <ContentPresenter
                    Margin="4,0,0,0"
                    Content="{Binding Path=(hc:InfoElement.Symbol), RelativeSource={RelativeSource TemplatedParent}}"
                    DockPanel.Dock="Right"
                    TextElement.Foreground="{DynamicResource DangerBrush}"
                    Visibility="{Binding Path=(hc:InfoElement.Necessary), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                <TextBlock
                    hc:TextBlockAttach.AutoTooltip="True"
                    Text="{Binding Path=(hc:InfoElement.Title), RelativeSource={RelativeSource TemplatedParent}}"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="NoWrap" />
            </DockPanel>
            <Grid x:Name="PART_Root" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border
                    x:Name="border"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{DynamicResource BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                <Button
                    Name="ButtonClear"
                    Grid.Column="1"
                    Width="Auto"
                    Height="Auto"
                    Padding="0,0,2,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}"
                    hc:IconElement.Width="14"
                    Command="interactivity:ControlCommands.Clear"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}"
                    Visibility="Collapsed" />
                <Button
                    x:Name="PART_Button"
                    Grid.Row="0"
                    Grid.Column="2"
                    Width="Auto"
                    Height="Auto"
                    Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    hc:IconElement.Geometry="{StaticResource ClockGeometry}"
                    hc:IconElement.Width="14"
                    Focusable="False"
                    Foreground="{Binding BorderBrush, ElementName=border}"
                    Style="{StaticResource ButtonIcon}" />
                <hc:WatermarkTextBox
                    x:Name="PART_TextBox"
                    Grid.Row="0"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalAlignment="Stretch"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    CaretBrush="{TemplateBinding CaretBrush}"
                    Focusable="{TemplateBinding Focusable}"
                    Foreground="{TemplateBinding Foreground}"
                    Watermark="{Binding Path=(hc:InfoElement.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" />
                <Popup
                    x:Name="PART_Popup"
                    Grid.Column="0"
                    AllowsTransparency="True"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=border}"
                    PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="False" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="hc:InfoElement.IsReadOnly" Value="True">
                <Setter TargetName="ButtonClear" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="IsEnabled" Value="False" />
                <Setter TargetName="PART_Button" Property="Visibility" Value="Collapsed" />
                <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="PART_Root" Property="Opacity" Value="0.4" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="false" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition SourceName="PART_Popup" Property="IsOpen" Value="true" />
                </MultiTrigger.Conditions>
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition SourceName="PART_Root" Property="IsMouseOver" Value="true" />
                    <Condition Property="hc:InfoElement.ShowClearButton" Value="True" />
                    <Condition Property="hc:InfoElement.IsReadOnly" Value="False" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ButtonClear" Property="Visibility" Value="Visible" />
            </MultiTrigger>
            <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="TimePickerPlusBaseStyle"
        TargetType="hc:TimePicker"
        BasedOn="{StaticResource TimePickerExtendBaseStyle}">
        <Setter Property="Template" Value="{StaticResource TimePickerPlusTopTemplate}" />
        <Style.Triggers>
            <Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
                <Setter Property="Template" Value="{StaticResource TimePickerPlusLeftTemplate}" />
                <Setter Property="Width" Value="Auto" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="{x:Static ToolBar.SeparatorStyleKey}" TargetType="Separator">
        <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Width" Value="1" />
    </Style>
    <Style
        x:Key="{x:Static ToolBar.ButtonStyleKey}"
        TargetType="Button"
        BasedOn="{StaticResource ButtonBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="{x:Static ToolBar.CheckBoxStyleKey}"
        TargetType="CheckBox"
        BasedOn="{StaticResource CheckBoxBaseStyle}" />
    <Style
        x:Key="{x:Static ToolBar.RadioButtonStyleKey}"
        TargetType="RadioButton"
        BasedOn="{StaticResource RadioButtonBaseStyle}" />
    <Style
        x:Key="{x:Static ToolBar.ComboBoxStyleKey}"
        TargetType="ComboBox"
        BasedOn="{StaticResource ComboBoxBaseStyle}" />
    <Style
        x:Key="{x:Static ToolBar.TextBoxStyleKey}"
        TargetType="TextBox"
        BasedOn="{StaticResource TextBoxBaseStyle}" />
    <Style
        x:Key="{x:Static ToolBar.MenuStyleKey}"
        TargetType="Menu"
        BasedOn="{StaticResource MenuBaseStyle}" />
    <Style
        x:Key="{x:Static ToolBar.ToggleButtonStyleKey}"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ToolBarThumbHorizontalStyle" TargetType="Thumb">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Border
                        Padding="{TemplateBinding Padding}"
                        Background="Transparent"
                        SnapsToDevicePixels="True">
                        <Path
                            Width="4"
                            Data="{StaticResource DragVerticalGeometry}"
                            Fill="{DynamicResource PrimaryBrush}"
                            SnapsToDevicePixels="True"
                            Stretch="Uniform" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Cursor" Value="SizeAll" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ToolBarThumbVerticalStyle" TargetType="Thumb">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Border
                        Padding="{TemplateBinding Padding}"
                        Background="Transparent"
                        SnapsToDevicePixels="True">
                        <Path
                            Height="4"
                            Data="{StaticResource DragHorizontalGeometry}"
                            Fill="{DynamicResource PrimaryBrush}"
                            SnapsToDevicePixels="True"
                            Stretch="Uniform" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Cursor" Value="SizeAll" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="ToolBarOverflowButtonStyle"
        TargetType="ToggleButton"
        BasedOn="{StaticResource ToggleButtonIcon}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="MinHeight" Value="0" />
        <Setter Property="MinWidth" Value="0" />
        <Setter Property="Height" Value="Auto" />
        <Setter Property="Width" Value="Auto" />
        <Setter Property="ClickMode" Value="Press" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="ToolBarVerticalTemplate" TargetType="ToolBar">
        <Border
            x:Name="MainPanelBorder"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid SnapsToDevicePixels="true">
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <DockPanel KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabNavigation="Local">
                    <Thumb
                        x:Name="ToolBarThumb"
                        Height="10"
                        Margin="0,4,0,0"
                        DockPanel.Dock="Top"
                        Style="{StaticResource ToolBarThumbVerticalStyle}" />
                    <ContentPresenter
                        x:Name="ToolBarHeader"
                        Margin="4,4,4,0"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        ContentSource="Header"
                        DockPanel.Dock="Top"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    <ToolBarPanel
                        x:Name="PART_ToolBarPanel"
                        Margin="{TemplateBinding Padding}"
                        IsItemsHost="true"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                </DockPanel>
                <ToggleButton
                    x:Name="ButtonOverflow"
                    Grid.Row="1"
                    Margin="2,0,2,2"
                    Padding="6,4"
                    HorizontalContentAlignment="Right"
                    hc:IconElement.Geometry="{StaticResource RightGeometry}"
                    hc:IconElement.Height="8"
                    hc:IconSwitchElement.GeometrySelected="{StaticResource LeftGeometry}"
                    IsChecked="{Binding IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    IsEnabled="{TemplateBinding HasOverflowItems}"
                    Style="{StaticResource ToolBarOverflowButtonStyle}" />
                <Popup
                    AllowsTransparency="true"
                    Focusable="false"
                    IsOpen="{Binding IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}"
                    Placement="Right"
                    PlacementTarget="{Binding ElementName=ButtonOverflow}"
                    PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="false">
                    <Border
                        Background="{DynamicResource RegionBrush}"
                        BorderBrush="{DynamicResource BorderBrush}"
                        BorderThickness="1"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        RenderOptions.ClearTypeHint="Enabled">
                        <ToolBarOverflowPanel
                            x:Name="PART_ToolBarOverflowPanel"
                            Margin="6"
                            FocusVisualStyle="{x:Null}"
                            Focusable="true"
                            KeyboardNavigation.DirectionalNavigation="Cycle"
                            KeyboardNavigation.TabNavigation="Cycle"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                            WrapWidth="200" />
                    </Border>
                </Popup>
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsOverflowOpen" Value="true">
                <Setter TargetName="ToolBarThumb" Property="IsEnabled" Value="false" />
            </Trigger>
            <Trigger Property="Header" Value="{x:Null}">
                <Setter TargetName="ToolBarHeader" Property="Visibility" Value="Collapsed" />
            </Trigger>
            <Trigger Property="ToolBarTray.IsLocked" Value="true">
                <Setter TargetName="ToolBarThumb" Property="Visibility" Value="Collapsed" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ToolBarHorizontalTemplate" TargetType="ToolBar">
        <Border
            x:Name="MainPanelBorder"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
            <Grid SnapsToDevicePixels="true">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <DockPanel KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabNavigation="Local">
                    <Thumb
                        x:Name="ToolBarThumb"
                        Width="10"
                        Margin="4,0,0,0"
                        Style="{StaticResource ToolBarThumbHorizontalStyle}" />
                    <ContentPresenter
                        x:Name="ToolBarHeader"
                        Margin="4,4,0,4"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        ContentSource="Header"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    <ToolBarPanel
                        x:Name="PART_ToolBarPanel"
                        Margin="{TemplateBinding Padding}"
                        IsItemsHost="true"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                </DockPanel>
                <ToggleButton
                    x:Name="ButtonOverflow"
                    Grid.Column="1"
                    Margin="0,2,2,2"
                    Padding="4,6"
                    VerticalContentAlignment="Bottom"
                    hc:IconElement.Geometry="{StaticResource DownGeometry}"
                    hc:IconElement.Width="8"
                    hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"
                    IsChecked="{Binding IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    IsEnabled="{TemplateBinding HasOverflowItems}"
                    Style="{StaticResource ToolBarOverflowButtonStyle}" />
                <Popup
                    AllowsTransparency="true"
                    Focusable="false"
                    IsOpen="{Binding IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}"
                    Placement="Bottom"
                    PlacementTarget="{Binding ElementName=ButtonOverflow}"
                    PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                    StaysOpen="false">
                    <Border
                        Background="{DynamicResource RegionBrush}"
                        BorderBrush="{DynamicResource BorderBrush}"
                        BorderThickness="1"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        RenderOptions.ClearTypeHint="Enabled">
                        <ToolBarOverflowPanel
                            x:Name="PART_ToolBarOverflowPanel"
                            Margin="6"
                            FocusVisualStyle="{x:Null}"
                            Focusable="true"
                            KeyboardNavigation.DirectionalNavigation="Cycle"
                            KeyboardNavigation.TabNavigation="Cycle"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                            WrapWidth="200" />
                    </Border>
                </Popup>
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsOverflowOpen" Value="true">
                <Setter TargetName="ToolBarThumb" Property="IsEnabled" Value="false" />
            </Trigger>
            <Trigger Property="Header" Value="{x:Null}">
                <Setter TargetName="ToolBarHeader" Property="Visibility" Value="Collapsed" />
            </Trigger>
            <Trigger Property="ToolBarTray.IsLocked" Value="true">
                <Setter TargetName="ToolBarThumb" Property="Visibility" Value="Collapsed" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="ToolBarBaseStyle" TargetType="ToolBar">
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="Padding" Value="4" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template" Value="{StaticResource ToolBarHorizontalTemplate}" />
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Vertical">
                <Setter Property="Template" Value="{StaticResource ToolBarVerticalTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ToolTipBaseStyle" TargetType="ToolTip">
        <Setter Property="Padding" Value="0,6" />
        <Setter Property="Background" Value="White" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="FontSize" Value="12" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToolTip">
                    <Border
                        Margin="8"
                        Padding="{TemplateBinding Padding}"
                        Background="{DynamicResource RegionBrush}"
                        BorderBrush="{DynamicResource BorderBrush}"
                        BorderThickness="1"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        Effect="{StaticResource EffectShadow2}">
                        <ContentPresenter Margin="10,0" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="TransferItemBaseStyle"
        TargetType="hc:TransferItem"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualMargin0}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:TransferItem">
                    <Border
                        Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='1,0,1,0'}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        SnapsToDevicePixels="true">
                        <ContentPresenter
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
                <Setter Property="TextElement.Foreground" Value="{DynamicResource TextIconBrush}" />
            </Trigger>
            <Trigger Property="IsTransferred" Value="True">
                <Setter Property="Visibility" Value="Collapsed" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="TransferBaseStyle" TargetType="hc:Transfer">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="2" />
        <Setter Property="SelectionMode" Value="Extended" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource TransferItemBaseStyle}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Transfer">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Border
                            Grid.RowSpan="4"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                            <hc:ToggleBlock
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                <hc:ToggleBlock.CheckedContent>
                                    <hc:ScrollViewer
                                        Padding="{TemplateBinding Padding}"
                                        Focusable="false"
                                        HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                        IsInertiaEnabled="{Binding Path=(hc:ScrollViewer.IsInertiaEnabled), RelativeSource={RelativeSource TemplatedParent}}"
                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                        VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                                        <ItemsPresenter />
                                    </hc:ScrollViewer>
                                </hc:ToggleBlock.CheckedContent>
                                <hc:ToggleBlock.UnCheckedContent>
                                    <hc:Empty />
                                </hc:ToggleBlock.UnCheckedContent>
                            </hc:ToggleBlock>
                        </Border>
                        <StackPanel
                            Grid.Row="0"
                            Grid.RowSpan="4"
                            Grid.Column="1"
                            Margin="8,0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center">
                            <Button hc:IconElement.Geometry="{StaticResource LeftGeometry}" Command="interactivity:ControlCommands.Cancel" />
                            <Button
                                Margin="0,8,0,0"
                                hc:IconElement.Geometry="{StaticResource RightGeometry}"
                                Command="interactivity:ControlCommands.Selected" />
                        </StackPanel>
                        <ListBox
                            x:Name="PART_SelectedListBox"
                            Grid.Row="0"
                            Grid.RowSpan="4"
                            Grid.Column="2"
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            ItemContainerStyle="{TemplateBinding ItemContainerStyle}"
                            ItemsPanel="{TemplateBinding ItemsPanel}"
                            SelectionMode="{TemplateBinding SelectionMode}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ExpandCollapseToggleStyle" TargetType="ToggleButton">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Width" Value="16" />
        <Setter Property="Height" Value="16" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Border
                        Width="16"
                        Height="16"
                        Padding="4"
                        Background="Transparent">
                        <Path
                            x:Name="ExpandPath"
                            Data="{StaticResource TreeArrow}"
                            Fill="{Binding Foreground, RelativeSource={RelativeSource AncestorType=TreeViewItem}}"
                            RenderTransformOrigin="0.5,0.5"
                            Stretch="Uniform">
                            <Path.RenderTransform>
                                <RotateTransform Angle="-90" />
                            </Path.RenderTransform>
                        </Path>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="ExpandPath" Property="RenderTransform">
                                <Setter.Value>
                                    <RotateTransform Angle="0" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="TreeViewItemBaseStyle"
        TargetType="TreeViewItem"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualRadius0Margin0}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Padding" Value="10,0" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Margin" Value="0,0,0,2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TreeViewItem">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition MinHeight="{TemplateBinding MinHeight}" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Border
                            x:Name="Bd"
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            SnapsToDevicePixels="true">
                            <DockPanel Margin="{Binding Converter={StaticResource TreeViewItemMarginConverter}, RelativeSource={RelativeSource TemplatedParent}}" LastChildFill="True">
                                <ToggleButton
                                    x:Name="Expander"
                                    ClickMode="Press"
                                    IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}"
                                    Style="{StaticResource ExpandCollapseToggleStyle}" />
                                <ContentPresenter
                                    x:Name="PART_Header"
                                    VerticalAlignment="Center"
                                    ContentSource="Header"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </DockPanel>
                        </Border>
                        <ItemsPresenter x:Name="ItemsHost" Grid.Row="1" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger SourceName="Bd" Property="IsMouseOver" Value="true">
                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
                        </Trigger>
                        <Trigger Property="IsExpanded" Value="false">
                            <Setter TargetName="ItemsHost" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="HasItems" Value="false">
                            <Setter TargetName="Expander" Property="Visibility" Value="Hidden" />
                        </Trigger>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource PrimaryBrush}" />
                            <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true" />
                                <Condition Property="IsSelectionActive" Value="false" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource DarkDefaultBrush}" />
                            <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" Value=".4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="TreeViewBaseStyle"
        TargetType="TreeView"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="2,2,2,0" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.PanningMode" Value="Both" />
        <Setter Property="hc:ScrollViewer.IsInertiaEnabled" Value="False" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="VirtualizingPanel.IsVirtualizing" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TreeView">
                    <Border
                        x:Name="Bd"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        SnapsToDevicePixels="true">
                        <hc:ToggleBlock
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Stretch"
                            IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <hc:ToggleBlock.CheckedContent>
                                <hc:ScrollViewer
                                    x:Name="_tv_scrollviewer_"
                                    Padding="{TemplateBinding Padding}"
                                    Focusable="false"
                                    HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                    IsInertiaEnabled="{Binding Path=(hc:ScrollViewer.IsInertiaEnabled), RelativeSource={RelativeSource TemplatedParent}}"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                    VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                                    <ItemsPresenter />
                                </hc:ScrollViewer>
                            </hc:ToggleBlock.CheckedContent>
                            <hc:ToggleBlock.UnCheckedContent>
                                <hc:Empty />
                            </hc:ToggleBlock.UnCheckedContent>
                        </hc:ToggleBlock>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="VirtualizingPanel.IsVirtualizing" Value="true">
                            <Setter TargetName="_tv_scrollviewer_" Property="CanContentScroll" Value="true" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="VirtualizingPanel.IsVirtualizing" Value="true">
                <Setter Property="ItemsPanel">
                    <Setter.Value>
                        <ItemsPanelTemplate>
                            <VirtualizingStackPanel />
                        </ItemsPanelTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="WatermarkBaseStyle" TargetType="hc:Watermark">
        <Setter Property="MarkBrush" Value="{DynamicResource DarkMaskBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource DarkMaskBrush}" />
        <Setter Property="Angle" Value="20" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Watermark">
                    <Border Name="PART_Root">
                        <ContentPresenter />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="AutoCompleteTextBoxItemBaseStyle" TargetType="ComboBoxItem">
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ComboBoxItem">
                    <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="False" />
                                <Condition Property="IsMouseOver" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
                        </MultiTrigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource PrimaryBrush}" />
                            <Setter Property="Foreground" Value="White" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="AutoCompleteTextBoxBaseStyle" TargetType="hc:AutoCompleteTextBox">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="CaretBrush" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="Both" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Padding" Value="{StaticResource DefaultInputPadding}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Validation.ErrorTemplate" Value="{x:Null}" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource AutoCompleteTextBoxItemBaseStyle}" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="hc:Empty.ShowEmpty" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:AutoCompleteTextBox">
                    <hc:SimplePanel>
                        <Border
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            SnapsToDevicePixels="true">
                            <TextBox
                                x:Name="PART_SearchTextBox"
                                Padding="{TemplateBinding Padding}"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                CaretBrush="{TemplateBinding CaretBrush}"
                                IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
                                Style="{StaticResource ComboBoxEditableTextBox}" />
                        </Border>
                        <Popup
                            x:Name="PART_Popup"
                            Margin="1"
                            AllowsTransparency="true"
                            IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                            Placement="Bottom"
                            PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                            <Border
                                x:Name="dropDownBorder"
                                MinWidth="{Binding ActualWidth, ElementName=toggleButton}"
                                MaxHeight="{TemplateBinding MaxDropDownHeight}"
                                Margin="8,0,8,8"
                                Background="{DynamicResource RegionBrush}"
                                BorderBrush="{DynamicResource BorderBrush}"
                                BorderThickness="0,1,0,0"
                                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                                Effect="{StaticResource EffectShadow2}">
                                <hc:ToggleBlock
                                    HorizontalContentAlignment="Stretch"
                                    VerticalContentAlignment="Stretch"
                                    IsChecked="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                                    <hc:ToggleBlock.CheckedContent>
                                        <ScrollViewer Margin="0,4">
                                            <ItemsPresenter
                                                x:Name="ItemsPresenter"
                                                KeyboardNavigation.DirectionalNavigation="Contained"
                                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                        </ScrollViewer>
                                    </hc:ToggleBlock.CheckedContent>
                                    <hc:ToggleBlock.UnCheckedContent>
                                        <hc:Empty />
                                    </hc:ToggleBlock.UnCheckedContent>
                                </hc:ToggleBlock>
                            </Border>
                        </Popup>
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasItems" Value="false">
                            <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
                        </Trigger>
                        <Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
                            <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{Binding ActualWidth, ElementName=PART_SearchTextBox}" />
                            <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualWidth, ElementName=PART_SearchTextBox}" />
                        </Trigger>
                        <Trigger Property="hc:DropDownElement.AutoWidth" Value="True">
                            <Setter TargetName="dropDownBorder" Property="MaxWidth" Value="{x:Static system:Double.MaxValue}" />
                            <Setter TargetName="dropDownBorder" Property="MinWidth" Value="{Binding ActualHeight, ElementName=PART_SearchTextBox}" />
                        </Trigger>
                        <Trigger SourceName="PART_SearchTextBox" Property="IsMouseOver" Value="true">
                            <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="true" />
                                <Condition SourceName="PART_SearchTextBox" Property="IsFocused" Value="false" />
                            </MultiTrigger.Conditions>
                            <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
                        </MultiTrigger>
                        <Trigger SourceName="PART_SearchTextBox" Property="IsFocused" Value="True">
                            <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="DataGridCellStyle" TargetType="DataGridCell">
        <Setter Property="FocusVisualStyle">
            <Setter.Value>
                <Style>
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle
                                    Margin="2"
                                    Opacity=".6"
                                    RadiusX="4"
                                    RadiusY="4"
                                    SnapsToDevicePixels="true"
                                    Stroke="{DynamicResource SecondaryBorderBrush}"
                                    StrokeDashArray="1 1"
                                    StrokeThickness="2" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DataGridCell">
                    <Border Background="Transparent">
                        <Border
                            Margin="0,0,4,0"
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            SnapsToDevicePixels="True">
                            <ContentPresenter
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
                    <Condition Binding="{Binding SelectionUnit, RelativeSource={RelativeSource FindAncestor, AncestorType=DataGrid}}" Value="Cell" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
                <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
                    <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="False" />
                    <Condition Binding="{Binding SelectionUnit, RelativeSource={RelativeSource FindAncestor, AncestorType=DataGrid}}" Value="CellOrRowHeader" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
                <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
                    <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="True" />
                    <Condition Binding="{Binding SelectionUnit, RelativeSource={RelativeSource FindAncestor, AncestorType=DataGrid}}" Value="CellOrRowHeader" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
                    <Condition Binding="{Binding SelectionUnit, RelativeSource={RelativeSource FindAncestor, AncestorType=DataGrid}}" Value="FullRow" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
            </MultiDataTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="true" />
                    <Condition Property="Selector.IsSelectionActive" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
            </MultiTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="DataGridRowStyle" TargetType="DataGridRow">
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="Margin" Value="0,0,0,4" />
        <Setter Property="Padding" Value="0,6" />
        <Setter Property="Validation.ErrorTemplate" Value="{x:Null}" />
        <Setter Property="ValidationErrorTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <TextBlock
                        Margin="2,0,0,0"
                        VerticalAlignment="Center"
                        Foreground="Red"
                        Text="!" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DataGridRow">
                    <SelectiveScrollingGrid>
                        <SelectiveScrollingGrid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </SelectiveScrollingGrid.ColumnDefinitions>
                        <SelectiveScrollingGrid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </SelectiveScrollingGrid.RowDefinitions>
                        <Border
                            x:Name="DGR_Border"
                            Grid.ColumnSpan="2"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="4"
                            SnapsToDevicePixels="True" />
                        <DataGridCellsPresenter
                            Grid.Row="0"
                            Grid.Column="1"
                            MinHeight="{TemplateBinding MinHeight}"
                            VerticalContentAlignment="Center"
                            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=DataGrid}}"
                            Visibility="{TemplateBinding DetailsVisibility}" />
                        <DataGridRowHeader
                            Grid.Row="0"
                            Grid.Column="0"
                            SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                            Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType=DataGrid}}" />
                    </SelectiveScrollingGrid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}" />
            </Trigger>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
                <Setter Property="TextElement.Foreground" Value="{DynamicResource TextIconBrush}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="true" />
                    <Condition Property="Selector.IsSelectionActive" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
            </MultiTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="DataGridColumnHeaderStyle" TargetType="DataGridColumnHeader">
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Padding" Value="12,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DataGridColumnHeader">
                    <hc:SimplePanel>
                        <Border
                            Padding="{TemplateBinding Padding}"
                            Background="Transparent"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                            <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <ContentPresenter
                                    VerticalAlignment="Center"
                                    RecognizesAccessKey="True"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                <ToggleButton
                                    x:Name="ToggleButtonSortDirection"
                                    Grid.Column="1"
                                    Width="20"
                                    Height="{x:Static system:Double.NaN}"
                                    Padding="4,0"
                                    VerticalAlignment="Center"
                                    hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}"
                                    hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"
                                    Foreground="{DynamicResource PrimaryBrush}"
                                    IsEnabled="False"
                                    Opacity="1"
                                    Style="{StaticResource ToggleButtonIconTransparent}" />
                            </Grid>
                        </Border>
                        <Thumb
                            x:Name="PART_LeftHeaderGripper"
                            HorizontalAlignment="Left"
                            Style="{StaticResource ColumnHeaderGripperStyle}" />
                        <Thumb
                            x:Name="PART_RightHeaderGripper"
                            HorizontalAlignment="Right"
                            Style="{StaticResource ColumnHeaderGripperStyle}" />
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="SortDirection" Value="{x:Null}">
                            <Setter TargetName="ToggleButtonSortDirection" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="SortDirection" Value="Ascending">
                            <Setter TargetName="ToggleButtonSortDirection" Property="IsChecked" Value="True" />
                        </Trigger>
                        <Trigger Property="SortDirection" Value="Descending">
                            <Setter TargetName="ToggleButtonSortDirection" Property="IsChecked" Value="False" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="SortDirection" Value="Ascending">
                <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="SortDirection" Value="Descending">
                <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="DataGridRowHeaderStyle" TargetType="DataGridRowHeader">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DataGridRowHeader">
                    <hc:SimplePanel HorizontalAlignment="Center">
                        <Border
                            Padding="{TemplateBinding Padding}"
                            Background="Transparent"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                            <StackPanel Orientation="Horizontal">
                                <ContentPresenter
                                    VerticalAlignment="Center"
                                    RecognizesAccessKey="True"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </StackPanel>
                        </Border>
                        <Thumb
                            x:Name="PART_TopHeaderGripper"
                            VerticalAlignment="Top"
                            Style="{StaticResource RowHeaderGripperStyle}" />
                        <Thumb
                            x:Name="PART_BottomHeaderGripper"
                            VerticalAlignment="Bottom"
                            Style="{StaticResource RowHeaderGripperStyle}" />
                    </hc:SimplePanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="DataGridEditingComboBoxColumnStyle" TargetType="ComboBox">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource ComboBoxItemBaseStyle}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="Both" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Padding" Value="{StaticResource DefaultInputPadding}" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,7,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="8,0,0,5" />
        <Setter Property="Template" Value="{StaticResource ComboBoxTemplate}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Validation.ErrorTemplate" Value="{x:Null}" />
        <Style.Triggers>
            <Trigger Property="IsEditable" Value="true">
                <Setter Property="IsTabStop" Value="false" />
                <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="DataGridEditingTextColumnStyle" TargetType="TextBox">
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,7,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="8,0,0,5" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Padding" Value="{StaticResource DefaultInputPadding}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource InputElementErrorTemplate}" />
        <Setter Property="CaretBrush" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <hc:SimplePanel x:Name="root">
                        <Border
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            SnapsToDevicePixels="True" />
                        <ScrollViewer
                            x:Name="PART_ContentHost"
                            Margin="-2,0"
                            Padding="{TemplateBinding Padding}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            Focusable="false"
                            HorizontalScrollBarVisibility="Hidden"
                            VerticalScrollBarVisibility="Hidden" />
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="root" Property="Opacity" Value="0.4" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
                        </Trigger>
                        <Trigger Property="IsFocused" Value="true">
                            <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Validation.HasError" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="DataGridEditingComboBoxColumnStyle.Small"
        TargetType="ComboBox"
        BasedOn="{StaticResource DataGridEditingComboBoxColumnStyle}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource ComboBoxItem.Small}" />
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <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="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Template" Value="{StaticResource ComboBoxTemplate}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Validation.ErrorTemplate" Value="{x:Null}" />
        <Style.Triggers>
            <Trigger Property="IsEditable" Value="true">
                <Setter Property="IsTabStop" Value="false" />
                <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="DataGridEditingTextColumnStyle.Small"
        TargetType="TextBox"
        BasedOn="{StaticResource DataGridEditingTextColumnStyle}">
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource InputElementErrorTemplate}" />
        <Setter Property="CaretBrush" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <hc:SimplePanel x:Name="root">
                        <Border
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            SnapsToDevicePixels="True" />
                        <ScrollViewer
                            x:Name="PART_ContentHost"
                            Margin="-2,0"
                            Padding="{TemplateBinding Padding}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            Focusable="false"
                            HorizontalScrollBarVisibility="Hidden"
                            VerticalScrollBarVisibility="Hidden" />
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="root" Property="Opacity" Value="0.4" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}" />
                        </Trigger>
                        <Trigger Property="IsFocused" Value="true">
                            <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Validation.HasError" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style TargetType="hc:Badge" BasedOn="{StaticResource BadgeBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
    </Style>
    <Style
        x:Key="BadgePrimary"
        TargetType="hc:Badge"
        BasedOn="{StaticResource BadgeBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="BadgeSuccess"
        TargetType="hc:Badge"
        BasedOn="{StaticResource BadgeBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style
        x:Key="BadgeInfo"
        TargetType="hc:Badge"
        BasedOn="{StaticResource BadgeBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="BadgeWarning"
        TargetType="hc:Badge"
        BasedOn="{StaticResource BadgeBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="BadgeDanger"
        TargetType="hc:Badge"
        BasedOn="{StaticResource BadgeBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style x:Key="CalendarWithClockBaseStyle" TargetType="hc:CalendarWithClock">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="hc:TitleElement.Background" Value="{DynamicResource TitleBrush}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Margin" Value="8,0" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:CalendarWithClock">
                    <hc:SimplePanel
                        Margin="0,4,0,8"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center">
                        <Border
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}" />
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Border
                                Grid.ColumnSpan="2"
                                Height="42"
                                Margin="4"
                                VerticalAlignment="Top"
                                Background="{Binding Path=(hc:TitleElement.Background), RelativeSource={RelativeSource TemplatedParent}}"
                                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
                            <ContentPresenter
                                x:Name="PART_CalendarPresenter"
                                Grid.Row="0"
                                Grid.RowSpan="2"
                                Grid.Column="0"
                                Margin="-8,-4,-8,-8" />
                            <ContentPresenter
                                x:Name="PART_ClockPresenter"
                                Grid.Row="0"
                                Grid.RowSpan="2"
                                Grid.Column="1"
                                Margin="-8,-4,-8,-8" />
                            <Button
                                Name="PART_ButtonConfirm"
                                Grid.Row="2"
                                Grid.Column="0"
                                Grid.ColumnSpan="2"
                                Width="180"
                                Margin="0,0,0,19"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Bottom"
                                Content="{ex:Lang Key={x:Static langs:LangKeys.Confirm}}"
                                Style="{StaticResource ButtonPrimary}"
                                Visibility="{TemplateBinding ShowConfirmButton,
                                                             Converter={StaticResource Boolean2VisibilityConverter}}" />
                        </Grid>
                    </hc:SimplePanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:CalendarWithClock" BasedOn="{StaticResource CalendarWithClockBaseStyle}" />
    <Style TargetType="hc:Card" BasedOn="{StaticResource CardBaseStyle}" />
    <Style
        x:Key="CarouselPateButton"
        TargetType="RadioButton"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Margin" Value="5,0" />
        <Setter Property="Width" Value="10" />
        <Setter Property="Height" Value="10" />
        <Setter Property="Background" Value="White" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="5"
                        SnapsToDevicePixels="true" />
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" Value=".9" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Opacity" Value=".6" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:Carousel">
        <Setter Property="PageButtonStyle" Value="{StaticResource CarouselPateButton}" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource CarouselItemBaseStyle}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Carousel">
                    <ControlTemplate.Triggers>
                        <EventTrigger RoutedEvent="FrameworkElement.MouseEnter">
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation
                                        Storyboard.TargetName="GridTop"
                                        Storyboard.TargetProperty="Opacity"
                                        To="1"
                                        Duration="0:0:.1" />
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="FrameworkElement.MouseLeave">
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation
                                        Storyboard.TargetName="GridTop"
                                        Storyboard.TargetProperty="Opacity"
                                        To="0"
                                        Duration="0:0:.1" />
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </ControlTemplate.Triggers>
                    <hc:SimplePanel ClipToBounds="True">
                        <StackPanel x:Name="PART_Panel" Orientation="Horizontal" />
                        <hc:SimplePanel x:Name="GridTop" Opacity="0">
                            <Button
                                Margin="30,0,0,0"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Center"
                                Command="interactivity:ControlCommands.Prev"
                                Style="{StaticResource ButtonCustom}">
                                <Border
                                    Width="50"
                                    Height="100"
                                    Background="{DynamicResource DarkOpacityBrush}"
                                    CornerRadius="4">
                                    <Path
                                        Margin="16"
                                        Fill="White"
                                        Style="{StaticResource LeftPathStyle}" />
                                </Border>
                            </Button>
                            <Button
                                Margin="0,0,30,0"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Center"
                                Command="interactivity:ControlCommands.Next"
                                Style="{StaticResource ButtonCustom}">
                                <Border
                                    Width="50"
                                    Height="100"
                                    Background="{DynamicResource DarkOpacityBrush}"
                                    CornerRadius="4">
                                    <Path
                                        Margin="16"
                                        Fill="White"
                                        Style="{StaticResource RightPathStyle}" />
                                </Border>
                            </Button>
                        </hc:SimplePanel>
                        <StackPanel
                            Name="PART_PanelPage"
                            Margin="0,0,0,20"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Bottom"
                            Orientation="Horizontal" />
                    </hc:SimplePanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:ChatBubble" BasedOn="{StaticResource ChatBubbleBaseStyle}" />
    <Style TargetType="hc:CheckComboBox" BasedOn="{StaticResource CheckComboBoxBaseStyle}" />
    <Style
        x:Key="CheckComboBoxItem.Small"
        TargetType="hc:CheckComboBoxItem"
        BasedOn="{StaticResource CheckComboBoxItemBaseStyle}">
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style
        x:Key="Tag4CheckComboBoxStyle.Small"
        TargetType="hc:Tag"
        BasedOn="{StaticResource Tag4CheckComboBoxStyle}">
        <Setter Property="Padding" Value="6,0,4,0" />
    </Style>
    <Style
        x:Key="CheckComboBox.Small"
        TargetType="hc:CheckComboBox"
        BasedOn="{StaticResource CheckComboBoxBaseStyle}">
        <Setter Property="TagStyle" Value="{StaticResource Tag4CheckComboBoxStyle.Small}" />
        <Setter Property="TagSpacing" Value="2" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource CheckComboBoxItem.Small}" />
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="Padding" Value="6,2" />
    </Style>
    <Style
        x:Key="CheckComboBoxExtend"
        TargetType="hc:CheckComboBox"
        BasedOn="{StaticResource CheckComboBoxExtendBaseStyle}" />
    <Style
        x:Key="CheckComboBoxExtend.Small"
        TargetType="hc:CheckComboBox"
        BasedOn="{StaticResource CheckComboBoxExtend}">
        <Setter Property="TagStyle" Value="{StaticResource Tag4CheckComboBoxStyle.Small}" />
        <Setter Property="TagSpacing" Value="2" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource CheckComboBoxItem.Small}" />
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="Padding" Value="6,2" />
    </Style>
    <Style
        x:Key="CheckComboBoxPlus"
        TargetType="hc:CheckComboBox"
        BasedOn="{StaticResource CheckComboBoxPlusBaseStyle}" />
    <Style
        x:Key="CheckComboBoxPlus.Small"
        TargetType="hc:CheckComboBox"
        BasedOn="{StaticResource CheckComboBoxPlus}">
        <Setter Property="TagStyle" Value="{StaticResource Tag4CheckComboBoxStyle.Small}" />
        <Setter Property="TagSpacing" Value="2" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource CheckComboBoxItem.Small}" />
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="Padding" Value="6,2" />
    </Style>
    <Style x:Key="ClockRadioButtonStyle" TargetType="hc:ClockRadioButton">
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Width" Value="28" />
        <Setter Property="Height" Value="28" />
        <Setter Property="Background" Value="{DynamicResource DangerBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:ClockRadioButton">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="Storyboard1">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="optionMark" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="Storyboard2">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="optionMark" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <hc:SimplePanel
                        x:Name="templateRoot"
                        Background="Transparent"
                        SnapsToDevicePixels="True">
                        <Ellipse
                            x:Name="optionMark"
                            MinWidth="6"
                            MinHeight="6"
                            Fill="{TemplateBinding Background}"
                            Opacity="0" />
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Focusable="False"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </hc:SimplePanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource Storyboard1}" />
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource Storyboard2}" />
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ClockBaseStyle" TargetType="hc:Clock">
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Margin" Value="8,0" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="ClockRadioButtonStyle" Value="{StaticResource ClockRadioButtonStyle}" />
        <Setter Property="hc:TitleElement.Background" Value="{DynamicResource TitleBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Clock">
                    <hc:SimplePanel
                        Margin="0,4,0,8"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center">
                        <Border
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}" />
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="50" />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <Border
                                Name="PART_BorderTitle"
                                Grid.ColumnSpan="3"
                                Margin="4"
                                Background="{Binding Path=(hc:TitleElement.Background), RelativeSource={RelativeSource TemplatedParent}}"
                                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                                <TextBlock
                                    x:Name="PART_TimeStr"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    FontSize="20"
                                    Foreground="{DynamicResource TextIconBrush}" />
                            </Border>
                            <Canvas
                                Name="PART_Canvas"
                                Grid.Row="1"
                                Grid.Column="0"
                                Grid.ColumnSpan="3"
                                Width="178"
                                Height="178"
                                Margin="16,16,16,62"
                                VerticalAlignment="Top">
                                <Border
                                    Width="178"
                                    Height="178"
                                    Background="{DynamicResource SecondaryRegionBrush}"
                                    CornerRadius="89" />
                                <hc:CirclePanel
                                    x:Name="PART_PanelNum"
                                    Margin="24,24,0,0"
                                    Diameter="130"
                                    KeepVertical="True"
                                    OffsetAngle="-60" />
                                <Border
                                    Name="PART_BorderClock"
                                    Canvas.Left="88"
                                    Canvas.Top="26"
                                    Width="2"
                                    Height="63"
                                    Background="{DynamicResource PrimaryBrush}"
                                    Focusable="False"
                                    RenderTransformOrigin="0.5,1" />
                                <Ellipse
                                    Canvas.Left="85"
                                    Canvas.Top="85"
                                    Width="8"
                                    Height="8"
                                    Fill="White"
                                    Stroke="{DynamicResource PrimaryBrush}"
                                    StrokeThickness="2" />
                            </Canvas>
                            <hc:ClockRadioButton
                                x:Name="PART_ButtonAm"
                                Grid.Row="1"
                                Grid.Column="0"
                                Width="30"
                                Height="30"
                                Margin="16,0,0,16"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Bottom"
                                Background="{DynamicResource PrimaryBrush}"
                                Content="{ex:Lang Key={x:Static langs:LangKeys.Am}}"
                                IsChecked="True"
                                Style="{StaticResource ClockRadioButtonStyle}" />
                            <hc:ClockRadioButton
                                x:Name="PART_ButtonPm"
                                Grid.Row="1"
                                Grid.Column="2"
                                Width="30"
                                Height="30"
                                Margin="0,0,16,16"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Bottom"
                                Background="{DynamicResource PrimaryBrush}"
                                Content="{ex:Lang Key={x:Static langs:LangKeys.Pm}}"
                                Style="{StaticResource ClockRadioButtonStyle}" />
                            <Button
                                Name="PART_ButtonConfirm"
                                Grid.Row="1"
                                Grid.Column="1"
                                Width="60"
                                Height="24"
                                Margin="0,0,0,19"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Bottom"
                                Background="Transparent"
                                Content="{ex:Lang Key={x:Static langs:LangKeys.Confirm}}"
                                Foreground="{DynamicResource PrimaryBrush}"
                                Style="{StaticResource ButtonCustom}"
                                Visibility="{TemplateBinding ShowConfirmButton,
                                                             Converter={StaticResource Boolean2VisibilityConverter}}" />
                        </Grid>
                    </hc:SimplePanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:Clock" BasedOn="{StaticResource ClockBaseStyle}" />
    <Style
        x:Key="ClockListBoxItemStyle"
        TargetType="ListBoxItem"
        BasedOn="{StaticResource ListBoxItemBaseStyle}">
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsSelected" Value="true">
                <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Opacity" Value=".4" />
            </Trigger>
            <Trigger Property="hc:EdgeElement.ShowEdgeContent" Value="true">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ListBoxItem">
                            <Border
                                x:Name="Bd"
                                Padding="{TemplateBinding Padding}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                SnapsToDevicePixels="true">
                                <StackPanel Orientation="Horizontal">
                                    <ContentControl
                                        Width="16"
                                        Height="16"
                                        Content="{Binding Path=(hc:EdgeElement.LeftContent), RelativeSource={RelativeSource TemplatedParent}}" />
                                    <ContentPresenter
                                        Margin="6,0,0,0"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                </StackPanel>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="ClockListBoxStyle"
        TargetType="ListBox"
        BasedOn="{StaticResource ListBoxBaseStyle}">
        <Setter Property="MaxHeight" Value="180" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="True" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource ClockListBoxItemStyle}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
    </Style>
    <Style x:Key="ListClockBaseStyle" TargetType="hc:ListClock">
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Margin" Value="8,0" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="hc:TitleElement.Background" Value="{DynamicResource TitleBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:ListClock">
                    <hc:SimplePanel
                        Margin="0,4,0,8"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center">
                        <Border
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}" />
                        <Grid Width="210" Margin="0,4">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <ListBox
                                x:Name="PART_HourList"
                                Padding="0"
                                hc:BorderElement.CornerRadius="0"
                                Style="{StaticResource ClockListBoxStyle}" />
                            <ListBox
                                x:Name="PART_MinuteList"
                                Grid.Row="0"
                                Grid.Column="1"
                                Padding="0"
                                hc:BorderElement.CornerRadius="0"
                                BorderThickness="1,0"
                                Style="{StaticResource ClockListBoxStyle}" />
                            <ListBox
                                x:Name="PART_SecondList"
                                Grid.Row="0"
                                Grid.Column="2"
                                Padding="0"
                                hc:BorderElement.CornerRadius="0"
                                Style="{StaticResource ClockListBoxStyle}" />
                            <Border
                                Grid.Row="0"
                                Grid.Column="0"
                                Grid.ColumnSpan="3"
                                Height="1"
                                VerticalAlignment="Bottom"
                                Background="{DynamicResource BorderBrush}"
                                Visibility="{Binding Visibility, ElementName=PART_ButtonConfirm}" />
                            <Button
                                Name="PART_ButtonConfirm"
                                Grid.Row="1"
                                Grid.Column="0"
                                Grid.ColumnSpan="3"
                                Margin="0,10"
                                HorizontalAlignment="Center"
                                Background="Transparent"
                                Content="{ex:Lang Key={x:Static langs:LangKeys.Confirm}}"
                                Foreground="{DynamicResource PrimaryBrush}"
                                Style="{StaticResource ButtonCustom}"
                                Visibility="{TemplateBinding ShowConfirmButton,
                                                             Converter={StaticResource Boolean2VisibilityConverter}}" />
                        </Grid>
                    </hc:SimplePanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:ListClock" BasedOn="{StaticResource ListClockBaseStyle}" />
    <Style TargetType="hc:ColorPicker" BasedOn="{StaticResource ColorPickerBaseStyle}" />
    <Style TargetType="ContextMenu" BasedOn="{StaticResource ContextMenuBaseStyle}" />
    <Style
        x:Key="ContextMenu.Small"
        TargetType="ContextMenu"
        BasedOn="{StaticResource ContextMenuBaseStyle}">
        <Setter Property="hc:MenuAttach.ItemPadding" Value="6,0" />
        <Setter Property="hc:MenuAttach.PopupVerticalOffset" Value="-3" />
        <Setter Property="hc:MenuAttach.PopupHorizontalOffset" Value="6" />
    </Style>
    <Style TargetType="hc:CoverFlow" BasedOn="{StaticResource CoverFlowBaseStyle}" />
    <Style TargetType="hc:CoverView" BasedOn="{StaticResource CoverViewBaseStyle}" />
    <Style x:Key="DataGridBaseStyle" TargetType="DataGrid">
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="GridLinesVisibility" Value="None" />
        <Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="Both" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="EnableRowVirtualization" Value="True" />
        <Setter Property="CanUserAddRows" Value="False" />
        <Setter Property="CanUserDeleteRows" Value="False" />
        <Setter Property="CanUserReorderColumns" Value="False" />
        <Setter Property="CanUserResizeRows" Value="False" />
        <Setter Property="ColumnHeaderStyle" Value="{StaticResource DataGridColumnHeaderStyle}" />
        <Setter Property="RowHeaderStyle" Value="{StaticResource DataGridRowHeaderStyle}" />
        <Setter Property="RowStyle" Value="{StaticResource DataGridRowStyle}" />
        <Setter Property="CellStyle" Value="{StaticResource DataGridCellStyle}" />
        <Setter Property="Padding" Value="6" />
        <Setter Property="RowHeight" Value="44" />
        <Setter Property="ColumnHeaderHeight" Value="44" />
        <Setter Property="hc:DataGridAttach.TextColumnStyle" Value="{StaticResource DataGridTextColumnStyle}" />
        <Setter Property="hc:DataGridAttach.EditingTextColumnStyle" Value="{StaticResource DataGridEditingTextColumnStyle}" />
        <Setter Property="hc:DataGridAttach.ComboBoxColumnStyle" Value="{StaticResource DataGridComboBoxColumnStyle}" />
        <Setter Property="hc:DataGridAttach.EditingComboBoxColumnStyle" Value="{StaticResource DataGridEditingComboBoxColumnStyle}" />
        <Setter Property="hc:DataGridAttach.CheckBoxColumnStyle" Value="{StaticResource CheckBoxBaseStyle}" />
        <Setter Property="hc:DataGridAttach.EditingCheckBoxColumnStyle" Value="{StaticResource CheckBoxBaseStyle}" />
        <Setter Property="hc:DataGridAttach.ApplyDefaultStyle" Value="True" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DataGrid">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="StoryboardMouseEnter">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value=".8" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value=".8" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardMouseLeave">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Border
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        SnapsToDevicePixels="True">
                        <ScrollViewer x:Name="DG_ScrollViewer" Focusable="false">
                            <ScrollViewer.Template>
                                <ControlTemplate TargetType="ScrollViewer">
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="*" />
                                        </Grid.RowDefinitions>
                                        <Button
                                            Width="{Binding CellsPanelHorizontalOffset, RelativeSource={RelativeSource AncestorType=DataGrid}, Converter={StaticResource DoubleMinConverter}}"
                                            Height="auto"
                                            MaxHeight="30"
                                            hc:IconElement.Geometry="{StaticResource AllGeometry}"
                                            Command="{x:Static DataGrid.SelectAllCommand}"
                                            Foreground="{DynamicResource PrimaryBrush}"
                                            Style="{StaticResource ButtonIcon}">
                                            <Button.Visibility>
                                                <MultiBinding Converter="{StaticResource DataGridSelectAllButtonVisibilityConverter}">
                                                    <Binding Path="HeadersVisibility" RelativeSource="{RelativeSource AncestorType=DataGrid}" />
                                                    <Binding Path="(hc:DataGridAttach.ShowSelectAllButton)" RelativeSource="{RelativeSource AncestorType=DataGrid}" />
                                                </MultiBinding>
                                            </Button.Visibility>
                                        </Button>
                                        <DataGridColumnHeadersPresenter
                                            x:Name="PART_ColumnHeadersPresenter"
                                            Grid.Row="0"
                                            Grid.Column="1"
                                            Grid.ColumnSpan="2"
                                            Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Column}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType=DataGrid}}" />
                                        <ScrollContentPresenter
                                            x:Name="PART_ScrollContentPresenter"
                                            Grid.Row="1"
                                            Grid.Column="0"
                                            Grid.ColumnSpan="3"
                                            HorizontalAlignment="Stretch"
                                            VerticalAlignment="Stretch"
                                            CanContentScroll="{TemplateBinding CanContentScroll}" />
                                        <hc:ToggleBlock
                                            Grid.Row="1"
                                            Grid.Column="0"
                                            Grid.ColumnSpan="3"
                                            HorizontalContentAlignment="Stretch"
                                            VerticalContentAlignment="Stretch"
                                            IsChecked="{Binding HasItems, RelativeSource={RelativeSource AncestorType=DataGrid}, Mode=OneWay}">
                                            <hc:ToggleBlock.UnCheckedContent>
                                                <hc:Empty
                                                    Background="{DynamicResource RegionBrush}"
                                                    BorderBrush="{TemplateBinding BorderBrush}"
                                                    BorderThickness="{TemplateBinding BorderThickness}" />
                                            </hc:ToggleBlock.UnCheckedContent>
                                        </hc:ToggleBlock>
                                        <ScrollBar
                                            x:Name="PART_VerticalScrollBar"
                                            Grid.Row="1"
                                            Grid.Column="2"
                                            Maximum="{TemplateBinding ScrollableHeight}"
                                            Opacity="0"
                                            Orientation="Vertical"
                                            Style="{StaticResource ScrollBarBaseStyle}"
                                            ViewportSize="{TemplateBinding ViewportHeight}"
                                            Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                            Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
                                        <ScrollBar
                                            x:Name="PART_HorizontalScrollBar"
                                            Grid.Row="1"
                                            Grid.Column="1"
                                            VerticalAlignment="Bottom"
                                            Maximum="{TemplateBinding ScrollableWidth}"
                                            Opacity="0"
                                            Orientation="Horizontal"
                                            Style="{StaticResource ScrollBarBaseStyle}"
                                            ViewportSize="{TemplateBinding ViewportWidth}"
                                            Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                            Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
                                    </Grid>
                                    <ControlTemplate.Triggers>
                                        <EventTrigger RoutedEvent="MouseEnter">
                                            <BeginStoryboard Storyboard="{StaticResource StoryboardMouseEnter}" />
                                        </EventTrigger>
                                        <EventTrigger RoutedEvent="MouseLeave">
                                            <BeginStoryboard Storyboard="{StaticResource StoryboardMouseLeave}" />
                                        </EventTrigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </ScrollViewer.Template>
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
        </Style.Triggers>
    </Style>
    <Style TargetType="DataGrid" BasedOn="{StaticResource DataGridBaseStyle}" />
    <Style
        x:Key="DataGridCellStyle.Small"
        TargetType="DataGridCell"
        BasedOn="{StaticResource DataGridCellStyle}">
        <Setter Property="Padding" Value="6,0" />
    </Style>
    <Style
        x:Key="DataGridRowStyle.Small"
        TargetType="DataGridRow"
        BasedOn="{StaticResource DataGridRowStyle}">
        <Setter Property="Margin" Value="0,0,0,2" />
    </Style>
    <Style
        x:Key="DataGridColumnHeaderStyle.Small"
        TargetType="DataGridColumnHeader"
        BasedOn="{StaticResource DataGridColumnHeaderStyle}">
        <Setter Property="Padding" Value="8,0" />
    </Style>
    <Style
        x:Key="DataGrid.Small"
        TargetType="DataGrid"
        BasedOn="{StaticResource DataGridBaseStyle}">
        <Setter Property="CellStyle" Value="{StaticResource DataGridCellStyle.Small}" />
        <Setter Property="RowStyle" Value="{StaticResource DataGridRowStyle.Small}" />
        <Setter Property="ColumnHeaderStyle" Value="{StaticResource DataGridColumnHeaderStyle.Small}" />
        <Setter Property="RowHeight" Value="24" />
        <Setter Property="ColumnHeaderHeight" Value="20" />
        <Setter Property="hc:DataGridAttach.EditingTextColumnStyle" Value="{StaticResource DataGridEditingTextColumnStyle.Small}" />
        <Setter Property="hc:DataGridAttach.EditingComboBoxColumnStyle" Value="{StaticResource DataGridEditingComboBoxColumnStyle.Small}" />
    </Style>
    <Style TargetType="DatePicker" BasedOn="{StaticResource DatePickerBaseStyle}" />
    <Style
        x:Key="DatePicker.Small"
        TargetType="DatePicker"
        BasedOn="{StaticResource DatePickerBaseStyle}">
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="Padding" Value="6,0" />
    </Style>
    <Style
        x:Key="DatePickerExtend"
        TargetType="DatePicker"
        BasedOn="{StaticResource DatePickerExtendBaseStyle}" />
    <Style
        x:Key="DatePickerExtend.Small"
        TargetType="DatePicker"
        BasedOn="{StaticResource DatePickerExtend}">
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style TargetType="hc:DatePicker" BasedOn="{StaticResource DatePickerPlusBaseStyle}" />
    <Style
        x:Key="DatePickerPlus.Small"
        TargetType="hc:DatePicker"
        BasedOn="{StaticResource DatePickerPlusBaseStyle}">
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style TargetType="hc:DateTimePicker" BasedOn="{StaticResource DateTimePickerBaseStyle}" />
    <Style
        x:Key="DateTimePicker.Small"
        TargetType="hc:DateTimePicker"
        BasedOn="{StaticResource DateTimePickerBaseStyle}">
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="Padding" Value="6,0" />
    </Style>
    <Style
        x:Key="DateTimePickerExtend"
        TargetType="hc:DateTimePicker"
        BasedOn="{StaticResource DateTimePickerExtendBaseStyle}" />
    <Style
        x:Key="DateTimePickerExtend.Small"
        TargetType="hc:DateTimePicker"
        BasedOn="{StaticResource DateTimePickerExtend}">
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style
        x:Key="DateTimePickerPlus"
        TargetType="hc:DateTimePicker"
        BasedOn="{StaticResource DateTimePickerPlusBaseStyle}" />
    <Style
        x:Key="DateTimePickerPlus.Small"
        TargetType="hc:DateTimePicker"
        BasedOn="{StaticResource DateTimePickerPlus}">
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style TargetType="hc:Dialog" BasedOn="{StaticResource DialogBaseStyle}" />
    <Style TargetType="hc:Divider" BasedOn="{StaticResource DividerBaseStyle}" />
    <Style TargetType="hc:Drawer" BasedOn="{StaticResource DrawerBaseStyle}" />
    <Style TargetType="hc:ElementGroup" BasedOn="{StaticResource ElementGroupBaseStyle}" />
    <Style
        x:Key="ElementGroupSolid"
        TargetType="hc:ElementGroup"
        BasedOn="{StaticResource ElementGroupBaseStyle}">
        <Setter Property="hc:VisualElement.HighlightBorderBrush" Value="{DynamicResource TitleBrush}" />
        <Setter Property="hc:VisualElement.HighlightBackground" Value="{DynamicResource TitleBrush}" />
        <Setter Property="hc:VisualElement.HighlightForeground" Value="{DynamicResource TextIconBrush}" />
    </Style>
    <Style TargetType="hc:Empty" BasedOn="{StaticResource EmptyBaseStyle}" />
    <Style TargetType="Expander" BasedOn="{StaticResource ExpanderBaseStyle}" />
    <Style
        x:Key="Expander.Small"
        TargetType="Expander"
        BasedOn="{StaticResource ExpanderBaseStyle}">
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="MinWidth" Value="20" />
    </Style>
    <Style TargetType="FlowDocumentScrollViewer" BasedOn="{StaticResource FlowDocumentScrollViewerBaseStyle}" />
    <Style TargetType="FlowDocumentPageViewer" BasedOn="{StaticResource FlowDocumentPageViewerBaseStyle}" />
    <Style TargetType="FlowDocumentReader" BasedOn="{StaticResource FlowDocumentReaderBaseStyle}" />
    <Style TargetType="Frame" BasedOn="{StaticResource FrameBaseStyle}" />
    <Style TargetType="hc:GotoTop" BasedOn="{StaticResource GotoTopBaseStyle}" />
    <Style TargetType="hc:Gravatar" BasedOn="{StaticResource GravatarBaseStyle}" />
    <Style
        x:Key="GravatarCircle"
        TargetType="hc:Gravatar"
        BasedOn="{StaticResource GravatarBaseStyle}">
        <Setter Property="Padding" Value="16" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Gravatar">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Style="{StaticResource BorderCircularClip}">
                        <ContentPresenter Margin="{TemplateBinding Padding}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="GravatarCircleImg"
        TargetType="hc:Gravatar"
        BasedOn="{StaticResource GravatarCircle}">
        <Setter Property="Padding" Value="0" />
    </Style>
    <Style TargetType="hc:Growl">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="MinHeight" Value="60" />
        <Setter Property="Width" Value="320" />
        <Setter Property="Margin" Value="10,10,10,0" />
        <Setter Property="MaxWidth" Value="320" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="8" />
        <Setter Property="Background" Value="{DynamicResource ThirdlyRegionBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Growl">
                    <Grid Name="PART_GridMain" RenderTransformOrigin="0.5,0.5">
                        <Grid.RenderTransform>
                            <TransformGroup>
                                <TranslateTransform X="{TemplateBinding MaxWidth}" />
                            </TransformGroup>
                        </Grid.RenderTransform>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="50" />
                            <ColumnDefinition />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Border
                            Grid.RowSpan="2"
                            Grid.ColumnSpan="3"
                            Background="{TemplateBinding Background}"
                            CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                            Effect="{StaticResource EffectShadow2}" />
                        <Path
                            Grid.Row="0"
                            Grid.Column="0"
                            Width="30"
                            Height="30"
                            Margin="0,15,0,0"
                            VerticalAlignment="Top"
                            Data="{TemplateBinding Icon}"
                            Fill="{TemplateBinding IconBrush}"
                            FlowDirection="LeftToRight"
                            Stretch="Uniform" />
                        <StackPanel
                            Grid.Row="0"
                            Grid.Column="1"
                            Margin="0,10,10,10"
                            VerticalAlignment="Center">
                            <TextBlock
                                HorizontalAlignment="Left"
                                Style="{StaticResource TextBlockDefault}"
                                Text="{TemplateBinding Message}"
                                TextWrapping="Wrap" />
                            <TextBlock
                                Margin="0,4,0,0"
                                HorizontalAlignment="Left"
                                Foreground="{DynamicResource SecondaryTextBrush}"
                                Style="{StaticResource TextBlockDefault}"
                                Text="{Binding Time, RelativeSource={RelativeSource AncestorType=hc:Growl}, StringFormat=yyyy/MM/dd HH:mm:ss}"
                                Visibility="{Binding ShowDateTime, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                        </StackPanel>
                        <Button
                            Name="PART_ButtonClose"
                            Grid.Row="0"
                            Grid.Column="2"
                            Width="18"
                            Height="18"
                            Margin="11,0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Background="Transparent"
                            Command="interactivity:ControlCommands.Close"
                            Style="{StaticResource ButtonCustom}"
                            Visibility="Collapsed">
                            <Path
                                Data="{StaticResource ErrorGeometry}"
                                Fill="{DynamicResource SecondaryTextBrush}"
                                FlowDirection="LeftToRight"
                                Stretch="Uniform" />
                        </Button>
                        <UniformGrid
                            Name="PART_PanelMore"
                            Grid.Row="1"
                            Grid.Column="0"
                            Grid.ColumnSpan="3"
                            Height="28"
                            Columns="2"
                            IsEnabled="False"
                            Visibility="Collapsed">
                            <Button
                                HorizontalAlignment="Stretch"
                                Background="Transparent"
                                Command="interactivity:ControlCommands.Cancel"
                                Style="{StaticResource ButtonCustom}">
                                <TextBlock
                                    HorizontalAlignment="Center"
                                    Foreground="{DynamicResource DangerBrush}"
                                    Text="{Binding CancelStr, RelativeSource={RelativeSource TemplatedParent}}" />
                            </Button>
                            <Button
                                HorizontalAlignment="Stretch"
                                Background="Transparent"
                                Command="interactivity:ControlCommands.Confirm"
                                Style="{StaticResource ButtonCustom}">
                                <TextBlock
                                    HorizontalAlignment="Center"
                                    Foreground="{DynamicResource PrimaryBrush}"
                                    Text="{Binding ConfirmStr, RelativeSource={RelativeSource TemplatedParent}}" />
                            </Button>
                        </UniformGrid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:ImageSelector" BasedOn="{StaticResource ImageSelectorBaseStyle}" />
    <Style TargetType="hc:ImageViewer">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:ImageViewer">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <hc:SimplePanel
                                x:Name="PART_PanelMain"
                                Grid.RowSpan="2"
                                ClipToBounds="True">
                                <Border
                                    Width="{TemplateBinding ImageWidth}"
                                    Height="{TemplateBinding ImageHeight}"
                                    Margin="{TemplateBinding ImageMargin}"
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Top">
                                    <Image
                                        Name="PART_ImageMain"
                                        RenderOptions.BitmapScalingMode="NearestNeighbor"
                                        RenderTransformOrigin="0.5,0.5"
                                        Source="{TemplateBinding ImageSource}" />
                                </Border>
                            </hc:SimplePanel>
                            <Border
                                Grid.Row="0"
                                Grid.RowSpan="2"
                                Width="252"
                                Height="162"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Bottom"
                                Background="{DynamicResource DarkOpacityBrush}"
                                BorderBrush="{DynamicResource BorderBrush}"
                                BorderThickness="1">
                                <Border.Visibility>
                                    <MultiBinding Converter="{StaticResource BooleanArr2VisibilityConverter}">
                                        <Binding Path="ShowSmallImgInternal" RelativeSource="{RelativeSource TemplatedParent}" />
                                        <Binding Path="ShowImgMap" RelativeSource="{RelativeSource TemplatedParent}" />
                                    </MultiBinding>
                                </Border.Visibility>
                                <Canvas
                                    Name="PART_CanvasSmallImg"
                                    MaxWidth="250"
                                    MaxHeight="160"
                                    ClipToBounds="True">
                                    <Border
                                        Name="PART_BorderMove"
                                        Width="50"
                                        Height="70"
                                        Background="Transparent"
                                        BorderBrush="Black"
                                        BorderThickness="1"
                                        UseLayoutRounding="True">
                                        <Border BorderBrush="White" BorderThickness="1" />
                                    </Border>
                                </Canvas>
                            </Border>
                            <Border
                                Name="PART_BorderBottom"
                                Grid.Row="1"
                                HorizontalAlignment="Center"
                                Background="{DynamicResource DarkOpacityBrush}"
                                CornerRadius="4,4,0,0"
                                Opacity="0"
                                UseLayoutRounding="True"
                                Visibility="{TemplateBinding ShowToolBar,
                                                             Converter={StaticResource Boolean2VisibilityConverter}}">
                                <StackPanel
                                    Margin="30,10"
                                    VerticalAlignment="Center"
                                    Orientation="Horizontal">
                                    <Button
                                        Margin="6,0"
                                        Padding="3"
                                        hc:IconElement.Geometry="{StaticResource SaveGeometry}"
                                        Command="interactivity:ControlCommands.Save"
                                        Foreground="{DynamicResource TextIconBrush}"
                                        Style="{StaticResource ButtonIcon}" />
                                    <Button
                                        Margin="6,0"
                                        Padding="3"
                                        hc:IconElement.Geometry="{StaticResource WindowsGeometry}"
                                        Command="interactivity:ControlCommands.Open"
                                        Foreground="{DynamicResource TextIconBrush}"
                                        Style="{StaticResource ButtonIcon}" />
                                    <Border
                                        Margin="10,2"
                                        Background="White"
                                        Style="{StaticResource BorderVerticallySplitter}" />
                                    <Button
                                        Margin="6,0"
                                        Padding="3"
                                        hc:IconElement.Geometry="{StaticResource ReduceGeometry}"
                                        Command="interactivity:ControlCommands.Reduce"
                                        Foreground="{DynamicResource TextIconBrush}"
                                        Style="{StaticResource ButtonIcon}" />
                                    <TextBlock
                                        Margin="6,0"
                                        Foreground="{DynamicResource TextIconBrush}"
                                        Style="{StaticResource TextBlockSubTitle}"
                                        Text="{TemplateBinding ScaleStr}" />
                                    <Button
                                        Margin="6,0"
                                        Padding="3"
                                        hc:IconElement.Geometry="{StaticResource EnlargeGeometry}"
                                        Command="interactivity:ControlCommands.Enlarge"
                                        Foreground="{DynamicResource TextIconBrush}"
                                        Style="{StaticResource ButtonIcon}" />
                                    <Button
                                        Margin="6,0"
                                        Background="Transparent"
                                        Command="interactivity:ControlCommands.Restore"
                                        Foreground="{DynamicResource TextIconBrush}"
                                        Style="{StaticResource ButtonCustom}">
                                        <Border
                                            Padding="2"
                                            BorderBrush="White"
                                            BorderThickness="1">
                                            <TextBlock Text="1:1" />
                                        </Border>
                                    </Button>
                                    <Border
                                        Margin="10,2"
                                        Background="White"
                                        Style="{StaticResource BorderVerticallySplitter}" />
                                    <Button
                                        Margin="6,0"
                                        Padding="3"
                                        hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}"
                                        Command="interactivity:ControlCommands.RotateLeft"
                                        CommandParameter=""
                                        Foreground="{DynamicResource TextIconBrush}"
                                        Style="{StaticResource ButtonIcon}" />
                                    <Button
                                        Margin="6,0,0,0"
                                        Padding="3"
                                        hc:IconElement.Geometry="{StaticResource RotateRightGeometry}"
                                        Command="interactivity:ControlCommands.RotateRight"
                                        Foreground="{DynamicResource TextIconBrush}"
                                        Style="{StaticResource ButtonIcon}" />
                                    <ToggleButton
                                        Margin="12,0,6,0"
                                        Padding="3"
                                        hc:IconSwitchElement.Geometry="{StaticResource FullScreenGeometry}"
                                        hc:IconSwitchElement.GeometrySelected="{StaticResource FullScreenReturnGeometry}"
                                        Foreground="{DynamicResource TextIconBrush}"
                                        IsChecked="{Binding IsFullScreen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                        Style="{StaticResource ToggleButtonIconTransparent}"
                                        Visibility="{TemplateBinding ShowFullScreenButton,
                                                                     Converter={StaticResource Boolean2VisibilityConverter}}" />
                                </StackPanel>
                            </Border>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxBaseStyle}" />
    <Style
        x:Key="ListBoxItemBaseStyle.Small"
        TargetType="ListBoxItem"
        BasedOn="{StaticResource ListBoxItemBaseStyle}">
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="24" />
    </Style>
    <Style
        x:Key="ListBox.Small"
        TargetType="ListBox"
        BasedOn="{StaticResource ListBoxBaseStyle}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemBaseStyle.Small}" />
    </Style>
    <Style
        x:Key="ListBoxCustom"
        TargetType="ListBox"
        BasedOn="{StaticResource ListBoxBaseStyle}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemCustom}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    </Style>
    <Style
        x:Key="WrapPanelHorizontalListBox"
        TargetType="ListBox"
        BasedOn="{StaticResource ListBoxCustom}">
        <Setter Property="ItemsPanel" Value="{StaticResource WrapHorizontalItemsPanelTemplate}" />
    </Style>
    <Style
        x:Key="WrapPanelVerticalListBox"
        TargetType="ListBox"
        BasedOn="{StaticResource ListBoxCustom}">
        <Setter Property="ItemsPanel" Value="{StaticResource WrapVerticalItemsPanelTemplate}" />
    </Style>
    <Style
        x:Key="StackPanelHorizontalListBox"
        TargetType="ListBox"
        BasedOn="{StaticResource ListBoxCustom}">
        <Setter Property="ItemsPanel" Value="{StaticResource StackHorizontalItemsPanelTemplate}" />
    </Style>
    <Style
        x:Key="StackPanelVerticalListBox"
        TargetType="ListBox"
        BasedOn="{StaticResource ListBoxCustom}">
        <Setter Property="ItemsPanel" Value="{StaticResource StackVerticalItemsPanelTemplate}" />
    </Style>
    <Style x:Key="ListViewBaseStyle" TargetType="ListView">
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="6" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <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="ItemContainerStyle" Value="{StaticResource ListViewItemBaseStyle}" />
        <Setter Property="hc:GridViewAttach.ColumnHeaderHeight" Value="44" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListView">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="Storyboard1">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value=".8" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value=".8" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="Storyboard2">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity">
                                <EasingDoubleKeyFrame KeyTime="0:0:.2" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Border
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        SnapsToDevicePixels="True">
                        <ScrollViewer Focusable="false">
                            <ScrollViewer.Template>
                                <ControlTemplate TargetType="ScrollViewer">
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="*" />
                                            <RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <DockPanel Grid.ColumnSpan="2">
                                            <ScrollViewer
                                                DockPanel.Dock="Top"
                                                Focusable="false"
                                                HorizontalScrollBarVisibility="Hidden"
                                                VerticalScrollBarVisibility="Hidden">
                                                <GridViewHeaderRowPresenter
                                                    Margin="2,0"
                                                    AllowsColumnReorder="{Binding View.AllowsColumnReorder, RelativeSource={RelativeSource AncestorType=ListView}}"
                                                    ColumnHeaderContainerStyle="{Binding View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource AncestorType=ListView}}"
                                                    ColumnHeaderContextMenu="{Binding View.ColumnHeaderContextMenu, RelativeSource={RelativeSource AncestorType=ListView}}"
                                                    ColumnHeaderTemplate="{Binding View.ColumnHeaderTemplate, RelativeSource={RelativeSource AncestorType=ListView}}"
                                                    ColumnHeaderTemplateSelector="{Binding View.ColumnHeaderTemplateSelector, RelativeSource={RelativeSource AncestorType=ListView}}"
                                                    ColumnHeaderToolTip="{Binding View.ColumnHeaderToolTip, RelativeSource={RelativeSource AncestorType=ListView}}"
                                                    Columns="{Binding View.Columns, RelativeSource={RelativeSource AncestorType=ListView}}"
                                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                            </ScrollViewer>
                                        </DockPanel>
                                        <hc:ToggleBlock
                                            Grid.Row="1"
                                            Grid.RowSpan="2"
                                            Grid.ColumnSpan="2"
                                            HorizontalContentAlignment="Stretch"
                                            VerticalContentAlignment="Stretch"
                                            IsChecked="{Binding HasItems, RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}">
                                            <hc:ToggleBlock.CheckedContent>
                                                <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" />
                                            </hc:ToggleBlock.CheckedContent>
                                            <hc:ToggleBlock.UnCheckedContent>
                                                <hc:Empty
                                                    Background="{DynamicResource RegionBrush}"
                                                    BorderBrush="{TemplateBinding BorderBrush}"
                                                    BorderThickness="{TemplateBinding BorderThickness}" />
                                            </hc:ToggleBlock.UnCheckedContent>
                                        </hc:ToggleBlock>
                                        <ScrollBar
                                            x:Name="PART_VerticalScrollBar"
                                            Grid.Row="1"
                                            Grid.Column="1"
                                            Maximum="{TemplateBinding ScrollableHeight}"
                                            Opacity="0"
                                            Orientation="Vertical"
                                            Style="{StaticResource ScrollBarBaseStyle}"
                                            ViewportSize="{TemplateBinding ViewportHeight}"
                                            Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                            Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
                                        <ScrollBar
                                            x:Name="PART_HorizontalScrollBar"
                                            Grid.Row="1"
                                            VerticalAlignment="Bottom"
                                            Maximum="{TemplateBinding ScrollableWidth}"
                                            Opacity="0"
                                            Orientation="Horizontal"
                                            Style="{StaticResource ScrollBarBaseStyle}"
                                            ViewportSize="{TemplateBinding ViewportWidth}"
                                            Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                            Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
                                    </Grid>
                                    <ControlTemplate.Triggers>
                                        <EventTrigger RoutedEvent="MouseEnter">
                                            <BeginStoryboard Storyboard="{StaticResource Storyboard1}" />
                                        </EventTrigger>
                                        <EventTrigger RoutedEvent="MouseLeave">
                                            <BeginStoryboard Storyboard="{StaticResource Storyboard2}" />
                                        </EventTrigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </ScrollViewer.Template>
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <Trigger Property="View" Value="{x:Null}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ListView">
                            <Border
                                Padding="{TemplateBinding Padding}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                                SnapsToDevicePixels="True">
                                <hc:Empty
                                    Background="{DynamicResource RegionBrush}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}" />
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style TargetType="ListView" BasedOn="{StaticResource ListViewBaseStyle}" />
    <Style
        x:Key="ListViewItemBaseStyle.Small"
        TargetType="ListViewItem"
        BasedOn="{StaticResource ListViewItemBaseStyle}">
        <Setter Property="Padding" Value="6,2" />
        <Setter Property="MinHeight" Value="24" />
        <Setter Property="Margin" Value="0,0,0,2" />
    </Style>
    <Style
        x:Key="ListView.Small"
        TargetType="ListView"
        BasedOn="{StaticResource ListViewBaseStyle}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource ListViewItemBaseStyle.Small}" />
        <Setter Property="hc:GridViewAttach.ColumnHeaderHeight" Value="30" />
    </Style>
    <Style TargetType="hc:LoadingLine" BasedOn="{StaticResource LoadingLineBaseStyle}" />
    <Style
        x:Key="LoadingLineLight"
        TargetType="hc:LoadingLine"
        BasedOn="{StaticResource LoadingLineBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
    </Style>
    <Style
        x:Key="LoadingLineLarge"
        TargetType="hc:LoadingLine"
        BasedOn="{StaticResource LoadingLineBaseStyle}">
        <Setter Property="DotDiameter" Value="10" />
    </Style>
    <Style
        x:Key="LoadingLineLargeLight"
        TargetType="hc:LoadingLine"
        BasedOn="{StaticResource LoadingLineLarge}">
        <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
    </Style>
    <Style TargetType="hc:LoadingCircle" BasedOn="{StaticResource LoadingCircleBaseStyle}" />
    <Style
        x:Key="LoadingCircleLight"
        TargetType="hc:LoadingCircle"
        BasedOn="{StaticResource LoadingCircleBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
    </Style>
    <Style
        x:Key="LoadingCircleLarge"
        TargetType="hc:LoadingCircle"
        BasedOn="{StaticResource LoadingCircleBaseStyle}">
        <Setter Property="Width" Value="100" />
        <Setter Property="Height" Value="100" />
        <Setter Property="DotDiameter" Value="10" />
        <Setter Property="DotInterval" Value="20" />
        <Setter Property="DotOffSet" Value="40" />
        <Setter Property="DotDelayTime" Value="120" />
    </Style>
    <Style
        x:Key="LoadingCircleLargeLight"
        TargetType="hc:LoadingCircle"
        BasedOn="{StaticResource LoadingCircleLarge}">
        <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
    </Style>
    <Style TargetType="hc:Magnifier" BasedOn="{StaticResource MagnifierBaseStyle}" />
    <Style
        x:Key="MessageBoxButtonStyle"
        TargetType="Button"
        BasedOn="{StaticResource ButtonDefault}">
        <Setter Property="MinWidth" Value="88" />
        <Setter Property="Visibility" Value="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource Boolean2VisibilityConverter}}" />
        <Setter Property="Margin" Value="5,0" />
    </Style>
    <Style
        x:Key="MessageBoxPrimaryButtonStyle"
        TargetType="Button"
        BasedOn="{StaticResource ButtonPrimary}">
        <Setter Property="MinWidth" Value="88" />
        <Setter Property="Visibility" Value="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource Boolean2VisibilityConverter}}" />
        <Setter Property="Margin" Value="5,0" />
    </Style>
    <Style TargetType="hc:MessageBox" BasedOn="{StaticResource WindowWin10}">
        <Setter Property="MinHeight" Value="172" />
        <Setter Property="ShowInTaskbar" Value="False" />
        <Setter Property="MinWidth" Value="335" />
        <Setter Property="MaxWidth" Value="476" />
        <Setter Property="MaxHeight" Value="680" />
        <Setter Property="ResizeMode" Value="NoResize" />
        <Setter Property="SizeToContent" Value="WidthAndHeight" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:MessageBox">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        SnapsToDevicePixels="True">
                        <Grid Margin="{TemplateBinding Padding}">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <Grid
                                Name="PART_NonClientArea"
                                Background="{TemplateBinding NonClientAreaBackground}"
                                TextElement.Foreground="{TemplateBinding NonClientAreaForeground}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <StackPanel
                                    Grid.Column="1"
                                    HorizontalAlignment="Right"
                                    VerticalAlignment="Top"
                                    Orientation="Horizontal"
                                    UseLayoutRounding="True"
                                    WindowChrome.IsHitTestVisibleInChrome="True">
                                    <Button
                                        Name="PART_ButtonClose"
                                        Width="46"
                                        Height="29"
                                        hc:IconElement.Geometry="{StaticResource CloseGeometry}"
                                        hc:IconElement.Height="10"
                                        hc:IconElement.Width="10"
                                        Background="{TemplateBinding CloseButtonBackground}"
                                        BorderThickness="1,0,0,0"
                                        Foreground="{TemplateBinding CloseButtonForeground}"
                                        IsTabStop="False"
                                        Style="{StaticResource ButtonIcon}" />
                                </StackPanel>
                                <Grid Grid.Column="0">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition />
                                    </Grid.ColumnDefinitions>
                                    <Button
                                        Name="ButtonIcon"
                                        Margin="10,0,0,0"
                                        VerticalAlignment="Center"
                                        Background="Transparent"
                                        Command="{x:Static SystemCommands.ShowSystemMenuCommand}"
                                        Style="{StaticResource ButtonCustom}"
                                        Visibility="{TemplateBinding Icon,
                                                                     Converter={StaticResource Object2VisibilityConverter}}"
                                        WindowChrome.IsHitTestVisibleInChrome="True">
                                        <interactivity:Interaction.Triggers>
                                            <interactivity:EventTrigger EventName="MouseDoubleClick">
                                                <interactivity:InvokeCommandAction Command="{x:Static SystemCommands.CloseWindowCommand}" />
                                            </interactivity:EventTrigger>
                                        </interactivity:Interaction.Triggers>
                                        <Image
                                            Width="16"
                                            Height="16"
                                            VerticalAlignment="Center"
                                            IsHitTestVisible="False"
                                            Source="{TemplateBinding Icon}" />
                                    </Button>
                                    <TextBlock
                                        Grid.Column="1"
                                        Padding="10,0,0,0"
                                        VerticalAlignment="Center"
                                        Text="{TemplateBinding Title}">
                                        <TextBlock.Visibility>
                                            <MultiBinding Converter="{StaticResource BooleanArr2VisibilityConverter}">
                                                <MultiBinding.Bindings>
                                                    <Binding Path="ShowTitle" RelativeSource="{RelativeSource TemplatedParent}" />
                                                    <Binding
                                                        Converter="{StaticResource Object2BooleanConverter}"
                                                        Path="Title"
                                                        RelativeSource="{RelativeSource TemplatedParent}" />
                                                </MultiBinding.Bindings>
                                            </MultiBinding>
                                        </TextBlock.Visibility>
                                    </TextBlock>
                                    <ContentPresenter
                                        x:Name="ContentPresenterMain"
                                        Grid.Column="2"
                                        Content="{TemplateBinding NonClientAreaContent}"
                                        WindowChrome.IsHitTestVisibleInChrome="True" />
                                </Grid>
                            </Grid>
                            <AdornerDecorator Grid.Row="1">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Path
                                        Grid.Row="0"
                                        Grid.Column="0"
                                        Width="30"
                                        Height="30"
                                        Margin="20,32,0,0"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Top"
                                        Data="{TemplateBinding Image}"
                                        Fill="{TemplateBinding ImageBrush}"
                                        Stretch="Uniform"
                                        Visibility="{TemplateBinding ShowImage,
                                                                     Converter={StaticResource Boolean2VisibilityConverter}}" />
                                    <ScrollViewer
                                        Grid.Row="0"
                                        Grid.Column="1"
                                        VerticalAlignment="Top">
                                        <Border
                                            MinHeight="30"
                                            Margin="10,32,10,10"
                                            HorizontalAlignment="Left">
                                            <TextBlock
                                                VerticalAlignment="Center"
                                                Text="{TemplateBinding Message}"
                                                TextWrapping="Wrap" />
                                        </Border>
                                    </ScrollViewer>
                                    <StackPanel
                                        Name="PART_Panel"
                                        Grid.Row="1"
                                        Grid.Column="0"
                                        Grid.ColumnSpan="2"
                                        Margin="0,10,0,16"
                                        HorizontalAlignment="Center"
                                        Orientation="Horizontal" />
                                </Grid>
                            </AdornerDecorator>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsActive" Value="False">
                            <Setter TargetName="ContentPresenterMain" Property="Opacity" Value=".8" />
                        </Trigger>
                        <Trigger SourceName="PART_ButtonClose" Property="IsMouseOver" Value="True">
                            <Setter TargetName="PART_ButtonClose" Property="Background" Value="{Binding CloseButtonHoverBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                            <Setter TargetName="PART_ButtonClose" Property="Foreground" Value="{Binding CloseButtonHoverForeground, RelativeSource={RelativeSource TemplatedParent}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="NavigationWindow" BasedOn="{StaticResource NavigationWindowBaseStyle}" />
    <Style TargetType="hc:NumericUpDown" BasedOn="{StaticResource NumericUpDownBaseStyle}" />
    <Style
        x:Key="NumericUpDown.Small"
        TargetType="hc:NumericUpDown"
        BasedOn="{StaticResource NumericUpDownBaseStyle}">
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="Padding" Value="6,0" />
    </Style>
    <Style
        x:Key="NumericUpDownExtend"
        TargetType="hc:NumericUpDown"
        BasedOn="{StaticResource NumericUpDownExtendBaseStyle}" />
    <Style
        x:Key="NumericUpDownExtend.Small"
        TargetType="hc:NumericUpDown"
        BasedOn="{StaticResource NumericUpDownExtend}">
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style
        x:Key="NumericUpDownPlus"
        TargetType="hc:NumericUpDown"
        BasedOn="{StaticResource NumericUpDownPlusBaseStyle}" />
    <Style
        x:Key="NumericUpDownPlus.Small"
        TargetType="hc:NumericUpDown"
        BasedOn="{StaticResource NumericUpDownPlus}">
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style
        x:Key="PaginationButtonStyle"
        TargetType="RadioButton"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="GroupName" Value="1" />
        <Setter Property="MinWidth" Value="30" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
        <Setter Property="Height" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Padding" Value="10,0" />
        <Setter Property="Margin" Value="-1,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <Border
                        x:Name="BorderRoot"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <StackPanel
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Orientation="Horizontal">
                            <Path
                                x:Name="PathMain"
                                Width="{TemplateBinding hc:IconElement.Width}"
                                Height="{TemplateBinding hc:IconElement.Height}"
                                Data="{TemplateBinding hc:IconElement.Geometry}"
                                Fill="{TemplateBinding Foreground}"
                                SnapsToDevicePixels="True"
                                Stretch="Uniform" />
                            <ContentPresenter
                                x:Name="contentPresenter"
                                Margin="6,0,0,0"
                                VerticalAlignment="Center"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </StackPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="BorderRoot" Property="BorderBrush" Value="{Binding Path=(hc:VisualElement.HighlightBorderBrush), RelativeSource={RelativeSource TemplatedParent}}" />
                            <Setter TargetName="BorderRoot" Property="Background" Value="{Binding Path=(hc:VisualElement.HighlightBackground), RelativeSource={RelativeSource TemplatedParent}}" />
                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{Binding Path=(hc:VisualElement.HighlightForeground), RelativeSource={RelativeSource TemplatedParent}}" />
                        </Trigger>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="contentPresenter" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
                            <Setter TargetName="PathMain" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="contentPresenter" Property="Margin" Value="0" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="Panel.ZIndex" Value="{x:Static system:Int32.MaxValue}" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style TargetType="hc:Pagination">
        <Setter Property="hc:VisualElement.HighlightBorderBrush" Value="{DynamicResource TitleBrush}" />
        <Setter Property="hc:VisualElement.HighlightBackground" Value="{DynamicResource TitleBrush}" />
        <Setter Property="hc:VisualElement.HighlightForeground" Value="{DynamicResource TextIconBrush}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="PaginationButtonStyle" Value="{StaticResource PaginationButtonStyle}" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="UseLayoutRounding" Value="True" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Pagination">
                    <StackPanel VerticalAlignment="Top" Orientation="Horizontal">
                        <Button
                            x:Name="PART_ButtonLeft"
                            MinWidth="30"
                            Padding="10,8"
                            hc:BorderElement.CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='1,0,0,1'}"
                            hc:IconElement.Geometry="{StaticResource LeftGeometry}"
                            Command="interactivity:ControlCommands.Prev" />
                        <StackPanel
                            HorizontalAlignment="Center"
                            Orientation="Horizontal"
                            ZIndex="999">
                            <interactivity:Interaction.Triggers>
                                <interactivity:RoutedEventTrigger RoutedEvent="RadioButton.Checked">
                                    <interactivity:EventToCommand Command="interactivity:ControlCommands.Selected" PassEventArgsToCommand="True" />
                                </interactivity:RoutedEventTrigger>
                            </interactivity:Interaction.Triggers>
                            <RadioButton
                                Name="PART_ButtonFirst"
                                Content="1"
                                IsChecked="True"
                                Style="{TemplateBinding PaginationButtonStyle}" />
                            <Border
                                Name="PART_MoreLeft"
                                Margin="-1,0,0,0"
                                Padding="10,0"
                                Background="{DynamicResource SecondaryRegionBrush}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="1"
                                Cursor="No">
                                <hc:SimpleText
                                    VerticalAlignment="Center"
                                    FontWeight="Bold"
                                    Foreground="{DynamicResource SecondaryTextBrush}"
                                    Text="..." />
                            </Border>
                            <StackPanel Name="PART_PanelMain" Orientation="Horizontal" />
                            <Border
                                Name="PART_MoreRight"
                                Margin="-1,0,0,0"
                                Padding="10,0"
                                Background="{DynamicResource SecondaryRegionBrush}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="1"
                                Cursor="No">
                                <hc:SimpleText
                                    VerticalAlignment="Center"
                                    FontWeight="Bold"
                                    Foreground="{DynamicResource SecondaryTextBrush}"
                                    Text="..." />
                            </Border>
                            <RadioButton
                                Name="PART_ButtonLast"
                                Content="10"
                                Style="{TemplateBinding PaginationButtonStyle}" />
                        </StackPanel>
                        <Button
                            x:Name="PART_ButtonRight"
                            MinWidth="30"
                            Margin="-1,0,0,0"
                            Padding="10,8"
                            hc:BorderElement.CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='0,1,1,0'}"
                            hc:IconElement.Geometry="{StaticResource RightGeometry}"
                            Command="interactivity:ControlCommands.Next" />
                        <hc:NumericUpDown
                            x:Name="PART_Jump"
                            Margin="6,0,0,0"
                            IsEnabled="{TemplateBinding IsJumpEnabled}"
                            Maximum="{Binding MaxPageCount, RelativeSource={RelativeSource TemplatedParent}}"
                            Minimum="1"
                            Visibility="{TemplateBinding IsJumpEnabled,
                                                         Converter={StaticResource Boolean2VisibilityConverter}}" />
                        <Button
                            Margin="6,0,0,0"
                            Command="interactivity:ControlCommands.Jump"
                            Content="{ex:Lang {x:Static langs:LangKeys.Jump}}"
                            IsEnabled="{TemplateBinding IsJumpEnabled}"
                            Visibility="{TemplateBinding IsJumpEnabled,
                                                         Converter={StaticResource Boolean2VisibilityConverter}}" />
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="PasswordBox" BasedOn="{StaticResource PasswordBoxBaseStyle}" />
    <Style
        x:Key="PasswordBox.Small"
        TargetType="PasswordBox"
        BasedOn="{StaticResource PasswordBoxBaseStyle}">
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="Padding" Value="6,0" />
    </Style>
    <Style
        x:Key="PasswordBoxExtend"
        TargetType="PasswordBox"
        BasedOn="{StaticResource PasswordBoxExtendBaseStyle}" />
    <Style
        x:Key="PasswordBoxExtend.Small"
        TargetType="PasswordBox"
        BasedOn="{StaticResource PasswordBoxExtend}">
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style TargetType="hc:PasswordBox" BasedOn="{StaticResource PasswordBoxPlusBaseStyle}" />
    <Style
        x:Key="PasswordBoxPlus.Small"
        TargetType="hc:PasswordBox"
        BasedOn="{StaticResource PasswordBoxPlusBaseStyle}">
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style TargetType="hc:PinBox" BasedOn="{StaticResource PinBoxBaseStyle}" />
    <Style TargetType="hc:Poptip" BasedOn="{StaticResource PoptipBaseStyle}" />
    <Style TargetType="hc:PopupWindow">
        <Setter Property="WindowStyle" Value="None" />
        <Setter Property="MinHeight" Value="220" />
        <Setter Property="UseLayoutRounding" Value="True" />
        <Setter Property="BorderThickness" Value="20" />
        <Setter Property="ShowInTaskbar" Value="False" />
        <Setter Property="MinWidth" Value="300" />
        <Setter Property="ResizeMode" Value="NoResize" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="SizeToContent" Value="WidthAndHeight" />
        <Setter Property="Effect">
            <Setter.Value>
                <DropShadowEffect
                    BlurRadius="15"
                    Opacity=".6"
                    ShadowDepth="0" />
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:PopupWindow">
                    <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid
                                Name="TitleGrid"
                                Height="30"
                                Background="{DynamicResource TitleBrush}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <TextBlock
                                    Name="PART_TitleBlock"
                                    Padding="{StaticResource DefaultControlPadding}"
                                    VerticalAlignment="Center"
                                    Background="Transparent"
                                    Foreground="White"
                                    Text="{TemplateBinding Title}"
                                    TextTrimming="WordEllipsis"
                                    TextWrapping="Wrap" />
                                <Button
                                    Name="CloseButton"
                                    Grid.Column="1"
                                    Width="44"
                                    Height="28"
                                    Margin="0,0,1,0"
                                    Padding="9"
                                    hc:BackgroundSwitchElement.MouseDownBackground="Red"
                                    hc:BackgroundSwitchElement.MouseHoverBackground="Red"
                                    Background="Transparent"
                                    Command="interactivity:ControlCommands.Close"
                                    Foreground="White"
                                    IsCancel="True"
                                    Style="{StaticResource ButtonCustom}">
                                    <Path Fill="{Binding ElementName=CloseButton, Path=Foreground}" Style="{StaticResource ClosePathStyle}" />
                                </Button>
                            </Grid>
                            <Border
                                Name="PART_MainBorder"
                                Grid.Row="1"
                                BorderBrush="{DynamicResource TitleBrush}">
                                <StackPanel>
                                    <TextBlock
                                        Name="MyTextBlock"
                                        MinHeight="110"
                                        MaxWidth="300"
                                        Padding="32"
                                        Background="{TemplateBinding Background}"
                                        Foreground="{DynamicResource PrimaryTextBrush}"
                                        Text="{TemplateBinding ContentStr}"
                                        TextAlignment="Center"
                                        TextTrimming="CharacterEllipsis"
                                        TextWrapping="Wrap" />
                                    <StackPanel
                                        Margin="0,0,0,32"
                                        HorizontalAlignment="Center"
                                        Background="{DynamicResource RegionBrush}"
                                        Orientation="Horizontal">
                                        <Button
                                            MinWidth="80"
                                            Margin="0,0,16,0"
                                            Command="interactivity:ControlCommands.Cancel"
                                            Content="{ex:Lang Key={x:Static langs:LangKeys.Cancel}}"
                                            IsCancel="True"
                                            Visibility="{TemplateBinding ShowCancel,
                                                                         Converter={StaticResource Boolean2VisibilityConverter}}" />
                                        <Button
                                            MinWidth="80"
                                            Command="interactivity:ControlCommands.Confirm"
                                            Content="{ex:Lang Key={x:Static langs:LangKeys.Confirm}}"
                                            IsDefault="True"
                                            Style="{StaticResource ButtonPrimary}" />
                                    </StackPanel>
                                </StackPanel>
                            </Border>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="ShowBorder" Value="True">
                            <Setter TargetName="PART_MainBorder" Property="BorderThickness" Value="1,0,1,1" />
                        </Trigger>
                        <Trigger Property="ShowTitle" Value="False">
                            <Setter TargetName="TitleGrid" Property="Visibility" Value="Collapsed" />
                            <Setter Property="Background" Value="Transparent" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:ProgressButton" BasedOn="{StaticResource ProgressButtonBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="ProgressButtonPrimary"
        TargetType="hc:ProgressButton"
        BasedOn="{StaticResource ProgressButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="ProgressButtonSuccess"
        TargetType="hc:ProgressButton"
        BasedOn="{StaticResource ProgressButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style
        x:Key="ProgressButtonInfo"
        TargetType="hc:ProgressButton"
        BasedOn="{StaticResource ProgressButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="ProgressButtonWarning"
        TargetType="hc:ProgressButton"
        BasedOn="{StaticResource ProgressButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="ProgressButtonDanger"
        TargetType="hc:ProgressButton"
        BasedOn="{StaticResource ProgressButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style TargetType="hc:PropertyGrid" BasedOn="{StaticResource PropertyGridBaseStyle}" />
    <Style
        x:Key="ComboBoxItemCapsuleBaseStyle"
        TargetType="ComboBoxItem"
        BasedOn="{x:Null}">
        <Setter Property="MinWidth" Value="40" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Padding" Value="10,0" />
        <Setter Property="Margin" Value="-1,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ComboBoxItem">
                    <Border
                        x:Name="BorderRoot"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                            Focusable="False"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                            TextElement.Foreground="{TemplateBinding Foreground}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="Panel.ZIndex" Value="{x:Static system:Int32.MaxValue}" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
                <Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" />
            </Trigger>
            <Trigger Property="IsSelected" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
                <Setter Property="TextElement.Foreground" Value="{DynamicResource TextIconBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="ComboBoxItemCapsuleDefault"
        TargetType="ComboBoxItem"
        BasedOn="{StaticResource ComboBoxItemCapsuleBaseStyle}" />
    <Style
        x:Key="ComboBoxItemCapsuleHorizontalFirst"
        TargetType="ComboBoxItem"
        BasedOn="{StaticResource ComboBoxItemCapsuleBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="4,0,0,4" />
        <Setter Property="Margin" Value="0" />
    </Style>
    <Style
        x:Key="ComboBoxItemCapsuleHorizontalLast"
        TargetType="ComboBoxItem"
        BasedOn="{StaticResource ComboBoxItemCapsuleBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="0,4,4,0" />
    </Style>
    <Style
        x:Key="ComboBoxItemCapsuleSingle"
        TargetType="ComboBoxItem"
        BasedOn="{StaticResource ComboBoxItemCapsuleBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
    </Style>
    <Style
        x:Key="ComboBoxItemCapsuleVerticalFirst"
        TargetType="ComboBoxItem"
        BasedOn="{StaticResource ComboBoxItemCapsuleBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="4,4,0,0" />
        <Setter Property="Margin" Value="0" />
    </Style>
    <Style
        x:Key="ComboBoxItemCapsuleVerticalLast"
        TargetType="ComboBoxItem"
        BasedOn="{StaticResource ComboBoxItemCapsuleBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="0,0,4,4" />
    </Style>
    <Style
        x:Key="ComboBoxCapsule"
        TargetType="ComboBox"
        BasedOn="{x:Null}">
        <Setter Property="ItemContainerStyleSelector" Value="{StaticResource ComboBoxItemCapsuleStyleSelector}" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="ItemsPanel" Value="{StaticResource UniformHorizontalItemsPanelTemplate}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ComboBox">
                    <ItemsPresenter
                        x:Name="ItemsPresenter"
                        KeyboardNavigation.DirectionalNavigation="Contained"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:Rate" BasedOn="{StaticResource RateBaseStyle}" />
    <Style TargetType="hc:RibbonGroup">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Height" Value="90" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Padding" Value="6,6,6,0" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <WrapPanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:RibbonGroup">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <ItemsPresenter Grid.ColumnSpan="2" Margin="{TemplateBinding Padding}" />
                        <ContentPresenter
                            Name="ContentPresenter"
                            Grid.Row="1"
                            Grid.Column="0"
                            Grid.ColumnSpan="2"
                            Margin="10,0,10,2"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Bottom"
                            ContentSource="Header"
                            TextElement.Foreground="{DynamicResource SecondaryTextBrush}" />
                        <Button
                            Grid.Row="1"
                            Grid.Column="1"
                            Width="16"
                            Height="16"
                            Margin="0,0,2,0"
                            HorizontalAlignment="Right"
                            hc:BackgroundSwitchElement.MouseHoverBackground="{DynamicResource SecondaryRegionBrush}"
                            hc:Poptip.Instance="{TemplateBinding LauncherPoptip}"
                            Command="interactivity:ControlCommands.More"
                            Style="{StaticResource ButtonCustom}"
                            Visibility="{Binding ShowLauncherButton, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}">
                            <Path
                                Width="9"
                                Height="9"
                                Data="{StaticResource DialogBoxLauncherGeometry}"
                                Fill="{DynamicResource SecondaryTextBrush}"
                                Stretch="Uniform" />
                        </Button>
                        <Border
                            Grid.Row="0"
                            Grid.RowSpan="2"
                            Grid.Column="2"
                            Width="1"
                            Margin="0,4"
                            Background="{TemplateBinding BorderBrush}"
                            Visibility="{Binding ShowSplitter, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="ShowLauncherButton" Value="True">
                            <Setter TargetName="ContentPresenter" Property="Margin" Value="20,0,20,2" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:RibbonTabHeader">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Foreground" Value="{DynamicResource SecondaryTextBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource TitleBrush}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:RibbonTabHeader">
                    <Border Background="{TemplateBinding Background}">
                        <hc:SimplePanel x:Name="templateRoot" SnapsToDevicePixels="true">
                            <Border
                                x:Name="BorderBottom"
                                Margin="12,0,12,2"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="0,0,0,2"
                                Visibility="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" />
                            <ContentPresenter
                                x:Name="ContentPresenter"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Focusable="False"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </hc:SimplePanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style TargetType="hc:Ribbon">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Panel.ZIndex" Value="{x:Static system:Int32.MaxValue}" />
        <Setter Property="ContentHeight" Value="96" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="Padding" Value="10,0" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <hc:SimplePanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:Ribbon">
                    <hc:ClipGrid x:Name="PART_RootPanel" IsClipEnabled="False">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Grid
                            x:Name="PART_ContentPanel"
                            Grid.Row="1"
                            Grid.ColumnSpan="3">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Border
                                Grid.ColumnSpan="2"
                                Height="{TemplateBinding ContentHeight}"
                                Margin="{TemplateBinding Padding}"
                                VerticalAlignment="Bottom"
                                Background="{DynamicResource RegionBrush}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                                <Border.Effect>
                                    <DropShadowEffect
                                        BlurRadius="8"
                                        Direction="-90"
                                        Opacity=".1"
                                        RenderingBias="Performance"
                                        ShadowDepth="2"
                                        Color="{StaticResource EffectShadowColor}" />
                                </Border.Effect>
                            </Border>
                            <ItemsPresenter
                                x:Name="PART_TabItemsPresenter"
                                Grid.Column="0"
                                Height="{TemplateBinding ContentHeight}"
                                Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='1,0,0,0'}"
                                VerticalAlignment="Bottom" />
                            <ToggleButton
                                Grid.Column="1"
                                Width="16"
                                Height="20"
                                Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"
                                Padding="2,0"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Bottom"
                                hc:IconElement.Geometry="{StaticResource UpGeometry}"
                                hc:IconSwitchElement.GeometrySelected="{StaticResource NailGeometry}"
                                Command="interactivity:ControlCommands.Switch"
                                IsChecked="{Binding IsMinimized, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                Style="{StaticResource ToggleButtonIconTransparent}" />
                        </Grid>
                        <ContentPresenter
                            Grid.Row="0"
                            Grid.Column="0"
                            ContentSource="PrefixContent" />
                        <hc:RibbonTabHeaderItemsControl
                            x:Name="PART_TabHeaderItemsControl"
                            Grid.Row="0"
                            Grid.Column="1"
                            Margin="0,0,0,2"
                            Background="{TemplateBinding Background}"
                            Focusable="False">
                            <ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <StackPanel Margin="{Binding Padding, RelativeSource={RelativeSource AncestorType=hc:Ribbon}}" Orientation="Horizontal" />
                                </ItemsPanelTemplate>
                            </ItemsControl.ItemsPanel>
                        </hc:RibbonTabHeaderItemsControl>
                        <ContentPresenter
                            Grid.Row="0"
                            Grid.Column="2"
                            ContentSource="PostfixContent" />
                    </hc:ClipGrid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:RunningBlock" BasedOn="{StaticResource RunningBlockBaseStyle}" />
    <Style TargetType="Separator" BasedOn="{StaticResource SeparatorBaseStyle}" />
    <Style TargetType="hc:Shield" BasedOn="{StaticResource ShieldBaseStyle}" />
    <Style TargetType="hc:SideMenu" BasedOn="{StaticResource SideMenuBaseStyle}" />
    <Style
        x:Key="SideMenuAccordion"
        TargetType="hc:SideMenu"
        BasedOn="{StaticResource SideMenuBaseStyle}">
        <Setter Property="ExpandMode" Value="Accordion" />
        <Setter Property="PanelAreaLength" Value="200" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource SideMenuItemHeaderAccordionBaseStyle}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:SideMenu">
                    <Border
                        Name="BorderRoot"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <StackPanel x:Name="PART_Panel" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="SplitButtonDefault"
        TargetType="hc:SplitButton"
        BasedOn="{StaticResource SplitButtonBaseStyle}">
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource BorderBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="SplitButtonDefault.Small"
        TargetType="hc:SplitButton"
        BasedOn="{StaticResource SplitButtonDefault}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style TargetType="hc:SplitButton" BasedOn="{StaticResource SplitButtonDefault}" />
    <Style
        x:Key="SplitButtonPrimary"
        TargetType="hc:SplitButton"
        BasedOn="{StaticResource SplitButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
    </Style>
    <Style
        x:Key="SplitButtonPrimary.Small"
        TargetType="hc:SplitButton"
        BasedOn="{StaticResource SplitButtonPrimary}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="SplitButtonSuccess"
        TargetType="hc:SplitButton"
        BasedOn="{StaticResource SplitButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource SuccessBrush}" />
    </Style>
    <Style
        x:Key="SplitButtonSuccess.Small"
        TargetType="hc:SplitButton"
        BasedOn="{StaticResource SplitButtonSuccess}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="SplitButtonInfo"
        TargetType="hc:SplitButton"
        BasedOn="{StaticResource SplitButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource InfoBrush}" />
    </Style>
    <Style
        x:Key="SplitButtonInfo.Small"
        TargetType="hc:SplitButton"
        BasedOn="{StaticResource SplitButtonInfo}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="SplitButtonWarning"
        TargetType="hc:SplitButton"
        BasedOn="{StaticResource SplitButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource WarningBrush}" />
    </Style>
    <Style
        x:Key="SplitButtonWarning.Small"
        TargetType="hc:SplitButton"
        BasedOn="{StaticResource SplitButtonWarning}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style
        x:Key="SplitButtonDanger"
        TargetType="hc:SplitButton"
        BasedOn="{StaticResource SplitButtonBaseStyle}">
        <Setter Property="Background" Value="{DynamicResource DangerBrush}" />
    </Style>
    <Style
        x:Key="SplitButtonDanger.Small"
        TargetType="hc:SplitButton"
        BasedOn="{StaticResource SplitButtonDanger}">
        <Setter Property="Height" Value="20" />
        <Setter Property="Padding" Value="6,1" />
        <Setter Property="hc:IconElement.Height" Value="12" />
    </Style>
    <Style TargetType="StatusBar" BasedOn="{StaticResource StatusBarBaseStyle}" />
    <Style TargetType="StatusBarItem" BasedOn="{StaticResource StatusBarItemBaseStyle}" />
    <Style TargetType="hc:StepBar" BasedOn="{StaticResource StepBarBaseStyle}" />
    <Style TargetType="TabControl" BasedOn="{StaticResource TabControlBaseStyle}" />
    <Style TargetType="hc:TabControl" BasedOn="{StaticResource TabControlPlusBaseStyle}" />
    <Style x:Key="TabItemSliding" TargetType="TabItem">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Padding" Value="10,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TabItem">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{DynamicResource BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            ContentSource="Header"
                            Focusable="False"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                            TextElement.Foreground="{TemplateBinding Foreground}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" Value=".9" />
                        </Trigger>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{Binding Path=(hc:TitleElement.Foreground), RelativeSource={RelativeSource TemplatedParent}}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="contentPresenter" Property="Opacity" Value="0.4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:SlidingTabContainer" BasedOn="{StaticResource SlidingTabContainerBaseStyle}" />
    <Style x:Key="TabControlSliding" TargetType="TabControl">
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource TabItemSliding}" />
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
        <Setter Property="hc:TitleElement.Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="hc:TitleElement.Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TabControl">
                    <Grid
                        x:Name="templateRoot"
                        ClipToBounds="true"
                        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>
                        <hc:SlidingTabContainer
                            x:Name="TabContainer"
                            Grid.Row="0"
                            Grid.Column="0"
                            Background="{TemplateBinding Background}">
                            <StackPanel
                                x:Name="headerPanel"
                                Margin="0"
                                Background="Transparent"
                                IsItemsHost="True"
                                KeyboardNavigation.DirectionalNavigation="Cycle"
                                KeyboardNavigation.TabNavigation="Once"
                                Orientation="Horizontal" />
                        </hc:SlidingTabContainer>
                        <Border
                            x:Name="contentPanel"
                            Grid.Row="1"
                            Grid.Column="0"
                            Margin="0,6,0,0"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                            <ContentPresenter
                                x:Name="PART_SelectedContentHost"
                                Margin="0"
                                ContentSource="SelectedContent"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TabStripPlacement" Value="Bottom">
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
                            <Setter TargetName="TabContainer" Property="Grid.Row" Value="1" />
                            <Setter TargetName="contentPanel" Property="Margin" Value="0,0,0,6" />
                            <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Left">
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
                            <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
                            <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
                            <Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
                            <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="contentPanel" Property="Margin" Value="6,0,0,0" />
                            <Setter TargetName="TabContainer" Property="Grid.Column" Value="0" />
                            <Setter TargetName="TabContainer" Property="Grid.Row" Value="0" />
                            <Setter TargetName="headerPanel" Property="Orientation" Value="Vertical" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Right">
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
                            <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
                            <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
                            <Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
                            <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="contentPanel" Property="Margin" Value="0,0,6,0" />
                            <Setter TargetName="TabContainer" Property="Grid.Column" Value="1" />
                            <Setter TargetName="TabContainer" Property="Grid.Row" Value="0" />
                            <Setter TargetName="headerPanel" Property="Orientation" Value="Vertical" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="TabItemInLine"
        TargetType="TabItem"
        BasedOn="{StaticResource TabItemStyle}">
        <Setter Property="MinWidth" Value="0" />
    </Style>
    <Style
        x:Key="TabControlInLine"
        TargetType="TabControl"
        BasedOn="{StaticResource TabControlBaseStyle}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource TabItemInLine}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TabControl">
                    <Grid
                        x:Name="templateRoot"
                        Background="{TemplateBinding Background}"
                        ClipToBounds="true"
                        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>
                        <UniformGrid
                            x:Name="headerPanel"
                            Grid.Row="0"
                            Grid.Column="0"
                            Margin="0"
                            Background="Transparent"
                            IsItemsHost="true"
                            KeyboardNavigation.DirectionalNavigation="Cycle"
                            KeyboardNavigation.TabNavigation="Once"
                            Rows="1" />
                        <Border
                            x:Name="contentPanel"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                            <ContentPresenter
                                x:Name="PART_SelectedContentHost"
                                Margin="0"
                                ContentSource="SelectedContent"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TabStripPlacement" Value="Bottom">
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
                            <Setter TargetName="headerPanel" Property="Grid.Row" Value="1" />
                            <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Left">
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
                            <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
                            <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
                            <Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
                            <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="headerPanel" Property="Grid.Column" Value="0" />
                            <Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="headerPanel" Property="Rows" Value="0" />
                            <Setter TargetName="headerPanel" Property="Columns" Value="1" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Right">
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
                            <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
                            <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
                            <Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
                            <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="headerPanel" Property="Grid.Column" Value="1" />
                            <Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="headerPanel" Property="Rows" Value="0" />
                            <Setter TargetName="headerPanel" Property="Columns" Value="1" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="TabItemCapsuleDefault"
        TargetType="TabItem"
        BasedOn="{StaticResource TabItemCapsuleBaseStyle}" />
    <Style
        x:Key="TabItemCapsuleHorizontalFirst"
        TargetType="TabItem"
        BasedOn="{StaticResource TabItemCapsuleBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="4,0,0,4" />
        <Setter Property="Margin" Value="0" />
    </Style>
    <Style
        x:Key="TabItemCapsuleHorizontalLast"
        TargetType="TabItem"
        BasedOn="{StaticResource TabItemCapsuleBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="0,4,4,0" />
    </Style>
    <Style
        x:Key="TabItemCapsuleSingle"
        TargetType="TabItem"
        BasedOn="{StaticResource TabItemCapsuleBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
    </Style>
    <Style
        x:Key="TabItemCapsuleVerticalFirst"
        TargetType="TabItem"
        BasedOn="{StaticResource TabItemCapsuleBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="4,4,0,0" />
        <Setter Property="Margin" Value="0" />
    </Style>
    <Style
        x:Key="TabItemCapsuleVerticalLast"
        TargetType="TabItem"
        BasedOn="{StaticResource TabItemCapsuleBaseStyle}">
        <Setter Property="hc:BorderElement.CornerRadius" Value="0,0,4,4" />
    </Style>
    <Style x:Key="TabControlCapsule" TargetType="TabControl">
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="hc:TitleElement.BorderBrush" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="hc:TitleElement.Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="hc:TitleElement.Foreground" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="ItemContainerStyleSelector">
            <Setter.Value>
                <tools:TabItemCapsuleStyleSelector />
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TabControl">
                    <Grid
                        x:Name="templateRoot"
                        Background="{TemplateBinding Background}"
                        ClipToBounds="true"
                        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>
                        <UniformGrid
                            x:Name="headerPanel"
                            Grid.Row="0"
                            Grid.Column="0"
                            Margin="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Background="Transparent"
                            IsItemsHost="true"
                            KeyboardNavigation.DirectionalNavigation="Cycle"
                            KeyboardNavigation.TabNavigation="Once"
                            Rows="1" />
                        <Border
                            x:Name="contentPanel"
                            Grid.Row="1"
                            Grid.Column="0"
                            Margin="0,6,0,0"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{DynamicResource BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                            <ContentPresenter
                                x:Name="PART_SelectedContentHost"
                                Margin="0"
                                ContentSource="SelectedContent"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TabStripPlacement" Value="Bottom">
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
                            <Setter TargetName="headerPanel" Property="Grid.Row" Value="1" />
                            <Setter TargetName="contentPanel" Property="Margin" Value="0,0,0,6" />
                            <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Left">
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
                            <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
                            <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
                            <Setter TargetName="headerPanel" Property="Grid.Column" Value="0" />
                            <Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="headerPanel" Property="Rows" Value="0" />
                            <Setter TargetName="headerPanel" Property="Columns" Value="1" />
                            <Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
                            <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="contentPanel" Property="Margin" Value="6,0,0,0" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Right">
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
                            <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
                            <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
                            <Setter TargetName="headerPanel" Property="Grid.Column" Value="1" />
                            <Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="headerPanel" Property="Rows" Value="0" />
                            <Setter TargetName="headerPanel" Property="Columns" Value="1" />
                            <Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
                            <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="contentPanel" Property="Margin" Value="0,0,6,0" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="TabControlCapsuleSolid"
        TargetType="TabControl"
        BasedOn="{StaticResource TabControlCapsule}">
        <Setter Property="hc:TitleElement.BorderBrush" Value="{DynamicResource TitleBrush}" />
        <Setter Property="hc:TitleElement.Background" Value="{DynamicResource TitleBrush}" />
        <Setter Property="hc:TitleElement.Foreground" Value="{DynamicResource TextIconBrush}" />
    </Style>
    <Style TargetType="hc:TimeBar">
        <Setter Property="HotspotsBrush" Value="{DynamicResource AccentBrush}" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="UseLayoutRounding" Value="True" />
        <Setter Property="BorderThickness" Value="0,1,0,0" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="Background" Value="{DynamicResource TitleBrush}" />
        <Setter Property="Height" Value="60" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:TimeBar">
                    <ControlTemplate.Triggers>
                        <EventTrigger RoutedEvent="FrameworkElement.MouseEnter">
                            <BeginStoryboard>
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TextBlockMove" Storyboard.TargetProperty="(UIElement.Visibility)">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="FrameworkElement.MouseLeave">
                            <BeginStoryboard>
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TextBlockMove" Storyboard.TargetProperty="(UIElement.Visibility)">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}" />
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </ControlTemplate.Triggers>
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <hc:SimplePanel ClipToBounds="True">
                            <Border
                                Height="52"
                                VerticalAlignment="Top"
                                BorderBrush="White"
                                BorderThickness="0,0,0,4">
                                <TextBlock
                                    Name="PART_TextBlockSelected"
                                    Margin="0,14,0,0"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Top"
                                    FontSize="16" />
                            </Border>
                            <TextBlock
                                Margin="0,14,10,0"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Top"
                                Text="{TemplateBinding SpeStr}"
                                Visibility="{TemplateBinding ShowSpeStr,
                                                             Converter={StaticResource Boolean2VisibilityConverter}}" />
                            <TextBlock
                                Name="PART_TextBlockMove"
                                Margin="0,2,0,0"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Top"
                                Visibility="Collapsed" />
                            <Canvas
                                Name="PART_CanvasSpe"
                                Height="28"
                                VerticalAlignment="Bottom" />
                            <hc:SimplePanel
                                x:Name="PART_Hotspots"
                                Margin="0,48,0,0"
                                VerticalAlignment="Top"
                                Visibility="{Binding Hotspots, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Object2VisibilityConverter}}" />
                            <Border Width="1" Background="{DynamicResource DangerBrush}" />
                            <Border
                                Name="PART_BorderTop"
                                Background="Transparent"
                                Cursor="Hand" />
                        </hc:SimplePanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="hc:TimePicker" BasedOn="{StaticResource TimePickerBaseStyle}" />
    <Style
        x:Key="TimePicker.Small"
        TargetType="hc:TimePicker"
        BasedOn="{StaticResource TimePickerBaseStyle}">
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="Padding" Value="6,0" />
    </Style>
    <Style
        x:Key="TimePickerExtend"
        TargetType="hc:TimePicker"
        BasedOn="{StaticResource TimePickerExtendBaseStyle}" />
    <Style
        x:Key="TimePickerExtend.Small"
        TargetType="hc:TimePicker"
        BasedOn="{StaticResource TimePickerExtend}">
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style
        x:Key="TimePickerPlus"
        TargetType="hc:TimePicker"
        BasedOn="{StaticResource TimePickerPlusBaseStyle}" />
    <Style
        x:Key="TimePickerPlus.Small"
        TargetType="hc:TimePicker"
        BasedOn="{StaticResource TimePickerPlus}">
        <Setter Property="hc:InfoElement.MinContentHeight" Value="20" />
        <Setter Property="hc:InfoElement.ContentHeight" Value="20" />
        <Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,0" />
        <Setter Property="hc:TitleElement.MarginOnTheTop" Value="6,0,0,1" />
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="20" />
    </Style>
    <Style TargetType="ToolBarTray" BasedOn="{StaticResource ToolBarTrayBaseStyle}" />
    <Style TargetType="ToolBar" BasedOn="{StaticResource ToolBarBaseStyle}" />
    <Style TargetType="ToolTip" BasedOn="{StaticResource ToolTipBaseStyle}" />
    <Style TargetType="hc:Transfer" BasedOn="{StaticResource TransferBaseStyle}" />
    <Style
        x:Key="TransferItemBaseStyle.Small"
        TargetType="hc:TransferItem"
        BasedOn="{StaticResource TransferItemBaseStyle}">
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="24" />
    </Style>
    <Style
        x:Key="Transfer.Small"
        TargetType="hc:Transfer"
        BasedOn="{StaticResource TransferBaseStyle}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource TransferItemBaseStyle.Small}" />
    </Style>
    <Style
        x:Key="TransferItemBaseStyle.CheckBox"
        TargetType="hc:TransferItem"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualMargin0}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="Background" Value="{DynamicResource RegionBrush}" />
        <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
        <Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:TransferItem">
                    <Border
                        Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='1,0,1,0'}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
                        SnapsToDevicePixels="true">
                        <CheckBox
                            MinHeight="{TemplateBinding MinHeight}"
                            HorizontalAlignment="Stretch"
                            FocusVisualStyle="{x:Null}"
                            Foreground="{TemplateBinding Foreground}"
                            IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
                            <ContentPresenter
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </CheckBox>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
            </Trigger>
            <Trigger Property="IsTransferred" Value="True">
                <Setter Property="Visibility" Value="Collapsed" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="Transfer.CheckBox"
        TargetType="hc:Transfer"
        BasedOn="{StaticResource TransferBaseStyle}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource TransferItemBaseStyle.CheckBox}" />
    </Style>
    <Style
        x:Key="TransferItemBaseStyle.CheckBox.Small"
        TargetType="hc:TransferItem"
        BasedOn="{StaticResource TransferItemBaseStyle.CheckBox}">
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="24" />
    </Style>
    <Style
        x:Key="Transfer.CheckBox.Small"
        TargetType="hc:Transfer"
        BasedOn="{StaticResource TransferBaseStyle}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource TransferItemBaseStyle.CheckBox.Small}" />
    </Style>
    <Style TargetType="TreeViewItem" BasedOn="{StaticResource TreeViewItemBaseStyle}" />
    <Style TargetType="TreeView" BasedOn="{StaticResource TreeViewBaseStyle}" />
    <Style
        x:Key="TreeViewItemBaseStyle.Small"
        TargetType="TreeViewItem"
        BasedOn="{StaticResource TreeViewItemBaseStyle}">
        <Setter Property="Padding" Value="6,0" />
        <Setter Property="MinHeight" Value="24" />
    </Style>
    <Style
        x:Key="TreeView.Small"
        TargetType="TreeView"
        BasedOn="{StaticResource TreeViewBaseStyle}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource TreeViewItemBaseStyle.Small}" />
    </Style>
    <Style TargetType="hc:Watermark" BasedOn="{StaticResource WatermarkBaseStyle}" />
    <Style TargetType="hc:AutoCompleteTextBox" BasedOn="{StaticResource AutoCompleteTextBoxBaseStyle}" />
    <ControlTemplate x:Key="TipSliderThumbHorizontalTop" TargetType="Thumb">
        <hc:AxleCanvas>
            <Label
                Name="LabelValue"
                Canvas.Bottom="28"
                Content="{Binding Value, RelativeSource={RelativeSource AncestorType=Slider}}"
                ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat), RelativeSource={RelativeSource AncestorType=Slider}}"
                IsHitTestVisible="False"
                Opacity="0"
                Style="{StaticResource LabelPrimary}" />
            <Border
                Name="BorderDot"
                Canvas.Bottom="0"
                Width="18"
                Height="18"
                Background="White"
                BorderBrush="{DynamicResource PrimaryBrush}"
                BorderThickness="0"
                CornerRadius="9"
                Effect="{StaticResource EffectShadow1}" />
        </hc:AxleCanvas>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderDot" Property="Effect" Value="{StaticResource EffectShadow2}" />
                <Setter TargetName="LabelValue" Property="Opacity" Value="1" />
            </Trigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonDown">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="2"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonUp">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="0"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="TipSliderThumbHorizontalBottom" TargetType="Thumb">
        <hc:AxleCanvas>
            <Label
                Name="LabelValue"
                Canvas.Top="28"
                Content="{Binding Value, RelativeSource={RelativeSource AncestorType=Slider}}"
                ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat), RelativeSource={RelativeSource AncestorType=Slider}}"
                IsHitTestVisible="False"
                Opacity="0"
                Style="{StaticResource LabelPrimary}" />
            <Border
                Name="BorderDot"
                Canvas.Bottom="0"
                Width="18"
                Height="18"
                Background="White"
                BorderBrush="{DynamicResource PrimaryBrush}"
                BorderThickness="0"
                CornerRadius="9"
                Effect="{StaticResource EffectShadow1}" />
        </hc:AxleCanvas>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderDot" Property="Effect" Value="{StaticResource EffectShadow2}" />
                <Setter TargetName="LabelValue" Property="Opacity" Value="1" />
            </Trigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonDown">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="2"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonUp">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="0"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="TipSliderThumbVerticalLeft" TargetType="Thumb">
        <hc:AxleCanvas Orientation="Vertical">
            <Label
                Name="LabelValue"
                Canvas.Right="28"
                Content="{Binding Value, RelativeSource={RelativeSource AncestorType=Slider}}"
                ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat), RelativeSource={RelativeSource AncestorType=Slider}}"
                IsHitTestVisible="False"
                Opacity="0"
                Style="{StaticResource LabelPrimary}" />
            <Border
                Name="BorderDot"
                Canvas.Right="0"
                Width="18"
                Height="18"
                Background="White"
                BorderBrush="{DynamicResource PrimaryBrush}"
                BorderThickness="0"
                CornerRadius="9"
                Effect="{StaticResource EffectShadow1}" />
        </hc:AxleCanvas>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderDot" Property="Effect" Value="{StaticResource EffectShadow2}" />
                <Setter TargetName="LabelValue" Property="Opacity" Value="1" />
            </Trigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonDown">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="2"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonUp">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="0"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="TipSliderThumbVerticalRight" TargetType="Thumb">
        <hc:AxleCanvas Orientation="Vertical">
            <Label
                Name="LabelValue"
                Canvas.Left="28"
                Content="{Binding Value, RelativeSource={RelativeSource AncestorType=Slider}}"
                ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat), RelativeSource={RelativeSource AncestorType=Slider}}"
                IsHitTestVisible="False"
                Opacity="0"
                Style="{StaticResource LabelPrimary}" />
            <Border
                Name="BorderDot"
                Canvas.Right="0"
                Width="18"
                Height="18"
                Background="White"
                BorderBrush="{DynamicResource PrimaryBrush}"
                BorderThickness="0"
                CornerRadius="9"
                Effect="{StaticResource EffectShadow1}" />
        </hc:AxleCanvas>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderDot" Property="Effect" Value="{StaticResource EffectShadow2}" />
                <Setter TargetName="LabelValue" Property="Opacity" Value="1" />
            </Trigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonDown">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="2"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonUp">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="0"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="SliderHorizontal" TargetType="Slider">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <TickBar
                x:Name="TopTick"
                Grid.Row="0"
                Height="4"
                Margin="0,0,0,2"
                Fill="{TemplateBinding Foreground}"
                Placement="Top"
                Visibility="Collapsed" />
            <TickBar
                x:Name="BottomTick"
                Grid.Row="2"
                Height="4"
                Margin="0,2,0,0"
                Fill="{TemplateBinding Foreground}"
                Placement="Bottom"
                Visibility="Collapsed" />
            <Border
                x:Name="TrackBackground"
                Grid.Row="1"
                Height="2"
                Margin="9,0"
                VerticalAlignment="center"
                Background="{TemplateBinding Background}">
                <Canvas x:Name="Canvas_SelectionRange" Visibility="Hidden">
                    <Rectangle
                        x:Name="PART_SelectionRange"
                        Height="2"
                        Fill="{DynamicResource AccentBrush}" />
                </Canvas>
            </Border>
            <Track
                x:Name="PART_Track"
                Grid.Row="1"
                Margin="9,0">
                <Track.DecreaseRepeatButton>
                    <RepeatButton
                        Background="{DynamicResource PrimaryBrush}"
                        Command="{x:Static Slider.DecreaseLarge}"
                        Style="{StaticResource SliderRepeatButtonHorizontalStyle}" />
                </Track.DecreaseRepeatButton>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonHorizontalStyle}" />
                </Track.IncreaseRepeatButton>
                <Track.Thumb>
                    <Thumb
                        x:Name="Thumb"
                        Width="18"
                        Height="18"
                        Margin="-9,0"
                        VerticalAlignment="Center"
                        ClipToBounds="False"
                        Focusable="False"
                        OverridesDefaultStyle="True"
                        Template="{StaticResource SliderThumb}" />
                </Track.Thumb>
            </Track>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="hc:TipElement.Placement" Value="Top" />
                    <Condition Property="hc:TipElement.Visibility" Value="Visible" />
                </MultiTrigger.Conditions>
                <Setter TargetName="Thumb" Property="Template" Value="{StaticResource TipSliderThumbHorizontalTop}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="hc:TipElement.Placement" Value="Bottom" />
                    <Condition Property="hc:TipElement.Visibility" Value="Visible" />
                </MultiTrigger.Conditions>
                <Setter TargetName="Thumb" Property="Template" Value="{StaticResource TipSliderThumbHorizontalBottom}" />
            </MultiTrigger>
            <Trigger Property="TickPlacement" Value="TopLeft">
                <Setter TargetName="TopTick" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="TickPlacement" Value="BottomRight">
                <Setter TargetName="BottomTick" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="TickPlacement" Value="Both">
                <Setter TargetName="TopTick" Property="Visibility" Value="Visible" />
                <Setter TargetName="BottomTick" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="IsSelectionRangeEnabled" Value="true">
                <Setter TargetName="Canvas_SelectionRange" Property="Visibility" Value="Visible" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="SliderVertical" TargetType="Slider">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" MinWidth="{TemplateBinding MinWidth}" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <TickBar
                x:Name="TopTick"
                Grid.Column="0"
                Width="4"
                Margin="0,0,2,0"
                Fill="{TemplateBinding Foreground}"
                Placement="Left"
                Visibility="Collapsed" />
            <TickBar
                x:Name="BottomTick"
                Grid.Column="2"
                Width="4"
                Margin="2,0,0,0"
                Fill="{TemplateBinding Foreground}"
                Placement="Right"
                Visibility="Collapsed" />
            <Border
                x:Name="TrackBackground"
                Grid.Column="1"
                Width="2"
                Margin="0,9"
                HorizontalAlignment="center"
                Background="{TemplateBinding Background}">
                <Canvas x:Name="Canvas_SelectionRange" Visibility="Hidden">
                    <Rectangle
                        x:Name="PART_SelectionRange"
                        Width="2"
                        Fill="{DynamicResource AccentBrush}" />
                </Canvas>
            </Border>
            <Track
                x:Name="PART_Track"
                Grid.Column="1"
                Margin="0,9">
                <Track.DecreaseRepeatButton>
                    <RepeatButton
                        Background="{DynamicResource PrimaryBrush}"
                        Command="{x:Static Slider.DecreaseLarge}"
                        Style="{StaticResource SliderRepeatButtonVerticalStyle}" />
                </Track.DecreaseRepeatButton>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonVerticalStyle}" />
                </Track.IncreaseRepeatButton>
                <Track.Thumb>
                    <Thumb
                        x:Name="Thumb"
                        Width="18"
                        Height="18"
                        Margin="0,-9"
                        HorizontalAlignment="Center"
                        Focusable="False"
                        OverridesDefaultStyle="True"
                        Template="{StaticResource SliderThumb}" />
                </Track.Thumb>
            </Track>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="hc:TipElement.Placement" Value="Left" />
                    <Condition Property="hc:TipElement.Visibility" Value="Visible" />
                </MultiTrigger.Conditions>
                <Setter TargetName="Thumb" Property="Template" Value="{StaticResource TipSliderThumbVerticalLeft}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="hc:TipElement.Placement" Value="Right" />
                    <Condition Property="hc:TipElement.Visibility" Value="Visible" />
                </MultiTrigger.Conditions>
                <Setter TargetName="Thumb" Property="Template" Value="{StaticResource TipSliderThumbVerticalRight}" />
            </MultiTrigger>
            <Trigger Property="TickPlacement" Value="TopLeft">
                <Setter TargetName="TopTick" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="TickPlacement" Value="BottomRight">
                <Setter TargetName="BottomTick" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="TickPlacement" Value="Both">
                <Setter TargetName="TopTick" Property="Visibility" Value="Visible" />
                <Setter TargetName="BottomTick" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="IsSelectionRangeEnabled" Value="true">
                <Setter TargetName="Canvas_SelectionRange" Property="Visibility" Value="Visible" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="SliderBaseStyle"
        TargetType="Slider"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource DarkPrimaryBrush}" />
        <Setter Property="Template" Value="{StaticResource SliderHorizontal}" />
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Vertical">
                <Setter Property="Template" Value="{StaticResource SliderVertical}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value=".4" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="TipRangeSliderThumbHorizontalTop" TargetType="hc:RangeThumb">
        <hc:AxleCanvas>
            <Label
                Name="LabelValue"
                Canvas.Bottom="28"
                Content="{TemplateBinding Content}"
                ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat), RelativeSource={RelativeSource AncestorType=hc:RangeSlider}}"
                IsHitTestVisible="False"
                Opacity="0"
                Style="{StaticResource LabelPrimary}" />
            <Border
                Name="BorderDot"
                Canvas.Bottom="0"
                Width="18"
                Height="18"
                Background="White"
                BorderBrush="{DynamicResource PrimaryBrush}"
                BorderThickness="0"
                CornerRadius="9"
                Effect="{StaticResource EffectShadow1}" />
        </hc:AxleCanvas>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderDot" Property="Effect" Value="{StaticResource EffectShadow2}" />
                <Setter TargetName="LabelValue" Property="Opacity" Value="1" />
            </Trigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonDown">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="2"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonUp">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="0"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="TipRangeSliderThumbHorizontalBottom" TargetType="hc:RangeThumb">
        <hc:AxleCanvas>
            <Label
                Name="LabelValue"
                Canvas.Top="28"
                Content="{TemplateBinding Content}"
                ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat), RelativeSource={RelativeSource AncestorType=hc:RangeSlider}}"
                IsHitTestVisible="False"
                Opacity="0"
                Style="{StaticResource LabelPrimary}" />
            <Border
                Name="BorderDot"
                Canvas.Bottom="0"
                Width="18"
                Height="18"
                Background="White"
                BorderBrush="{DynamicResource PrimaryBrush}"
                BorderThickness="0"
                CornerRadius="9"
                Effect="{StaticResource EffectShadow1}" />
        </hc:AxleCanvas>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderDot" Property="Effect" Value="{StaticResource EffectShadow2}" />
                <Setter TargetName="LabelValue" Property="Opacity" Value="1" />
            </Trigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonDown">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="2"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonUp">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="0"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="TipRangeSliderThumbVerticalLeft" TargetType="hc:RangeThumb">
        <hc:AxleCanvas Orientation="Vertical">
            <Label
                Name="LabelValue"
                Canvas.Right="28"
                Content="{TemplateBinding Content}"
                ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat), RelativeSource={RelativeSource AncestorType=hc:RangeSlider}}"
                IsHitTestVisible="False"
                Opacity="0"
                Style="{StaticResource LabelPrimary}" />
            <Border
                Name="BorderDot"
                Canvas.Right="0"
                Width="18"
                Height="18"
                Background="White"
                BorderBrush="{DynamicResource PrimaryBrush}"
                BorderThickness="0"
                CornerRadius="9"
                Effect="{StaticResource EffectShadow1}" />
        </hc:AxleCanvas>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderDot" Property="Effect" Value="{StaticResource EffectShadow2}" />
                <Setter TargetName="LabelValue" Property="Opacity" Value="1" />
            </Trigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonDown">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="2"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonUp">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="0"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="TipRangeSliderThumbVerticalRight" TargetType="hc:RangeThumb">
        <hc:AxleCanvas Orientation="Vertical">
            <Label
                Name="LabelValue"
                Canvas.Left="28"
                Content="{TemplateBinding Content}"
                ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat), RelativeSource={RelativeSource AncestorType=hc:RangeSlider}}"
                IsHitTestVisible="False"
                Opacity="0"
                Style="{StaticResource LabelPrimary}" />
            <Border
                Name="BorderDot"
                Canvas.Right="0"
                Width="18"
                Height="18"
                Background="White"
                BorderBrush="{DynamicResource PrimaryBrush}"
                BorderThickness="0"
                CornerRadius="9"
                Effect="{StaticResource EffectShadow1}" />
        </hc:AxleCanvas>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderDot" Property="Effect" Value="{StaticResource EffectShadow2}" />
                <Setter TargetName="LabelValue" Property="Opacity" Value="1" />
            </Trigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonDown">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="2"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            <EventTrigger RoutedEvent="PreviewMouseLeftButtonUp">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <ThicknessAnimation
                                Storyboard.TargetName="BorderDot"
                                Storyboard.TargetProperty="BorderThickness"
                                To="0"
                                Duration="0:0:.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="RangeSliderHorizontal" TargetType="hc:RangeSlider">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <TickBar
                x:Name="TopTick"
                Grid.Row="0"
                Width="{Binding ActualWidth, ElementName=TrackBackground}"
                Height="4"
                Margin="0,0,0,2"
                Fill="{TemplateBinding Foreground}"
                IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
                Maximum="{TemplateBinding Maximum}"
                Minimum="{TemplateBinding Minimum}"
                Placement="Top"
                TickFrequency="{TemplateBinding TickFrequency}"
                Ticks="{TemplateBinding Ticks}"
                Visibility="Collapsed" />
            <TickBar
                x:Name="BottomTick"
                Grid.Row="2"
                Width="{Binding ActualWidth, ElementName=TrackBackground}"
                Height="4"
                Margin="0,2,0,0"
                Fill="{TemplateBinding Foreground}"
                IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
                Maximum="{TemplateBinding Maximum}"
                Minimum="{TemplateBinding Minimum}"
                Placement="Bottom"
                TickFrequency="{TemplateBinding TickFrequency}"
                Ticks="{TemplateBinding Ticks}"
                Visibility="Collapsed" />
            <Border
                x:Name="TrackBackground"
                Grid.Row="1"
                Height="2"
                Margin="9,0"
                VerticalAlignment="center"
                Background="{TemplateBinding Background}" />
            <hc:RangeTrack
                x:Name="PART_Track"
                Grid.Row="1"
                Margin="9,0"
                IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
                Maximum="{TemplateBinding Maximum}"
                Minimum="{TemplateBinding Minimum}"
                Orientation="{TemplateBinding Orientation}"
                ValueEnd="{TemplateBinding ValueEnd}"
                ValueStart="{TemplateBinding ValueStart}">
                <hc:RangeTrack.DecreaseRepeatButton>
                    <RepeatButton
                        Command="{x:Static hc:RangeSlider.DecreaseLarge}"
                        Delay="{TemplateBinding Delay}"
                        Interval="{TemplateBinding Interval}"
                        Style="{StaticResource SliderRepeatButtonHorizontalStyle}" />
                </hc:RangeTrack.DecreaseRepeatButton>
                <hc:RangeTrack.CenterRepeatButton>
                    <RepeatButton
                        Background="{DynamicResource PrimaryBrush}"
                        Command="{x:Static hc:RangeSlider.CenterLarge}"
                        Delay="{TemplateBinding Delay}"
                        Interval="{TemplateBinding Interval}"
                        Style="{StaticResource SliderRepeatButtonHorizontalStyle}" />
                </hc:RangeTrack.CenterRepeatButton>
                <hc:RangeTrack.IncreaseRepeatButton>
                    <RepeatButton
                        Command="{x:Static hc:RangeSlider.IncreaseLarge}"
                        Delay="{TemplateBinding Delay}"
                        Interval="{TemplateBinding Interval}"
                        Style="{StaticResource SliderRepeatButtonHorizontalStyle}" />
                </hc:RangeTrack.IncreaseRepeatButton>
                <hc:RangeTrack.ThumbStart>
                    <hc:RangeThumb
                        x:Name="ThumbStart"
                        Width="18"
                        Height="18"
                        Margin="-9,0"
                        VerticalAlignment="Center"
                        ClipToBounds="False"
                        Content="{TemplateBinding ValueStart}"
                        Focusable="False"
                        OverridesDefaultStyle="True"
                        Template="{StaticResource RangeSliderThumb}" />
                </hc:RangeTrack.ThumbStart>
                <hc:RangeTrack.ThumbEnd>
                    <hc:RangeThumb
                        x:Name="ThumbEnd"
                        Width="18"
                        Height="18"
                        Margin="-9,0"
                        VerticalAlignment="Center"
                        ClipToBounds="False"
                        Content="{TemplateBinding ValueEnd}"
                        Focusable="False"
                        OverridesDefaultStyle="True"
                        Template="{StaticResource RangeSliderThumb}" />
                </hc:RangeTrack.ThumbEnd>
            </hc:RangeTrack>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="hc:TipElement.Placement" Value="Top" />
                    <Condition Property="hc:TipElement.Visibility" Value="Visible" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ThumbStart" Property="Template" Value="{StaticResource TipRangeSliderThumbHorizontalTop}" />
                <Setter TargetName="ThumbEnd" Property="Template" Value="{StaticResource TipRangeSliderThumbHorizontalTop}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="hc:TipElement.Placement" Value="Bottom" />
                    <Condition Property="hc:TipElement.Visibility" Value="Visible" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ThumbStart" Property="Template" Value="{StaticResource TipRangeSliderThumbHorizontalBottom}" />
                <Setter TargetName="ThumbEnd" Property="Template" Value="{StaticResource TipRangeSliderThumbHorizontalBottom}" />
            </MultiTrigger>
            <Trigger Property="TickPlacement" Value="TopLeft">
                <Setter TargetName="TopTick" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="TickPlacement" Value="BottomRight">
                <Setter TargetName="BottomTick" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="TickPlacement" Value="Both">
                <Setter TargetName="TopTick" Property="Visibility" Value="Visible" />
                <Setter TargetName="BottomTick" Property="Visibility" Value="Visible" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="RangeSliderVertical" TargetType="hc:RangeSlider">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" MinWidth="{TemplateBinding MinWidth}" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <TickBar
                x:Name="TopTick"
                Grid.Column="0"
                Width="4"
                Height="{Binding ActualHeight, ElementName=TrackBackground}"
                Margin="0,0,2,0"
                Fill="{TemplateBinding Foreground}"
                IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
                Maximum="{TemplateBinding Maximum}"
                Minimum="{TemplateBinding Minimum}"
                Placement="Left"
                TickFrequency="{TemplateBinding TickFrequency}"
                Ticks="{TemplateBinding Ticks}"
                Visibility="Collapsed" />
            <TickBar
                x:Name="BottomTick"
                Grid.Column="2"
                Width="4"
                Height="{Binding ActualHeight, ElementName=TrackBackground}"
                Margin="2,0,0,0"
                Fill="{TemplateBinding Foreground}"
                IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
                Maximum="{TemplateBinding Maximum}"
                Minimum="{TemplateBinding Minimum}"
                Placement="Right"
                TickFrequency="{TemplateBinding TickFrequency}"
                Ticks="{TemplateBinding Ticks}"
                Visibility="Collapsed" />
            <Border
                x:Name="TrackBackground"
                Grid.Column="1"
                Width="2"
                Margin="0,9"
                HorizontalAlignment="center"
                Background="{TemplateBinding Background}" />
            <hc:RangeTrack
                x:Name="PART_Track"
                Grid.Column="1"
                Margin="0,9"
                IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
                Maximum="{TemplateBinding Maximum}"
                Minimum="{TemplateBinding Minimum}"
                Orientation="{TemplateBinding Orientation}"
                ValueEnd="{TemplateBinding ValueEnd}"
                ValueStart="{TemplateBinding ValueStart}">
                <hc:RangeTrack.DecreaseRepeatButton>
                    <RepeatButton
                        Command="{x:Static hc:RangeSlider.DecreaseLarge}"
                        Delay="{TemplateBinding Delay}"
                        Interval="{TemplateBinding Interval}"
                        Style="{StaticResource SliderRepeatButtonVerticalStyle}" />
                </hc:RangeTrack.DecreaseRepeatButton>
                <hc:RangeTrack.CenterRepeatButton>
                    <RepeatButton
                        Background="{DynamicResource PrimaryBrush}"
                        Command="{x:Static hc:RangeSlider.CenterLarge}"
                        Delay="{TemplateBinding Delay}"
                        Interval="{TemplateBinding Interval}"
                        Style="{StaticResource SliderRepeatButtonVerticalStyle}" />
                </hc:RangeTrack.CenterRepeatButton>
                <hc:RangeTrack.IncreaseRepeatButton>
                    <RepeatButton
                        Command="{x:Static hc:RangeSlider.IncreaseLarge}"
                        Delay="{TemplateBinding Delay}"
                        Interval="{TemplateBinding Interval}"
                        Style="{StaticResource SliderRepeatButtonVerticalStyle}" />
                </hc:RangeTrack.IncreaseRepeatButton>
                <hc:RangeTrack.ThumbStart>
                    <hc:RangeThumb
                        x:Name="ThumbStart"
                        Width="18"
                        Height="18"
                        Margin="0,-9"
                        HorizontalAlignment="Center"
                        Content="{TemplateBinding ValueStart}"
                        Focusable="False"
                        OverridesDefaultStyle="True"
                        Template="{StaticResource RangeSliderThumb}" />
                </hc:RangeTrack.ThumbStart>
                <hc:RangeTrack.ThumbEnd>
                    <hc:RangeThumb
                        x:Name="ThumbEnd"
                        Width="18"
                        Height="18"
                        Margin="0,-9"
                        HorizontalAlignment="Center"
                        Content="{TemplateBinding ValueEnd}"
                        Focusable="False"
                        OverridesDefaultStyle="True"
                        Template="{StaticResource RangeSliderThumb}" />
                </hc:RangeTrack.ThumbEnd>
            </hc:RangeTrack>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="hc:TipElement.Placement" Value="Left" />
                    <Condition Property="hc:TipElement.Visibility" Value="Visible" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ThumbStart" Property="Template" Value="{StaticResource TipRangeSliderThumbVerticalLeft}" />
                <Setter TargetName="ThumbEnd" Property="Template" Value="{StaticResource TipRangeSliderThumbVerticalLeft}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="hc:TipElement.Placement" Value="Right" />
                    <Condition Property="hc:TipElement.Visibility" Value="Visible" />
                </MultiTrigger.Conditions>
                <Setter TargetName="ThumbStart" Property="Template" Value="{StaticResource TipRangeSliderThumbVerticalRight}" />
                <Setter TargetName="ThumbEnd" Property="Template" Value="{StaticResource TipRangeSliderThumbVerticalRight}" />
            </MultiTrigger>
            <Trigger Property="TickPlacement" Value="TopLeft">
                <Setter TargetName="TopTick" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="TickPlacement" Value="BottomRight">
                <Setter TargetName="BottomTick" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="TickPlacement" Value="Both">
                <Setter TargetName="TopTick" Property="Visibility" Value="Visible" />
                <Setter TargetName="BottomTick" Property="Visibility" Value="Visible" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style
        x:Key="RangeSliderBaseStyle"
        TargetType="hc:RangeSlider"
        BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
        <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource DarkPrimaryBrush}" />
        <Setter Property="Template" Value="{StaticResource RangeSliderHorizontal}" />
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Vertical">
                <Setter Property="Template" Value="{StaticResource RangeSliderVertical}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value=".4" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style TargetType="hc:RangeSlider" BasedOn="{StaticResource RangeSliderBaseStyle}" />
    <Style TargetType="Slider" BasedOn="{StaticResource SliderBaseStyle}" />
</ResourceDictionary>