0

enter image description here
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.

artless noise
  • 21,212
  • 6
  • 68
  • 105
Kris
  • 640
  • 1
  • 11
  • 28

2 Answers2

2

There is a much easier way: Set Maximum equal to Minimum, and the thumb will disappear altogether. :-)

Jonathan Gilbert
  • 3,526
  • 20
  • 28
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