Hi,
I just wanted to embed the new WebHtmlViewer. It works fine for website (when I provide a uri), but not for own HtmlCode.
Attached is my very simple project. It shows a webpage and if the button is clicked, the page should be replaced by the html code:
private void Button_Click(object sender, System.Windows.RoutedEventArgs e) { htmlViewer.SourceUri=null; htmlViewer.HtmlCode =snippet.Text ; }
This is more or less the sample code, but it does not work. The browser control reacts, but only wents blank.
The ineressting thing is, that on the same machine the sample is working (HTMLViewer - Interaction). What I have seen is, that the dll which are in the bin directories of the installation (C:\Program Files\Infragistics\NetAdvantage 2009.2\Silverlight\Bin) are not the same as the ones of the samples (C:\Documents and Settings\All Users\Documents\Infragistics\NetAdvantage 2009.2\Silverlight\Samples\SamplesBrowser\SamplesBrowser.Samples.LOB\bin).
And If I open both projects in Blend, the Webbrowser controls have different properties! (see Samples.jpg and SilverlightApplication3.jpg).
Thank you
Manuel
Hi huynhqu,
Yes, there are many disadvantages when we use windowless=true, they are explained in the MSDN in details.
You are right about the weird behavior of the browser when we set windowless=true/false.
In my opinion, the fact that you can use the XamHtmlViewer without setting windowless=true is a Microsoft's bug. So you can't rely on this opportunity.
What will happen if you create a Silverlight application without windowless=true relying on the bug and lately Microsoft fix this issue? Your site will stop working.
My suggestion is that you have to use windowless=true.
Regards, Doychin Dochev
I've noticed that i don't actually need to set windowless to true if i want to display htmlcode where the html block contains an object tag.
I was able to leave windowless to false and have html such as <table><tr><td><object ... /></td></tr></table> where my object tag was embedded real media video and everything worked fine.
Setting the sourceuri to a specific url works aswell, i don't need to set param windowless=true.
In fact, the only time that i've needed to set windowless=true was displaying other html tags. eg. <h1>test</h1> etc. etc.
i'm using library 2010.1, under VS 2010 in a silverlight 4 application running on ie 7.
Could i get more clairifcation on why some instances work and others don't, there are some pretty big penalties in running in windowless mode that aren't really explored in the infragistics documentation.
From the msdn docs, setting windowless is the only way to overlay html on top of the silverlight application, but if i can get it to work using an object tag, or sourceuri, something must be going on?
Thanks.
Hi Manuel,
I've took a look at the sample that you've attached.
In order to work properly the xamWebHtmlViewer requires the Windowless parameter of the Silverlight plug-in to be set to True.
You can read more about the windowless parameter here:http://msdn.microsoft.com/en-us/library/cc838156(VS.95).aspx
and more about the xamWebHtmlViewer in our documentation:http://help.infragistics.com/Help/NetAdvantage/Silverlight/2009.2/CLR3.5/html/xamWebHtmlViewer.html
Regards