Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.74 KB

how-to-save-load-and-print-richtextbox-content.md

File metadata and controls

38 lines (29 loc) · 1.74 KB
title ms.date ms.custom description dev_langs helpviewer_keywords ms.assetid
How to: Save, Load, and Print RichTextBox Content
03/30/2017
devdivchpfy22
Learn how to Save, Load, and Print RichTextBox content.
csharp
vb
saving RichTextBox controls [WPF]
printing RichTextBox controls [WPF]
loading RichTextBox controls [WPF]
RichTextBox control [WPF], saving
RichTextBox control [WPF], printing
RichTextBox control [WPF], loading
ffb113d3-c68a-47ca-8ac0-882283f38326

How to: Save, Load, and Print RichTextBox Content

The following example shows how to save content of a xref:System.Windows.Controls.RichTextBox to a file, load that content back into the xref:System.Windows.Controls.RichTextBox, and print the contents.

Markup for Save, Load, and Print RichTextBox Content

Below is the markup for the example.

[!code-xamlRichTextBoxMiscSnippets_snip#SaveLoadPrintRTBExampleWholePage]

Code for Save, Load, and Print RichTextBox Content

Below is the code behind for the example.

[!code-csharpRichTextBoxMiscSnippets_snip#SaveLoadPrintRTBCodeExampleWholePage] [!code-vbRichTextBoxMiscSnippets_snip#SaveLoadPrintRTBCodeExampleWholePage]

See also