✅ Listview color

How do i put a different color for a specific item of a listview?
8 Replies
Suiram1
Suiram12y 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
Denis2y ago
What UI platform are on? WPF, winforms, avalonia, blazor...?
Luizdodibre
LuizdodibreOP2y ago
winforms
Denis
Denis2y 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
Accord2y 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
LuizdodibreOP2y ago
How can i make this?
Denis
Denis2y ago
Make what
Luizdodibre
LuizdodibreOP2y ago
I misunderstood, sorry

Did you find this page helpful?