✅ Listview color

How do i put a different color for a specific item of a listview?
8 Replies
Suiram1
Suiram13y ago
You could create a data template in whose style you put a DataTrigger bound to a bool of the data type to be displayed, with which you can evaluate whether the background or any other property of the list item should be different than normal
Denis
Denis3y ago
What UI platform are on? WPF, winforms, avalonia, blazor...?
Luizdodibre
LuizdodibreOP3y ago
winforms
Denis
Denis3y ago
Then the advice above does not apply How are you adding the data to your listview? And a side question, was WinForms your choice, i.e., is this your project? If yes, it is strongly recommend to ditch winforms and use something like WPF. Styling anything in WinForms is horrible
Accord
Accord3y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Luizdodibre
LuizdodibreOP3y ago
How can i make this?
Denis
Denis3y ago
Make what
Luizdodibre
LuizdodibreOP3y ago
I misunderstood, sorry

Did you find this page helpful?