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
  • 19,723
  • 5
  • 59
  • 95
Kris
  • 620
  • 1
  • 10
  • 27

2 Answers2

2

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

Jonathan Gilbert
  • 3,334
  • 18
  • 26
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,504
  • 1
  • 26
  • 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