I have some difficulties with the summary in the xamdatagrid. What is the style for the row? Is it the SummaryRecordPresenter?
My style is the above ( a two line border on top)
!--<Style TargetType="{x:Type igWPF:SummaryRecordPresenter}"> <Setter Property="Background" Value="{DynamicResource SummaryRowBackgroundBrush}"/> <Setter Property="Foreground" Value="{DynamicResource summaryCellForegroundBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource summaryCellBorderBrush}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igWPF:SummaryRecordPresenter}"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" Margin="0,1,0,0"> </Border> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style>-->
The summary cell style is SummaryResultPresenter. I want to use two differrent right border thickness like the one i have on the cells (see the image) how can i achive this?
(I use unbound fields to hold the fields, and the LabelPresenterStyle is either a style with thin right border or a style with thick border if the field is the last one)
Hello George,
Thank you for your post!
You are correct that the SummaryRecordPresenter is the style for the full summary row, but to achieve your requirement, I would recommend styling the SummaryResultsPresenter for the cell-specific borders, and also that you implement the default style for the SummaryRecordContentArea. The default style for the SummaryRecordContentArea can commonly be found in the DataPresenterGeneric_Express.xaml file at the following directory: C:\Program Files (x86)\Infragistics\<your version here>\WPF\DefaultStyles\DataPresenter.
The reason that I would recommend implementing both of these styles is because the SummaryResultsPresenter style will only go into effect when a summary is applied to a particular field. If you write a style for this with border brush and border thickness setters, you can have a vertical border around the cells for your summaries for the fields that have summaries applied to them. The SummaryRecordContentArea represents the area where the content is, whereas the SummaryRecordPresenter would put a border at the very end of the summary row. In the default style for the SummaryRecordContentArea, there is a Border as the first element of its Template. If you give this border a border thickness and a border brush, you will see it appear around the summary area.
I have attached a sample project to demonstrate the above.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Thank you very much, the SummaryRecordContentArea works as i want it. I am using 7 XamDataGrids is it possible somehow not to add the styles in xamDatagrid resources? I tried to put them in App.xaml but i does not work a have to put the same styles 7 times. Thanks.
I can't say that I can reproduce this behavior you are seeing, because when I place the styles in the App.xaml file, the XamDataGrids in my application have those styles applied to them. Another thing you could do is add a ResourceDictionary file to your application and place these styles within that, then merge that resource dictionary into your project via ResourceDictionary.MergedDictionaries in the Resources section of a particular part of your application, such as the App.xaml file.
I don't really know the layout of your application here though, so I may not be correct with my recommendations. Would it be possible for you to please provide some more detail regarding the layout of your application, as I am unsure why placing these styles the App.xaml resources would not take effect on your grids?
My bad, I was using the same key for some other 3party control styles. Now works fine, thanks!