WPF-带有滚动条的列表框,可以';不要点击
这听起来很奇怪,但有可能实现这样的目标吗?我想要的是一个具有标准行为的普通滚动条,除了它不能被用户点击、抓取和上下移动之外——它应该就在那里,在滚动内容时移动。WPF-带有滚动条的列表框,可以';不要点击,wpf,Wpf,这听起来很奇怪,但有可能实现这样的目标吗?我想要的是一个具有标准行为的普通滚动条,除了它不能被用户点击、抓取和上下移动之外——它应该就在那里,在滚动内容时移动。 <Grid> <Grid.Resources> <Style TargetType="ScrollBar"> <Setter Property="IsHitTestVisible" Value="False" />
<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>
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.
+1:你是对的,在这种情况下更适合ishitestvisible
+1:你是对的,在这种情况下更适合ishitestvisible
+1:你是对的,在这种情况下更适合ishitestvisible
+1:你是对的,在这种情况下更适合ishitestvisible
。