My high-level question is: How can I change style settings on the XamDataGrid? Primarily colors.
I tried the Microsoft WPF standard technique for editing the control's template (by right clicking on it in the Visual Studio designer), but that yielded a minimal template that will not help me.
The Infragistics controls seem to prefer themes instead. Unfortunately, the help on creating a custom theme for an existing Infragistics control (found at http://help.infragistics.com/doc/WPF/2016.1/CLR4.0/?page=themeManager_Creating_New_Custom_Theme.html) includes a "giant leap," telling you to create a custom theme for the control. But of course, such a theme contains all kinds of specific keys that you need to know.
I found in the installed samples a lot of themes for a lot of the controls, but XamTreeGrid is not one of the controls included in them.
How can I get a sample theme definition for the XamTreeGrid to customize? Or if there's a quicker and easier way to change colors, I'm open to suggestions down that path as well.
Thanks,
Ken
Hi Folks,
can you please point me towards a resource where implementation of a custom style for XamDataGrid is explained?
Thanks!
Michal
Hi Nick,
I added these 3 files to the application resources
Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/UserControls/Resources/XamDataGrid/DataPresenterGeneric.xaml"/> </ResourceDictionary.MergedDictionaries>
and tried to reference it in the XamaDataGrid as:
Style="{StaticResource {x:Type igDP:XamDataPresenter}}"But I get the error: XamaDataGrid type expected but provided tye is XamDataPresenter. What I want to achieve is custom background font and border colors, and custom style for selected row. Custom Column headers. Custom "add new record" row. I'd appreciate if you could walk me thru the process of customizing the theme for XamDataGridThanks
Style="{StaticResource {x:Type igDP:XamDataPresenter}}"
Hello Ken,
Thank you for your feedback.
Additionally if you decide to modify an already existing theme, the resources are in the same folder. In most cases you will also have to include the files I described in the previous post.
If you need more information on this matter, please let me know.
Thanks, Nick! I hadn't even seen that directory there--I was focused on the Themes directory. And knowing which files to concentrate on will help. I'll see what I can do with these.
The XamTreeGrid is from the XamDataPresenter family, so you will need the DataPresenter's resources. They are located in " C:\Program Files (x86)\Infragistics\2017.1\WPF\DefaultStyles\DataPresenter"
You will need :DataPresenterGeneric.xamlDataPresenterGeneric_Brushes.xamlDataPresenterGeneric_Express.xaml
And you can add them in the Application resources:
<Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Themes\DataPresenterGeneric.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary></Application.Resources>