Is it possible to have url reference of an image in xaml like html?
I am working on RichTextBox in WPF and开发者_Go百科 i would like to know if i can have url references something like we have in html
<img src="http://AnyWebsite.com/example.png" />
in xaml ( which i will be converting to rtf and storing it into the DB )
Thank you for your help!
It's possible.
Based on your comment I am editing my earlier answer. This link will help you achieve what you want, you will need to create a custom converter class.
http://blog.davidsandor.com/post/2010/05/12/How-To-WPF-Databind-a-URL-URI-to-an-Image-control.aspx
I would recommend using FlowDocument instead of RichTextBox in this case as you want to display images and text togather.
For details you may refer to the article in msdn
精彩评论