I have a customer who wants to see as much data in the xamDataGrid as possible. To reduce the width of some columns he suggests to put the Sort Indicator and the Pin icon on one line and the column name on another line in the column header.
I browsed through the forum messages but could not find a similar question and have no idea how this could be achieved (I have to admit that I'm still not very proficient in XAML and the Infragistics controls although I'm now using them for almost one year).
How can this be done? Thank you in advance for any good ideas and help.
Markus
Hello Markus,
What you have to do in this case is to retemplate the element that represents the label - LabelPresenter. You can find the default style for it in the DefaultStyles directory in the Infragistics folder. You can use and modify this style to achieve your requirement. There are several elements that the LabelPresenter is comprised of. They are positioned in a Grid element with Rows and Columns. What you can do, is change the attached Row and Column properties of each element to reprosition it. For example, the SortingIndicator element will have Row="1" Column="0".
Let me know if you need further assistance.
Hello Alex
Thank you very much for your help. I'm trying to find the style for the LabelPresenter. In the Infragistics WPF installation directory I found a directory DefaultStyles, but I couldn't find a style for the LabelPresenter. Am I looking for it at the wrong place?
Best Regards
Thanks again. You are right. I found the code in DataPresenterGeneric_Express.xaml. I did not check that file, because I thought that this is only for the free version.
Markus,
The full path to the file should look something like:
C:\Program Files (x86)\Infragistics\NetAdvantage 2009.2\WPF\DefaultStyles\DataPresenter\DataPresenterGeneric_Express.xaml