Hi,
How can I change the color of the SortIndicator in my columns in my XamTreeGrid. I also need to change the color of the line under the header of the sorted column.
BR,
Hilma Maria
Hello Hilma,
I have been investigating into the behavior you are looking to achieve, and I would recommend that you take a look at the sample project I am attaching to this post.
I am under the impression that by the “color of the line under the header of the sorted column,” you are referring to the light-blue border that shows up by default under the column when it is sorted. In this case, I would recommend that you include the default Aero style in Windows 10 for the LabelPresenter element, which can be found in the DataPresenterAero_Express.xaml file commonly found at the following directory with Infragistics controls installed:
C:\Program Files (x86)\Infragistics\<version>\WPF\DefaultStyles\DataPresenter
Inside the LabelPresenter’s ControlTemplate, you will find a SortIndicator element, which you can set the Background color of. Normally, I would just recommend styling this element, but since you want to modify the underline as well, the default style is needed, as the other element is a Border in the same ControlTemplate named “highlight_2.” In the sample, I have changed its BorderBrush to “Red” as well as removed the 1 pixel thickness from its Left side so that it will only appear as an underline.
I am attaching the sample project to demonstrate. I hope this helps you.
Please let me know if you have any other questions or concerns on this matter.
TreeGridSortIndicatorStyle.zip
Hi Andrew,
I use RoyalDark so I changed that one instead. Thanks for the help!