【发布时间】:2020-06-14 06:04:41
【问题描述】:
我用谷歌搜索了很多东西,但我找不到有人可以解释一下如何禁用这种恶心的效果
代码:
<ListBox x:Name="HistoryList" Margin="10" BorderBrush="{x:Null}" Background="Transparent" ScrollViewer.CanContentScroll="False" ScrollViewer.VerticalScrollBarVisibility="Hidden">
<ListBoxItem>asd</ListBoxItem>
</ListBox>
我已经尝试过focusable = false 和
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<ContentPresenter/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.ItemContainerStyle>
但是当我这样做时,这些项目不显示。请帮帮我
【问题讨论】:
-
看here。 1 分钟的谷歌。 :)
-
实际上并没有帮助:(