OK, this is pretty simple, but I thought I would post if (at the very least for my reference).
Problem: How do I make the Silverlight application the size of my browser?
Solution:
- Add this line to the Page_Loaded event
BrowserHost.Resize += new EventHandler(BrowserHost_Resize); - Add this to the code behind file
void BrowserHost_Resize(object sender, EventArgs e)
{
Width = BrowserHost.ActualWidth;
Height = BrowserHost.ActualHeight;
} - (You may not have to do this step, but just in case) Comment out the CSS in the root html page
/*.silverlightHost { width: 640px; height: 480px; } */
NOTE: this is for Silverlight 1.1



October 24th, 2007 at 4:00 pm
SilverLight Search Engine
http://www.google.com/coop/cse?cx=006422944775554126616%3Apiljwfxcemo
January 30th, 2008 at 9:34 am
Very simple, very fine