This is a migrated thread and some comments may be shown as answers.

Image not shown

0 Answers 28 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Brew Hutch
Top achievements
Rank 1
Brew Hutch asked on 18 Sep 2013, 09:40 PM
Hi,
I'm trying to convert the HTML format that has an image to the RTF format:
I use the following codes to get a string of RTF and then bind it

Dim content  As String = "<img src='c:\image1.png'/>"
Dim htmlProvider As New HtmlFormatProvider()  
Dim raddoc As RadDocument = htmlProvider.Import(content)
Dim rtfProvider As New RtfFormatProvider()
Dim rtf As String = rtfProvider.Export(raddoc)

XMAL 
<telerikRTF:RtfDataProvider Rtf="{Binding rtf}" RichTextBox="{Binding ElementName=rrtb}" />
<telerik:RadRichTextBox Grid.Row="1" Name="rrtb" />
Note the xmal code is referred from this thread http://www.telerik.com/community/forums/wpf/richtextbox/create-an-instance-of-richtextbox.aspx

So what I get when running the application is the red X image (see attached file).
Could you please advise or give me basic sample of code to address this problem?

Thanks,
Brew

No answers yet. Maybe you can help?

Tags
RichTextBox
Asked by
Brew Hutch
Top achievements
Rank 1
Share this question
or