我有一个带有自定义controlIemplate的水平列表框。当聚焦时,所选项目会得到一个虚线框架。有人知道怎么摆脱它吗?
发布于 2009-02-27 04:40:32
您需要将每个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}"
https://stackoverflow.com/questions/592665
复制相似问题