Version

PagePresenterStyle Property (ReportSection)

Gets or sets the style for the ReportPagePresenter
Syntax
'Declaration
 
Public Property PagePresenterStyle As Style
public Style PagePresenterStyle {get; set;}
Remarks

Note: this property takes precedence over the setting on the ReportBase's ReportBase.PagePresenterStyle.

Example
The example below shows how to set different style of ReportPagePresenter. The example reorder the page layout as set a header on left side, a footer on right side and content between them.

Now apply the style to page layout
Private Sub SetPresenterStyle()
    Dim reportObj As New Report()
    Dim section As New EmbeddedVisualReportSection(XamDataGrid1)
    
    ' apply keyed style to page layout
    section.PagePresenterStyle = TryCast(root.TryFindResource("PagePresenterStyle"), Style)
    reportObj.Sections.Add(section)
    
    reportObj.Print(False)
End Sub
Now apply the style to page layout
private void SetPresenterStyle()
{
	Report reportObj = new Report();
	EmbeddedVisualReportSection section = new EmbeddedVisualReportSection(XamDataGrid1);

	// apply keyed style to page layout
	section.PagePresenterStyle = root.TryFindResource("PagePresenterStyle") as Style;
	reportObj.Sections.Add(section);

	reportObj.Print(false);
}
<Page  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
xmlns:igRep="http://infragistics.com/Reporting"  

>
<Page.Resources>

        <Style x:Key="P
agePresenterStyle" TargetType="{x:Type igRep:ReportPagePresenter}">
            <Setter Property="
Template">
                <Setter.Value>

                    
<ControlTemplate TargetType="{x:Type igRep:ReportPagePresenter}">
                        <DockPanel>
                            <StackPanel DockPanel.Dock="Top">
                                <Image Source="../../images\HeaderPic.png"/>
                            </StackPanel>
                            <Grid DockPanel.Dock="Left">
                                <Ellipse Margin="10,0,0,0" Width="50" Stroke="#FFC
FD0E6">
                                    <Ellipse.Fill>

                                        
<RadialGradientBrush SpreadMethod="Pad">
                                            <GradientStop Color="#FF10579D" Offset="0.103"/>
                                            <GradientStop Color="#FFDEE5EE" Offset="1"/>
                                        </R
adialGradientBrush>
                                    </Ellipse.Fill>
                                </Ellipse>

                                <Label Foreground="Beige" Margin="10,0,0,0" Height="50"  Content="{TemplateBinding PhysicalPageNumber}" Padding="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />

                            
</Grid>
                            
<Grid DockPanel.Dock="Right">
                                
<Image VerticalAlignment="Center" Stretch="None" Source="../../images\misc\forward.png"/>
                            
</Grid>
                            
<Grid>
                                
<ContentPresenter x:Name="PART_Content" ContentSource="Content"/>
                            
</Grid>
                        
</DockPanel>
                    
</ControlTemplate>
                
</Setter.Value>
            
</Setter>
        
</Style>

        
</Page.Resources>
</Page>
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also