Monday, April 30, 2012 10:56 AM
New to Silverlight so sorry if this is a newbie question.
I have a SL5 OOB app and I am showing a WebBrowser control in a popup window. The WebBrowser is in a grid cell and all I want to do is have the WebBrowser entirely fill the cell. When I specify the height/width, everything works OK but it just doesn't look like I want it to.
I've tried different layout controls but they don't seem to make much difference. I've also tried handling the SizeChanged event and force the WebBrowser size to the size of the grid minus a little for margin, but that just causes the app to crash. I couldn't trap the system exception, so I don't know why.
I've heard the WebBrowser is not your standard SL control and has some quirks. Any suggestions will be greatly appreciated.
Wednesday, May 02, 2012 5:17 AM
When control is not given fixed Width or Height, they will auto fit its container.
So please just leave WebBrowser's Width and Height blank and check to see if it is what you want.
Thursday, May 03, 2012 2:19 AM
U have to specify the width and height some where only once better u specify height and width for ur outer grid the set the webbrowser control height and width auto , it will take the height and width of ur grid .
Hope it will help u