How to highlight selected item in ItemsControl?

后端 未结 2 1260
无人共我
无人共我 2020-12-10 14:17

I have the following XAML. How can i highlight the selected item in the ItemsControl ? I can override the selected item template for ListView but how to achieve the same for

2条回答
  •  抹茶落季
    2020-12-10 15:07

    you can also do this through the expression blend interactivity. Use the event name MouseLeftDown or Tapped Event (in Windows 8.1) in the ItemsTemplate in the top container (StackPanel or the grid).

    xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
    
        
            
        
    
    

    This should do the trick

提交回复
热议问题