Set Zoom RadPrintPreviewDialog

2 posts, 0 answers
  1. Flavio
    Flavio avatar
    22 posts
    Member since:
    Jan 2011

    Posted 20 Feb 2015 Link to this post

    Hi!
    I need to set the RadPrintPreviewDialog Zoom in 100 %, is it possibile?
    Tks.
    Maia.
  2. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 25 Feb 2015 Link to this post

    Hello Flavio,

    Thank you for writing.

    In order to achieve your goal, you can use the SetZoom method of the RadPrintPreviewDialog. Here is a sample code snippet demonstrating how to accomplish it with a custom RadGridView:
    public class Grid : RadGridView
    {
        public override string ThemeClassName
        {
            get
            {
                return typeof(RadGridView).FullName;
            }
        }
         
        public override void PrintPreview(RadPrintDocument document)
        {
            if (document != null)
            {
                document.AssociatedObject = this;
                RadPrintPreviewDialog dialog = new RadPrintPreviewDialog(document);
                dialog.SetZoom(1);
                dialog.ThemeName = this.ThemeName;
                dialog.ShowDialog();
            }
        }
    }

    I hope this information helps. Should you have further questions, I would be glad to help.
     
    Regards,
    Dess
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top