I am trying to convert rtf text in XAML by following code
TextRange textRange = new TextRange(richTextBox1.Document.ContentStart, richTextBox1.Document.ContentEnd);
MemoryStream ms = new MemoryStream();
textRange.Save(ms, System.Windows.DataFormats.Xaml);
string str = UTF32Encoding.Default.GetString(ms.ToArray());
ms.Close();
This code successfully converts rtf to XAML.
But My problem is that XAML text str loosing image which is inside richTextBox1.
TextRange textRange = new TextRange(richTextBox1.Document.ContentStart, richTextBox1.Document.ContentEnd);
MemoryStream ms = new MemoryStream();
textRange.Save(ms, System.Windows.DataFormats.Xaml);
string str = UTF32Encoding.Default.GetString(ms.ToArray());
ms.Close();
This code successfully converts rtf to XAML.
But My problem is that XAML text str loosing image which is inside richTextBox1.