I'm currently having problems trying to use Divelements' free HTMLhost control with the Silverlight Viewbox control. I want the HTMLhost control to automatically scale up/down to fill the available space, which is where the Viewbox comes in. However, when I wrap a Viewbox around the HTMLhost, it prevents the control loading the webpage and doesn't show the HTMLhost control. Any ideas why this is, and how I can solve the problem?
Here's my code:
<Viewbox>
<div:HtmlHost x:Name="webPanel" SourceUri="http://www.google.com" />
</Viewbox>
Alternatively, is there another way of scaling the htmlhost control to the available space, so it doesn't add scrollars?
Don't use a Viewbox
. This makes no sense here, as it is meant to provide the functionality to "stretch" or "shrink" its child element when needed, which would have no effect on an overlayd HTML content anyway.
If the HtmlHost
is implemented correctly, simply doing this should work:
<Grid>
<div:HtmlHost ... />
</Grid>