I am developing Windows 8.1 Application, currently I am, struggling with getting the actual screen size in inches or any other measurement unit.
Is it possible to get that information?
I am developing Windows 8.1 Application, currently I am, struggling with getting the actual screen size in inches or any other measurement unit.
Is it possible to get that information?
var bounds = Window.Current.Bounds;
double w = bounds.Width;
double h = bounds.Height;
switch (DisplayProperties.ResolutionScale)
{
case ResolutionScale.Scale140Percent:
w = Math.Ceiling(w * 1.4);
h = Math.Ceiling(h * 1.4);
break;
case ResolutionScale.Scale180Percent:
w = Math.Ceiling(w * 1.8);
h = Math.Ceiling(h * 1.8);
break;
}
Size resolution = new Size(w, h);