Note that there are some explanatory texts on larger screens.

plurals
  1. POWindowsless property is not working in Firefox ONLY
    text
    copied!<p>I have created a simple silverlight application to display some text at realtime from xml. The text display using HTML DIV tag. I have added plugin property windowless=true, enablehtmlaccess=true,background=transparent.</p> <p>On Silverlight I have added a Button "<strong>Continue</strong>" at Top &amp; Bottom, which shows some message on that click. </p> <p>Silverlight Plugin resize based in XML contents.</p> <p><strong>My code :</strong> </p> <p>MainPage.xaml: </p> <pre><code>&lt;Grid x:Name="LayoutRoot"&gt; &lt;StackPanel HorizontalAlignment="Right" VerticalAlignment="Top"&gt; &lt;Button x:Name="topContinue" Content="Continue" Margin="0,30,30,0" Click="Continue_Click"&gt;&lt;/Button&gt; &lt;/StackPanel&gt; &lt;StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom"&gt; &lt;Button x:Name="bottomContinue" Content="Continue" Margin="0,0,30,30" Click="Continue_Click"&gt;&lt;/Button&gt; &lt;/StackPanel&gt; &lt;/Grid&gt; </code></pre> <p>MainPage.xaml.cs: </p> <p><strong>Creating HTML DIV on Application Start using :</strong></p> <pre><code>HtmlDocument _document = HtmlPage.Document; HtmlElement iDIV = _document.CreateElement("DIV"); iDIV.SetAttribute("id", "divHTMLViewer"); iDIV.SetStyleAttribute("position", "absolute"); iDIV.SetStyleAttribute("z-index", "1"); iDIV.SetStyleAttribute("display", "INLINE"); iDIV.SetStyleAttribute("top", "100px"); iDIV.SetStyleAttribute("height", "0px"); iDIV.SetStyleAttribute("width", "96%"); iDIV.SetStyleAttribute("left", "15px"); iDIV.SetStyleAttribute("text-align", "justify"); HtmlElement body = _document.GetElementsByTagName("BODY")[0] as HtmlElement; body.RemoveChild(iDIV); body.AppendChild(iDIV); </code></pre> <p><strong>Set the XML text :</strong></p> <pre><code>HtmlElement divHTMLViewer = HtmlPage.Document.GetElementById("divHTMLViewer"); sText = sText.Replace("&amp;lt;", "&lt;").Replace("&amp;gt;", "&gt;"); divHTMLViewer.SetStyleAttribute("display", "none"); divHTMLViewer.SetStyleAttribute("width", "96%"); divHTMLViewer.SetStyleAttribute("top", "100px"); divHTMLViewer.SetStyleAttribute("left", "15px"); divHTMLViewer.RemoveStyleAttribute("color"); divHTMLViewer.RemoveStyleAttribute("fontSize"); divHTMLViewer.SetProperty("innerHTML", sText); divHTMLViewer.SetStyleAttribute("display", "INLINE"); setSilverlightControlHeight(UILAYOUT.INSTRUCTIONS); </code></pre> <p><strong>Silverlight Plugin size increase code :</strong></p> <pre><code>isilverlightControlHost.SetStyleAttribute("height", HtmlPage.Window.Eval("document.documentElement.scrollHeight").ToString() + "px"); isilverlightControlHost.SetStyleAttribute("position", "absolute"); </code></pre> <p>All these code is working fine in Internet Explorer, Crome &amp; Safari but "<strong>Continue</strong>" not visible in FIREFOX ONLY. </p> <p>So is there any issue with this code ?</p> <p>Code Sample :<a href="http://lm-bucket-for-forum-post.s3.amazonaws.com/HtMLViewerSilverLight.zip" rel="nofollow noreferrer">http://lm-bucket-for-forum-post.s3.amazonaws.com/HtMLViewerSilverLight.zip</a></p> <p>working sample : Just replace ".zip" with "TestPage.html" in above URL.</p> <p>Please let me know how can I solve it ?</p> <p>Thanks in advance, Laxmilal Menaria</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload