From a UserControl
, I would like to disable a ScrollViewer
which is defined one level higher. My scenario looks something like this:
<!-- ... -->
<ScrollViewer VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled">
<custom:MyUserControl ... />
</ScrollViewer>
Now, I would like to disable the ScrollViewer
from within MyUserControl
. Is this possible?
Background:
I have defined a custom TabControl
style where I added a ScrollViewer
for each item's content automatically. However, in one case, I do not want to use that ScrollViewer
, but rather make the content size to the available space, whereas in all other cases I do want to use the ScrollViewer. Any ideas? Of course, I could add a ScrollViewer to every tab item manually, except for the one item, but that is not what I want.