2016-06-21 67 views
2

我跟着this question擺脫我的ListView中的高光效果。突出顯示效果被正確禁用,但我仍然在MouseOver上獲得了放大效果。這是非常討厭的,特別是當移動ListView時,因爲它帶來了Blury效果。從ListViewItem中刪除放大效果

這裏是我的代碼

<ListView ItemsSource="{Binding Roles}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" > 
    <ListView.ItemContainerStyle> 
     <Style TargetType="ListViewItem"> 
      <Setter Property="Focusable" Value="False"/> 
      <Style.Triggers> 
       <Trigger Property="IsMouseOver" Value="True"> 
        <Setter Property="Background" Value="Transparent" /> 
        <Setter Property="BorderThickness" Value="0" /> 
        <Setter Property="Focusable" Value="False" /> 
       </Trigger> 
      </Style.Triggers> 
     </Style> 
    </ListView.ItemContainerStyle> 
</ListView> 

這:

enter image description here

是我願意擺脫掉的行爲。

有誰知道如何擺脫這種放大效應?

回答

1

,而不是通過改變邊框顏色

<Setter Property="BorderBrush" Value="{x:Null}" /> 
改變邊框厚度

<Setter Property="BorderThickness" Value="0" /> 

隱藏它