Screen resolution

Role

An application should be able to be displayed on different screen resolutions. The framework offers a mechanism to automatically adapt your application resolution.

Expected use

You’ll simply have to declare the resolution in the profile in you app.config.x.json:

{
    "default":{
        "resolution":{
            "name": "720p",
            "width": 1280,
            "height": 720
        }
    },

    "myProfile":{
        "resolution":{
            "name": "1080p",
            "width": 1920,
            "height": 1080
        }
    }
}

Caution

When you use a specific profile with a different declared resolution, the following happen:

  • a ratio is defined by considering the target profile resolution width and default resolution width
  • the ratio is applied to all pixel value properties