locked
Metro app. Image scaling doesn't work when changing screen resolution in simulator. RRS feed

  • Question

  • Hello everybody !

    I faced such a problem: I need to load different versions of image when changing screen resolution (aka - scaling).

    I've made everything as it was suggested on number of forums (Microsoft one's as well): named image according to template name.scale-XXX.ext and put it to Asset folder. In XAML code I reference image as <Image Source = "Asset/name.ext">.

    It seems like ok by this time but when I start app on simulator and change screen resolution (f.i. 10.6' to 27') nothing happens. Image of 100% scale is loaded on the screen!

    I've put a breakpoint in the code - I wanted to see what's real value of DisplayProperties.ResolutionScale.

    I found that for any screen resolution and any simulated screen size ResolutionScale is always equal to Scale100.

    Does anybody know what's wrong here ?

    Why screen scaling doesn't work ?

    Thanks in advance !

    Saturday, October 26, 2013 6:14 PM

Answers

  • Did you try all of the 10.6" resolutions? Some of the resolutions are 100% and some are higher scale. I didn't test it (or do the math!), but I suspect the 27" is legitimately 100%.

    --Rob

    Saturday, October 26, 2013 9:37 PM
    Moderator

All replies

  • Did you try all of the 10.6" resolutions? Some of the resolutions are 100% and some are higher scale. I didn't test it (or do the math!), but I suspect the 27" is legitimately 100%.

    --Rob

    Saturday, October 26, 2013 9:37 PM
    Moderator
  • Rob,

    Thank you for your explanation! It makes sense:-) 

    I thought about screen resolution but not about screen itself, I mean size, which in combination with resolution defines scale value.


    Monday, October 28, 2013 9:25 PM