Marked item in a ListBox
Posted: Wed Mar 16, 2016 2:40 am
by hamej
When I select an item in a listbox, it is marked deep blue, which is not, what I want. I want it to look like in Silverlight as shown in attached document. How do I change this? Or is this something, you will change in at coming version?
Re: Marked item in a ListBox
Posted: Wed Mar 16, 2016 10:34 am
by JS-Support @Userware
Hi hamej,
Thanks for your message.
You can easily change the color of the ListBox selected item by changing the value of the "SelectedItemBackgroundBrush" property:
You can set it either in XAML or in C#.
Here is an example in C#:
Code: Select all
ListBox1.SelectedItemBackgroundBrush = new SolidColorBrush(Colors.Red);
By the way, the ability to further modify the appearance ListBox controls via ControlTemplates will be available in Q2-Q3 2016.
Thanks.
Regards,
JS-Support