A question has recently popped up on the CF newsgroups on how to sort ListView columns and show an arrow that would point up or down accordingly to the sorting order. My suggestion to the person who asked this question was to create the owner-drawn header instead of existing one and use the sorting code from QuickStart tutorials. And so... a two train rides (home and back to work) later I had created a HeaderControl that's doing exactly that: sorts the ListView columns and shows the arrow. And since it's an owner-drawn, we can change the Fore/Back color to anything we like:
How do we use it? Very easy - create an instance of the HeaderControl and call its Attach method:
// Create instance of the new header
header = new HeaderControl();
// Attach it to the listview
header.Attach(listView1);
// Add control to the form’s controls collection
this.Controls.Add(header);
Download the source code here.