I 've got this working with the following:
Add the following javascript to the page with your silverlight object:
function ResizeObject(height) {
var host = document.getElementById("silverlightControlHost");
host.style.height = height + "px";
}
Add the following to your silverlight codebehind:
public MainPage()
{
InitializeComponent();
this.Loaded += new RoutedEventHandler(Page_Loaded);
this.yourRootElement.LayoutUpdated += new EventHandler(LayoutRoot_LayoutUpdated);
}
private void LayoutRoot_LayoutUpdated(object sender, EventArgs e)
{
HtmlPage.Window.Invoke("ResizeObject", new object[] { this.yourRootElement.RenderSize.Height });
}
Note that "ResizeObject" refers to the javascript function on your webpage.