Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
665
reporting and PagePresenterStyle
posted

If I use a PagePresenterStyle with the contentPresenter's HorizontalAlignment set to Center the print generates "Unable to print this report section because the content area on the page was too small..."

 

My style code is:

  <Style  x:Key="PagePresenterStyle" TargetType="{x:Type igReporting:ReportPagePresenter}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type igReporting:ReportPagePresenter}">
                        <Border BorderBrush="{TemplateBinding Border.BorderBrush}"
                              BorderThickness="{TemplateBinding Border.BorderThickness}"
                              Background="{TemplateBinding Panel.Background}"
                              SnapsToDevicePixels="True"
                              Padding="{TemplateBinding Padding}">
                            <DockPanel SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                                <ContentPresenter x:Name="PART_Header" ContentSource="Header" DockPanel.Dock="Top"/>
                                <ContentPresenter x:Name="PART_Footer" ContentSource="Footer" DockPanel.Dock="Bottom"/>
                                <ContentPresenter x:Name="PART_Content" HorizontalAlignment="Center" ContentSource="Content" />
                            </DockPanel>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

 

If I don't use the PagePresenterStyle or set HorizontalAlignment to stretch I do get the report.

 

Anyone have an idea?

Thanks