title: Uniformly Resizing a Window in XNA
body: <p>Well, I am trying to give my game's window the ability to resize <b>uniformly</b>. I have checked everywhere but I can't seem to find anything about it.</p>
  
  <p>Any ideas?</p>
  
  <p>I can't post the code due to the character limit. It would be much appreciated if someone could please help me out and see  what I am doing wrong :)</p>
  
  <p>Also helpful would be how to resize the backbuffer when this happens, as I don't think the game would be playable with only half the sprites visible :)</p>
  
  <pre><code>   void Window_ClientSizeChanged( object sender, EventArgs e )
     {
         int new_width = graphics.GraphicsDevice.Viewport.Width;
         int new_height = graphics.GraphicsDevice.Viewport.Height;
  
         if (new_width != Variables.SCREEN_WIDTH)
         {
             Variables.SCREEN_HEIGHT = (int)(new_width * ascept_ratio);
             Variables.SCREEN_WIDTH = new_width;
         }
         if (new_height != Variables.SCREEN_HEIGHT)
         {
             Variables.SCREEN_WIDTH = (int)(new_height / ascept_ratio);
             Variables.SCREEN_HEIGHT = new_height;
         }
  
         UpdateParameters();
     }
  </code></pre>
  
  <p>...</p>
  
  <pre><code>   public void UpdateParameters()
     {
         graphics.PreferredBackBufferWidth = Variables.SCREEN_WIDTH;
         graphics.PreferredBackBufferHeight = Variables.SCREEN_HEIGHT;
         graphics.ApplyChanges();
     }
  </code></pre>
  
  <p>Thanks,</p>
  
  <p>Kind Regards, Darestium</p>