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
260
Chart is not scaled to page size when printing
posted

I am using a composite chart which I show in the UltraPrintViewDialog. In the Print sample from the SamplesExplorer the chart is automatically nicely scaled to use the entire page.

The left preview is my application, the two red arrows indicate the wrong space.
The right preview is from the print sample.

When I try to achieve the same from my application, the chart is not scaled. The size in the print preview changes when I change the size of the form. In the sample explorer the size of the chart in the preview does not change when the form size changes.

I compiled  the sample on my PC. I use pretty much the same code as in the sample:

 

private void InitializeComponent()
{
    this.preview = new Infragistics.Win.Printing.UltraPrintPreviewDialog(this.components);
    this.preview.Name = "preview";
    this.preview.PreviewSettings.ZoomMode = Infragistics.Win.Printing.ZoomMode.WholePage;
    this.preview.ThumbnailAreaVisible = false;
}

public void PrintPreview()
{
    preview.Document = chart.PrintDocument;
    preview.ShowDialog();
}

 

Any ideas what could cause the behaviour would be greatly appreciated.