我有一个带有自定义 controlIemplate 的水平列表框。选定的项目在聚焦时会出现一个虚线框。有人知道如何摆脱它吗?
您需要将每个 ListBoxItem 的 FocusVisualStyle 设置为 null。步骤如下
1)为ListBox创建ItemContainerStyle
<Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> ....
2)将该样式设置为列表框
<ListBox ItemContainerStyle="{DynamicResource ListBoxItemStyle1}"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)