2011-02-13 6 views

उत्तर

14

सबसे आसान तरीका है 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

के लिए ItemContainerStyle में IsSelected के लिए एक उत्प्रेरक जोड़ने के लिए OMG यह काम किया है और यह इतना आसान था?!?! : डी आप रॉक एम 8 !! – syncis

+0

यही कारण है कि मैं डब्ल्यूपीएफ प्यार करता हूँ :) –

संबंधित मुद्दे