Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on simple game using WPF/C#, and I am wondering what is the best practice to resize the game (views, assets…) when user re-sizes the game window? Is it good practice to use the ViewBox control for this job?

share|improve this question
Could you add some information about how your assets are currently represented and handled? – Josh Petrie Feb 8 '11 at 7:39
@josh The assets are very simple, user controls contain star-shape(s) with some animations –using storyboards- and I use canvas to contain these assets, during the game-play the assets move inside the canvas and do some actions/animations. Also, and as usual, I have other canvas for game option and game score and so on... – Robin-Hood Feb 8 '11 at 9:07
up vote 2 down vote accepted

This depends on the size you designed you application at and what resolutions you want to support, I've played with using a ScaleTransform to try getting my 800x600 app down to a smaller size for the windows phone 7 (I ran into other problems while converting my silverlight app to the windows phone 7 sdk so I gave up, but the scaling worked pretty nicely).

Mike Snow has a very good article on how to do this along with hooking up to the Content_Resized event in your Page: Silverlight Tip of the Day #33: How to Scale your entire App and its Elements to your Browsers Size

You do want to be careful since scaling your app down too small will make certain elements like text too small to read and unusable.

share|improve this answer
Thanks, Accepted... – Robin-Hood Feb 28 '11 at 8:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.