WPF ListView removes mouse effect

Hi, I am using ListView in wpf running on a Windows 7 machine, now when I drag the mouse over the list, I get a little blue border around it, how can I remove this effect? (I'm not talking about the lines of the whole list)

+7
source share
2 answers

I think you can get rid of this effect by making a small change for BorderThickness for ListView (same with TextBox )

try it

 <ListView ... BorderThickness="1.000001"> 
+9
source

Slippery slope you continue. Why do you want to remove the "little blue border around the list". I guess its focus is visual and it serves a purpose in the user interface. If you are not going to completely customize the presentation style of the list, I would suggest leaving it alone.

One way to turn it off is to define a style based on the type for the list in application resources (probably in App.xaml)

 <Style TargetType="{x:Type ListView}"> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> </Style> 
0
source

All Articles