My app needs to run on Android, iOS and WinPhone 8.1. It needs to have a page with a long text that include a lot of format:
bold
bullet list
link (http, mail, phone)
Because it has to run on all 3 platforms, I tried to create an HTML string in order to send it to a WebView like this :
MyWebView.Source = new HtmlWebViewSource {Html = stringHtml };
So I can use <b>
for bolds, <ul>
for bullet lists, <a>
for links.
Because I need also a custom font and specific size, in my html string there is a new style with all these the informations.
It works.... but with 2 problems on Windows Phone:
Any idea about these problems?
And if there's another solution different from WebView... it's welcome!
Xamarin.Forms includes a FormattedText property in the Label (this guide should help you to understand it: Xamarin.Forms FormattedText ). But there are some things you want to do that can't be done with it, and these are:
The rest of what you want (bold, italic, color changes, etc.) FormattedText has.
Hope it helps! :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.