When I set the html directly through htmlViewer.HtmlCode the scroll bars don't appear, but if I navigate to a website, the scroll bars appears.
Is there any workaround for this?
cheers.
Hi,
I did a research about your problem and found out that there is a bug in IE8 so we will have to use something like a workaround for this issue until Microsoft fix it.
In the next version of the control when you use SourceUri the html content will still be embeded in a DIV element, also the content will be embeded in a second DIV control.
As a workaround for the current version of the control you can put your html code in a DIV element with "overflow:auto;". Also you'll have to specify the Width and Height properties.
Your code should look like this:
hv1.HtmlCode =
"<div style='overflow:auto; width:300px; height:200px;'> a<br/>b<br/>c</div>";
Here the XamWebHtmlViewer has Width=300 and Height = 200;
Regards,
Doychin Dochev
is there any workaround for this?
Hello Valeriano,
You are right. When you use the HtmlCode property the html content is embeded in a DIV html element.
When you use SourceUri the html content is embeded in an IFRAME html element which has a scroll bar.
That behavior will be changed in our next release and the html content will always be embeded in an IFRAME.