I am building up a string for the source attribute of some of my images in a Windows 8.1 store app.
I need to detect the scale factor that the device requires so that I can append the correct .scale-n to the end of the string. These image sources are external to the app so I cannot rely on Windows' automatic scaling by just referencing the image without the scale-n part.
So I need to know whether I should append scale-100, scale-140 or scale-180 to the image URL.
How can I work this out in c# and xaml?