how to set RTF from WinForms to WPF RichTextBox
how to set RTF from WinForms to WPF RichTextBox
.
(Not by TextRange.Load()
).
I have a string variable which has rtf text. I want to s开发者_运维知识库et this variable to wpf ritch text box.
I got the solution.
MemoryStream stream = new MemoryStream(ASCIIEncoding.Default.GetBytes(text));
ritchTextBox.Selection.Load(stream, DataFormats.Rtf);
精彩评论