Hi, I try to do a dark theme for the xamDataGrid :
Foreground in white and background in black or darkblue, like that :
Do you have a Dark theme to begin mime ?
It seems to take a lot of time :
Rewrite the template for the header/labelPresenter, adding new styles for all properties...
If you don't have a theme for tha how can I do that cleanly (using resource file, ...) ?
Thanks in advance.
Hello,
Thank you for your post. I have been looking into it and I can say that you can use the Theme Property of the XamDataGrid, in order to set a particular theme and if you want to a modify some element here it is explained how to use both Themes and Styles:
http://ko.infragistics.com/community/blogs/andrew_smith/archive/2009/12/09/common-style-issues-when-using-the-theme-property.aspx
Also if you want you can copy all Styles for some theme and modify them. The default Themes are located here:
C:\Program Files (x86)\Infragistics\NetAdvantage 2012.2\WPF\DefaultStyles\DataPresenter folder. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
thanks for your response,
I'll take care of that immediately.
You have to add the ResourceDictionaries to the XamDataGrid's Resources in order to be able to use them along with the Theme.
Hope this helps you.
Hi, that does not work.
I've take the "DataPresenterRoyaleStrong_Brushes.xaml" and I put it in my resource directory and added in the merged dictionaries of my main resource file :
<ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="IgTheme/IG.DataVisualization.xaml"/> <ResourceDictionary Source="IgTheme/DataPresenterRoyaleStrong_Brushes.xaml"/> <ResourceDictionary Source="IgTheme/RDInfragisticsCubeCustom.xaml"/> </ResourceDictionary.MergedDictionaries>
After that I modified the label background :
<LinearGradientBrush x:Key="{ComponentResourceKey {x:Type igDP:XamDataGrid}, LabelBackground}" StartPoint="0,0" EndPoint="0,1" PresentationOptions:Freeze="true" > <GradientStop Color="#FF99C6F2" Offset="0"/> <GradientStop Color="#FF5895E0" Offset="0.484375"/> <GradientStop Color="Red" Offset="0.489258"/> <GradientStop Color="#FF2B55B1" Offset="1"/> </LinearGradientBrush>
And that does not change it on the xamDataGrid.
<igDP:XamDataGrid x:Name="Xdg" DataSource="{Binding Model.FighterDm}" Style="{DynamicResource StyleXdgCube}" Theme="RoyaleStrong" ...
What I've to do if I want that my grid take care of that ?