uwp win10 Listview SelectedItem Style

前端 未结 3 2015
攒了一身酷
攒了一身酷 2020-12-09 22:20

Is there a way to change the properties of a ListviewItem when this one is selected?

As an example, I want that a rectangle inside the ListviewItem to be Red when s

3条回答
  •  误落风尘
    2020-12-09 23:00

    You can set ListView.ItemContainerStyle to customize the style of ListViewItems used in the ListView.

    This page shows the default style: https://msdn.microsoft.com/en-us/library/windows/apps/mt299136.aspx

    In case of your example - you would change the Selected~Background properties in code similar to below: