
I want to remove the Thumb from the scrollbar when the IsEnabled property of the Scrollbar is Set to false. How can it be done in the code behind ? Please help.
            Asked
            
        
        
            Active
            
        
            Viewed 1,182 times
        
    0
            
            
        
        artless noise
        
- 21,212
 - 6
 - 68
 - 105
 
        Kris
        
- 640
 - 1
 - 11
 - 28
 
- 
                    are you talking about the Cursor??? – gaurawerma Mar 30 '12 at 10:13
 - 
                    @ gaurawerma : i have uploaded an image to make it clear. – Kris Mar 30 '12 at 10:21
 
2 Answers
2
            
            
        There is a much easier way: Set Maximum equal to Minimum, and the thumb will disappear altogether. :-)
        Jonathan Gilbert
        
- 3,526
 - 20
 - 28
 
- 
                    Does this work for you? https://github.com/logiclrd/TestScrollBarHideThumb – Jonathan Gilbert Jul 18 '16 at 14:29
 - 
                    I ended up looking for the thumb using the VisualTreeHelper and hiding it. – zmbq Jul 18 '16 at 21:20
 
1
            You can make custom control template (based on standard template - http://msdn.microsoft.com/en-us/library/ms742173(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/ms742173.aspx) for you scrollbar without thumb.
        Nikolay
        
- 3,658
 - 1
 - 24
 - 25
 
- 
                    Those are *not* the default templates, it even says `Example` in the title, see [this question](http://stackoverflow.com/questions/1559261/control-template-for-existing-controls-in-wpf). – H.B. Apr 12 '12 at 23:13
 - 
                    Yes, my bad, didn't notice that. I hoped that MS finally managed to publish control templates in all themes to help people to avoid to manually restore them with XamlWriter or Blend or other apps – Nikolay Apr 13 '12 at 06:33