auto I is working on a Silverlight 4 application which is embedded within an ASP.NET web application. Silverlight control changes in height, and in many cases, from the bottom of the screen is standing.
The most browsers (especially no problem for IE 8, Chrome, Firefox), because they add a vertical scroll HTML document time, however, IE 7 does not show the scroll bars , making the whole Silverlight control impossible to see. How do I embedded this code snippet: Only relevant CSS: I 'overflow: auto and margin / padding style properties (which also displays a scroll bar, but not actually scroll at all?) Have tried to add on Setting Fixed Size How do any gurus on IE 7 consider this idea as restraining? Thank you. Dave, What is sometimes useful to add the following styles: UPDATE Anything that can be helpful, Silverlight is changing the size of the silver inside the host
... & lt; Div id = "silverlightcontrolhost" & gt; & Lt; Object Data = "Data: App / X-Silverlight-2," Type = "App / X-Relill-2" height = "100%" width = "100%" & gt; & Lt; Ultimate name = "source" value = "MyApp.xap" /> & Lt; Param name = "onError" value = "onSilverlight error" /> & Lt; Param name = "background" value = "white" /> & Lt; Param name = "minRuntimeVersion" value = "4.0.41108.0" /> & Lt; Param name = "auto upgrade" value = "true" /> & Lt; / Object & gt; ...
# Silverlight ControllHost {height: 100%; Text align: center; }
& lt; Object & gt; , which keep in mind is not working, page after Laud time vary the height of the control (height varying between Silverlight control switching Velugyuyls).
& lt; Style type = "text / css" & gt; Html, body {height: 100%; Overflow: Auto; Body {padding: 0; Margin: 0; } #silverlightControlHost {altitude: 100%; Text-align: center; } & Lt; / Style & gt;
styles for HTML, body are the most important ones here.
div This code example has been found, you can add it to your resizing event.
Dispatcher.BeginInvoke ((=) => {double height = this.RenderSize.Highight; double width = this .RenderSize.Width; // SilverlightControlHost is a div, with silverware set object HtmlPage.Document.GetElementById ( "SilverlightControlHost"). Startlait feature ( "width", height. ToString () + "px"); HtmlPage.Document.GetElementById ( "SilverlightControlHost"). SetStyleAttribute ( "height", width .toString () + "px");});
Comments
Post a Comment