Silverlight / WPF - Problems with placing a iframe inside a child window in silverlight
Asked By gopal krish on 24-Sep-12 09:30 AM
hi..
i pro-grammatically created a iframe in my child window of silver-light application.
now i try to call my child window and its open with empty.
the iframe is not loading.
below is my code:
System.Windows.Browser.HtmlElement iframe;
iframe = HtmlPage.Document.CreateElement("iframe");
iframe.Id = "invisibleIframe";
iframe.SetProperty("src", "http://ilabs.uw.edu/sites/default/files/sample_0.pdf");
iframe.SetStyleAttribute("width", "800");
iframe.SetStyleAttribute("height", "600");
iframe.SetAttribute("onload", "contentLoaded"); // call a function which calls silverlight.Content.Page.Loaded()
HtmlElement body = (HtmlElement)HtmlPage.Document.GetElementsByTagName("body")[0];
body.AppendChild(iframe);
how to tackle this issue..
need ur suggestions..
regards
gopal.s
Robbe Morris replied to gopal krish on 24-Sep-12 10:20 AM
Is your Silverlight application running in "windowless" mode? As I recall, you'll need to accept the performance hit of this in order for the browser to render your iframe on top of your silverlight user interface.