1

I have been searching and searching and can't seem to find a solution. Is there a word wrap property for Webviews? Specifically in Universal Windows Applications.

This is my webview:

<WebView x:Name="body" 
  Visibility="Visible" 
  RelativePanel.Below="mySymbol"
  RelativePanel.AlignLeftWithPanel="True"
  RelativePanel.AlignRightWithPanel="True"
  DefaultBackgroundColor="LightGray"
  Height="300" 
  Width="1800"
  Margin="-5,80"/>

I am hoping there is something equivalent to TextWrapping="Wrap" like I would use in a TextBlock....

Does anyone have any suggestions or work arounds?

2 Answers 2

1

The wrapping of text displayed in a WebView will be dependent upon the HTML that is loaded in it as much as the properties (size) and visual tree of the WebView itself.

2
  • Yeah, The HTML is correct. I just had my Webview lying in a RelativePanel which seemed to neglect some of the properties of the WebView
    – Code
    Commented Jan 28, 2016 at 16:45
  • @code for future reference - when there are multiple factors that could be impacting what you're seeing, it can help if you can include a complete repro in your question. In your instance the issue could have been the webview, the rest of the page it is in or the html it displays. Providing more details in your question will help you get a good answer faster.
    – Matt Lacey
    Commented Jan 29, 2016 at 11:08
0

I was able to find out the issue. I had my WebView inside of a RelativePanel... That looks like it keeps the WebView from text wrapping.

Along with setting the width and the height to auto

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.