We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to display the Editcontrol content in MS Print Preview control?

Platform: WinForms |
Control: EditControl |
.NET Framework: 3.5 |
Product Version:

In EditControl, the PrintDocument property is used to display the contents of EditControl and it can be assigned to MS PrintPreviewControl by using its property named “Document”. And this Document can be displayed by using the function named ShowDialog. The following code example is to demonstrate the same.


//Object creation.
Form PrintForm = new Form();
//Add print preview controls to Form.
//Assign EditControl print document to PrintPreview control.
this.printPreviewControl1.Document = this.Editcontrol.PrintDocument;
//To show print dialog.
//To show the Edit control print preview dialog.


'Object creation.
Private PrintForm As New Form()
'Add print preview controls to Form.
'Assign EditControl print document to PrintPreview control.
Me.printPreviewControl1.Document = Me.Editcontrol.PrintDocument
'To show print dialog.
'To show the Edit control print preview dialog.


Showing print preview of editor control content

Sample:  https://www.syncfusion.com/downloads/support/directtrac/general/EditControl_PrintPreview-240270914.zip

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile