Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting a WebView to Auto Height in Windows Store Apps / Metro XAML

If I put a TextBlock in a ListView it expands the ListView to the length of the text. However, a WebView does not do the same.

Is there anyway to get a WebView to stretch its parent element? Is it something which has to be done after the content has loaded?

like image 421
roryok Avatar asked Dec 06 '25 01:12

roryok


1 Answers

Like the Canvas element, the Webview does not stretch to accommodate its contents. You will need to either set an absolute size on your WebView or find some other way to set its size that doesn't depend on its contents.

like image 106
N_A Avatar answered Dec 09 '25 09:12

N_A



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!