Search This Blog

Tuesday, January 15, 2013

Set Landscape to PrintPreviewDialog C#

C# > PrintPreviewDialog > LandScape

C# Code


PrintPreviewDialog dialog = new PrintPreviewDialog();
dialog.Document.DefaultPageSettings.Landscape = true;
dialog.ShowDialog();
 
VB.NET
Dim dialog As New PrintPreviewDialog
Dim RadPrintDocument1 As New RadPrintDocument
RadPrintDocument1.AssociatedObject = Me.Grid
dialog.Document = RadPrintDocument1
dialog.Document.DefaultPageSettings.Landscape = True
dialog.ShowDialog()