Andrei Diaconu
Andrei Diaconu

Reputation: 651

How to hide the scrollbar in wpf when the content fits the window?

How can i hide the scroll-bar if it's not enabled (when the content fits the window)?I've tried to use the is-enabled property but didn't work.

Upvotes: 2

Views: 3745

Answers (1)

Peter Hansen
Peter Hansen

Reputation: 8907

I assume you have a ScrollViewer and you would like to only show the Scrollbars when they are needed?

In that case you can set:

VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"

Upvotes: 4

Related Questions