none
Page resizing in Silverlight 2.0

    Question

  • Can not resolve the problem with page resizing in Silverlight 2.0.

    Following solution does not help:

    Application.Current.Host.Content.Resized += new EventHandler(Content_Resized);

    Visual Studio throws the next:

    'System.Windows.Interop.SilverlightHost' does not contain a definition for 'Resized' and no extension method 'Resized' accepting a first argument of type 'System.Windows.Interop.SilverlightHost' could be found (are you missing a using directive or an assembly reference?) C:\...

    and

    The name 'Content_Resized' does not exist in the current context C:\...

    Will be grateful for any possible suggestions!

    Thanks in advance.

    Tuesday, April 01, 2008 10:02 AM

Answers

  • Hi, thanks for responce. Solution for page resizing has been found by means of addition some code to Page.xaml.cs and Page.xaml, so now application shrinks according to browser window size.

    Regards

    Thursday, April 03, 2008 4:10 AM

All replies

  • Hi:

      Could you test it in a new project? I cannot reproduce it.

    Regards

    Thursday, April 03, 2008 1:34 AM
  • Hi, thanks for responce. Solution for page resizing has been found by means of addition some code to Page.xaml.cs and Page.xaml, so now application shrinks according to browser window size.

    Regards

    Thursday, April 03, 2008 4:10 AM
  • hey .......anybody  knows how the page resizing can be done with silverlight 1.0..............or 2.0

    For example www.silverlight.net/fox website..............they have done some magic there..........

    All the content including text will get resize................anybody have the code for above site.....that will great help................realy ....i am stuck in my project with this issue

    Thursday, April 03, 2008 5:30 AM
  • Hi, follow this link: http://silverlight.net/community/gallerydetail.aspx?cat=5, and you can find Silverlight Airlines Sample, try to download the code. That was as an inspiration in our case. Try to have a look at Page.xaml and Page.xaml.cs files in the solution...It was also the issue for our project...

    Good luck

    Thursday, April 03, 2008 5:49 AM