Hallo,
i have a grid with 2 group by Fields. I need a image in the first GroupByRecord-Template. How can i overwrite only the PART_RecordContentSite template for this Element?
Thanks
Jan
Jan,
You can create a ResourceDictionary and set the Source property to a external xaml file.
How can i include the styles from the DataPresenterGeneric_Brushes.xaml without including the complete Xaml-File. Can i include the brushes from a external Assembly?
You could create a simple version of the GroupByRecordPresenter like this one:
<Style TargetType="{x:Type igDP:GroupByRecordPresenter}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type igDP:GroupByRecordPresenter}">
<StackPanel Orientation="Horizontal">
<Image Source="yello.png" Width="30" Height="30"/>
<ContentControl Content="{Binding Path=Description,
RelativeSource={RelativeSource TemplatedParent}}"/>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
However, if you run this most of the functionality of the GroupByRecordPresenter will be lost. You will have no expansion indicator to actually view the records, no summaries, etc. The template also uses elements with specific names - "PART_..." which you will also lose.
There is no way to use (or retemplate explicitly) only part of the template and not the rest of it.
I have found your solution for the columnheaders in this article
http://blogs.infragistics.com/forums/p/13923/108787.aspx
But i need the same way for the groupby-Template. I think, the GroupByPresenterStyle has no LabelPresenterStyle?
The GroupByRecordPresenter-ControlTemplate is very large an very complex. Is there any way to overwrite only the Content in den ContentControl the Grid 'PART_RecordContentSite'?
The current content is:
{Binding Path=Description, RelativeSource={RelativeSource TemplatedParent}}
But i need as content a stackpanel with an image and textblock. Thanks.