Change the Text Color on the Last Line of ListBox in WPF VB.NET

Asked 2 years ago, Updated 2 years ago, 97 views

Visual Studio 2013
VB.NET
WPF

There are several lines in ListBox.
If you want to color the text in the first line of
What should I do?

wpf vb.net

2022-09-30 20:48

1 Answers

Selfless.

When you add to the list, you can set the properties to ListBoxItem.

 Dimbi As New ListBoxItem
lbi.Content=fileName
lbi.Foreground=Brushes.Red
ListBox1.Items.Add(lbi)

I hope it will be helpful for someone.

Thank you.


2022-09-30 20:48

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.