Hello,
I have a simple question that I cant seem to find the answer for..
I have a richtextdocument but how do I get the rtf document from that, I dont want to export to a file I just want the data to store against a variable.
I also need to be able to read the rtf document into the XamRichTextEditor control
Something along the lines of:
RichTextDocument Document { get; set; }
..
// getting the rtf document
string rtf = Document.Rtf.Value; // or whatever it is so I can get the rft
// loading the rtf into the document
Document = rtf;
Thanks, Grant
I found the answer, by using the RtfDocumentAdapter class.
<ig:RtfDocumentAdapter Document="{Binding ElementName=RichTextEditor, Path=Document}" Value="{Binding RichText}" RefreshTrigger="ContentChanged" /> <ig:XamRichTextEditor Grid.Column="0" Grid.Row="1" Name="RichTextEditor" BorderBrush="DarkGray" BorderThickness="1" > <ig:XamRichTextEditor.ClipboardSerializationProviders> <ig:RtfSerializationProvider /> </ig:XamRichTextEditor.ClipboardSerializationProviders> </ig:XamRichTextEditor>