question

Madhu-8808 avatar image
0 Votes"
Madhu-8808 asked ·

UWP - show html data

Hi,

In our UWP app we need to show data in different places which are html content. Currently we are using web views to do that. But with that we are getting different issue when it comes to aligning things. So would prefer if we can use uwp controls to do that. Is RichTextBlock is the only option to do that? There are also can't we bind data to RichTextBlock from code behind? https://stackoverflow.com/questions/34736434/set-text-to-the-richtextblock-in-code-behind

Can you please share, what options we have to do that and if there are any samples we can find.

Thanks
Madhu

windows-uwpwindows-uwp-xaml
· 4
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

What's mean of But with that we are getting different issue when it comes to aligning things. In general we could use WebViewBrush to get the webview content then set it the Rectangle control. For more please refer this document.


0 Votes 0 ·

Any updates about your issue? Have you solved your issue?

0 Votes 0 ·

@RoyLi-MSFT @NicoZhu-MSFT sorry I missed your reply. By alignment issues, I meant things like for example if we want to show a title with web view and if it's too long we want t o show 3 dots at the end, we couldn't do it with web view. And also when there are many web views shown as a list it take some time to load that content and there is a refresh like thing happening when the web view data loads etc..

0 Votes 0 ·

For your requirement, you could try to use HTML style: word-break: break-all; to the p tag. It will force the long text wrapped.

0 Votes 0 ·

0 Answers