I have lots of nested controls in the panel and I want to disable all of them, but leave scrolls enabled. Basically, I'm setting IsEnabled property of the root element (panel) to false using binding. But this disables scroll as well. Any ideas (except adding IsEnabled to each control instead)? I'm using MVVM.
So, in code it looks like this:
<Grid IsEnabled="{Binding IsControlEnabled}">
<StackPanel>
<.../>
<CustomControl/>
<.../>
</StackPanel>
</Grid>
CustomControl is also complex control and it has, for example, <ListBox>
in a <Scrollviewer>
.
And my point is to give user a possibility to scroll items in ListBox
, when IsControlEnabled == false
.