Collapse sort arrow

Dec 10, 2008 at 6:19 PM
I see a lot of posts about people accidentally hiding the sort arrow in the data grid column header.  In my case, none of the columns are sortable, and I would specifically like to collapse the arrow, because it keeps trimming my header text short.  Is there a simple way to do this?
Dec 10, 2008 at 10:38 PM
Hi jgdove,

    Ideally setting CanUserSort to false on column was supposed to collapse the sort arrow. But since this functionality is implemented in code through DataGridHeaderBorder for perf reasons (just like ButtonChrome) rather than XAML, it seems that this case has been missed out resulting in "CanUserSort=false" being ineffective in this case.

It seems that the only way of solving your problem is to set Background on DataGridColumnHeader to something of your interest, in which case you will loose all the default functionality like mouse hover etc. including Sort arrows OR retemplate the DataGridColumnHeader from the scratch.

By the way, I assume that this problem is relevant only to XP, since in Vista the arrow is at the top (instead of right).