[WPF]: Styling a scrollbar, but the ListView scrollbar is not affected by the style -


i styling scrollbar in resourcedictionary without giving key value:

<style targettype="{x:type scrollbar}">       ... </style> 

bur reason component of type scrollbar affected style. not listview component's scrollbar!

i think scrollbars have same style since not using key value in style definition!

any ideas?

the default wpf behavior implicit scrollbar style apply scrollbars in listbox. if not occurring in application there overriding default behavior. have template applied listbox?

my test app prove out default styling behavior below:

<window x:class="testscrollbarstyle.window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="window1" height="300" width="300">  <window.resources>             <style targettype="scrollbar">         <setter property="background" value="red" />     </style>         </window.resources>     <grid>     <grid.rowdefinitions>         <rowdefinition />         <rowdefinition />     </grid.rowdefinitions>      <scrollviewer x:name="scroll">         <rectangle height="200" />     </scrollviewer>      <listbox grid.row="1" scrollviewer.verticalscrollbarvisibility="visible">         <listboxitem>test 1</listboxitem>         <listboxitem>test 2</listboxitem>         <listboxitem>test 3</listboxitem>         <listboxitem>test 4</listboxitem>         <listboxitem>test 5</listboxitem>         <listboxitem>test 6</listboxitem>         <listboxitem>test 7</listboxitem>         <listboxitem>test 8</listboxitem>         <listboxitem>test 9</listboxitem>         <listboxitem>test 10</listboxitem>         <listboxitem>test 11</listboxitem>     </listbox>  </grid> 


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -