progress bar - WPF ProgressBar tick marks -


how style progressbar use old fashioned tick marks? there question, winforms.

enter image description here

i hope following style starting point. leave style green ticks (the background of first rectangle of visualbrush).

    <style targettype="{x:type progressbar}">         <setter property="template">             <setter.value>                 <controltemplate targettype="{x:type progressbar}">                     <grid>                         <visualstatemanager.visualstategroups>                             <visualstategroup x:name="commonstates">                                 <visualstate x:name="determinate" />                                 <visualstate x:name="indeterminate">                                     <storyboard>                                         <objectanimationusingkeyframes duration="00:00:00"                                                                        storyboard.targetname="part_indicator"                                                                        storyboard.targetproperty="background">                                             <discreteobjectkeyframe keytime="00:00:00">                                                 <discreteobjectkeyframe.value>                                                     <solidcolorbrush>transparent</solidcolorbrush>                                                 </discreteobjectkeyframe.value>                                             </discreteobjectkeyframe>                                         </objectanimationusingkeyframes>                                         <coloranimationusingkeyframes storyboard.targetname="part_glowrect" storyboard.targetproperty="(panel.background).(gradientbrush.gradientstops)[0].(gradientstop.color)">                                             <easingcolorkeyframe keytime="0" value="#00ffffff" />                                         </coloranimationusingkeyframes>                                         <coloranimationusingkeyframes storyboard.targetname="part_glowrect" storyboard.targetproperty="(panel.background).(gradientbrush.gradientstops)[3].(gradientstop.color)">                                             <easingcolorkeyframe keytime="0" value="#00ffffff" />                                         </coloranimationusingkeyframes>                                     </storyboard>                                 </visualstate>                             </visualstategroup>                         </visualstatemanager.visualstategroups>                         <border x:name="part_track"                                 background="white"                                 borderbrush="#ffdedede"                                 borderthickness="2"                                 cliptobounds="true"                                 cornerradius="3">                             <border x:name="part_indicator"                                     margin="4"                                     horizontalalignment="left"                                     borderthickness="0"                                     cornerradius="0">                                 <border.background>                                     <visualbrush stretch="none"                                                  tilemode="tile"                                                  viewbox="0,0,1.,1"                                                  viewboxunits="relativetoboundingbox"                                                  viewport="0,0,30,30"                                                  viewportunits="absolute">                                         <visualbrush.visual>                                             <stackpanel orientation="horizontal">                                                 <rectangle width="30"                                                            height="30"                                                            fill="#ff23ff00" />                                                 <rectangle width="10"                                                            height="30"                                                            fill="transparent" />                                             </stackpanel>                                         </visualbrush.visual>                                     </visualbrush>                                 </border.background>                                  <grid x:name="animation" cliptobounds="true">                                     <border x:name="part_glowrect"                                             width="100"                                             margin="-100,0,0,0"                                             horizontalalignment="left"                                             verticalalignment="stretch"                                             cornerradius="0">                                         <border.background>                                             <lineargradientbrush startpoint="0,0.5" endpoint="1,0.5">                                                 <gradientstop offset="0" color="#00e8df2e" />                                                 <gradientstop offset="0.4" color="#ff38e41d" />                                                 <gradientstop offset="0.6" color="#ff38e41d" />                                                 <gradientstop offset="1" color="#00e8df2e" />                                             </lineargradientbrush>                                         </border.background>                                     </border>                                 </grid>                             </border>                         </border>                     </grid>                 </controltemplate>             </setter.value>         </setter>     </style> 

Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -