I have a .rtf file and want to put it in a richtextbox in silverlight 4. Unfortunately we do not have .rtf property in silverlight 4 richtextbox, we only have .xaml.
So what i did is to create a FlowDocument, than load the .rtf to this FlowDocument, then format it to xaml. then assigned it to richtextbox. But i got a argumentexception.
How to import a .rtf file to silverlight 4 richtextbox?
Thanks!
I used an ugly solution so far, use a FlowDocument to change the format from rtf to xaml. Then remove the attributes not accepted in SL4 richtext box, codes like below. It works but I hate it.
I want to know is there a better solution.