Reputation: 33
This can sound strange, but is it possible to achieve such a thing? What I want is a normal Scroll Bar with a standard behaviour, except it can't be clicked, grabbed and moved up and down by a user - it should just be there, moving when the content is being scrolled.
Upvotes: 0
Views: 78
Reputation: 12533
<Grid>
<Grid.Resources>
<Style TargetType="ScrollBar">
<Setter Property="IsHitTestVisible" Value="False" />
</Style>
</Grid.Resources>
<ListBox Height="150">
<ListBoxItem>1</ListBoxItem>
<ListBoxItem>1</ListBoxItem>
<ListBoxItem>1</ListBoxItem>
<ListBoxItem>1</ListBoxItem>
<ListBoxItem>1</ListBoxItem>
<ListBoxItem>1</ListBoxItem>
<ListBoxItem>1</ListBoxItem>
<ListBoxItem>1</ListBoxItem>
<ListBoxItem>1</ListBoxItem>
<ListBoxItem>1</ListBoxItem>
<ListBoxItem>1</ListBoxItem>
<ListBoxItem>1</ListBoxItem>
<ListBoxItem>1</ListBoxItem>
<ListBoxItem>1</ListBoxItem>
</ListBox>
</Grid>
Upvotes: 3