c# - Scrollbar style in wpf according to below image -


i want scroll style code in wpf scrollbar shown in below image. scrollbar within grid tag.

enter image description here

thanks help.

i have created usercontrol similar earlier. sample code may provide starting point.

<border borderthickness="2" borderbrush="black">     <grid>     <grid.rowdefinitions>                    <rowdefinition height="20"></rowdefinition>         <rowdefinition height="*"></rowdefinition>         <rowdefinition height="20"></rowdefinition>     </grid.rowdefinitions>           <repeatbutton grid.row="0" x:name="btnup" focusable="false" command="scrollbar.lineupcommand" commandtarget="{binding elementname=firstitem}" borderbrush="transparent">         <repeatbutton.background>             <lineargradientbrush startpoint="0.5,0" endpoint="0.5,1">                 <gradientstop color="white" offset="0"></gradientstop>                 <gradientstop color="black" offset=".5"></gradientstop>             </lineargradientbrush>         </repeatbutton.background>         <repeatbutton.content>             <path fill="white" data="m 0 10 l 36 10 l 18 0 z"/>         </repeatbutton.content>     </repeatbutton>     <listview  grid.row="1" fontsize="22" foreground="white" scrollviewer.verticalscrollbarvisibility="hidden" horizontalcontentalignment="center" background="black" >         <listview.itemspanel>             <itemspaneltemplate>                 <stackpanel maxwidth="500"/>             </itemspaneltemplate>         </listview.itemspanel>         <listviewitem name="firstitem">a</listviewitem>         <listviewitem>b</listviewitem>         <listviewitem>c</listviewitem>         <listviewitem>d</listviewitem>         <listviewitem>e</listviewitem>         <listviewitem>f</listviewitem>         <listviewitem>g</listviewitem>         <listviewitem>h</listviewitem>         <listviewitem>i</listviewitem>         <listviewitem>j</listviewitem>         <listviewitem>k</listviewitem>         <listviewitem>l</listviewitem>         <listviewitem>m</listviewitem>         <listviewitem>n</listviewitem>         <listviewitem>o</listviewitem>     </listview>     <repeatbutton grid.row="2" x:name="btndown" focusable="false" command="scrollbar.linedowncommand" commandtarget="{binding elementname=firstitem}" borderbrush="transparent">         <repeatbutton.background>             <lineargradientbrush startpoint="0.5,0" endpoint="0.5,1">                 <gradientstop color="white" offset="0"></gradientstop>                 <gradientstop color="black" offset="0.5"></gradientstop>             </lineargradientbrush>         </repeatbutton.background>         <repeatbutton.content>             <path fill="white" data="m 0 0 l 18 10 l 36 0 z"/>         </repeatbutton.content>     </repeatbutton> </grid> </border> 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

jquery - appear modal windows bottom -