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

Parents
No Data
Reply
  • 27093
    posted

    Hello,

    I have been looking into this issue and though I was able to reproduce it using your style, I am not sure if this is a bug. After all if you follow the instructions provided by the exception there is no problem. I suppose this is a limitation of some sort which, as you cna see, has been noted. What you can do to achieve your goal is set minimum height and width to the content presenter like so:

    <ContentPresenter x:Name="PART_Content" HorizontalAlignment="Center" MinHeight="100" MinWidth ="100"...

     

    Please let me know if you require further assistance on the matter.

     

    Sincerely,

    Petar Monov

    Developer Support Engineer

    Infragistics Bulgaria

    www.infragistics.com/support

     

Children