How to show a text field in WPF exactly the same as in Windows Forms

 Sometimes you may need to show a text field in the WPF viewer exactly the same as in Windows Forms. It may be useful if you have to implement some functionality not supported by WPF text fields or if you don't like the final layout of the elements in WPF.

In this case it is possible to render the text field as an image and show this image in the WPF report viewer. To do this, add the following code to the GenerateScript of the text field:

textBox3.ExportAsPictureInXaml = true;

Add Feedback