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?

  • \$\begingroup\$ Could you add some information about how your assets are currently represented and handled? \$\endgroup\$
    – user1430
    Commented Feb 8, 2011 at 7:39
  • \$\begingroup\$ @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... \$\endgroup\$
    – Robin-Hood
    Commented Feb 8, 2011 at 9:07

1 Answer 1


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.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .