2011-02-13 30 views

Respuesta

14

La forma más sencilla es añadir un disparador para IsSelected en el ItemContainerStyle para la ListBox

<ListBox ...> 
    <ListBox.ItemContainerStyle> 
     <Style TargetType="ListBoxItem"> 
      <Setter Property="BorderBrush" Value="Red"/> 
      <Style.Triggers> 
       <Trigger Property="IsSelected" Value="True"> 
        <Setter Property="BorderThickness" Value="1"/> 
       </Trigger> 
      </Style.Triggers> 
     </Style> 
    </ListBox.ItemContainerStyle> 
    <!--...--> 
</ListBox> 
+0

omg funcionó y fue así de fácil?!?! : D tu rock m8 !! – syncis

+0

Es por eso que amo WPF :) –

Cuestiones relacionadas