WPF ListView Styling

I just started using WPF ListView now and I have a few questions:

  • Is there a way to apply a style where every second line is slightly darker, just for readability?
  • What is the ListView equivalent for Width = "*"?
  • Where can I find decent style?

Thanx

+3


source to share


3 answers


+2


source


1- Check the AlternationCount property in the ListView. This allows alternate strings to be different.

http://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol.alternationcount.aspx

Someone seems to have answered a similar question: wpf datagrid alternates row coloration



2- If you want to sort the ListBox in a container, try looking at some of the layout containers like CodeProject . In particular, DockPanel.

3- Where can I find free WPF controls and control templates?

0


source


A few seconds of googling will give you results like WPF ListView

and Customizing WPF Listview

and with the second question

"*" means stretching to fill the available space and is a fraction, so if one line is * and the other is 2 *, then the second line will be twice the size of the first line.

Hope it helps

0


source







All Articles