Here is how to reproduce the problem in a simple code snippet through the public API: protected override void OnInit(EventArgs e) { ScreenRanges customScreenRanges = new ScreenRanges(); customScreenRanges.SmallScreenSizeRange = new ScreenRange(0, 100); customScreenRanges.MediumScreenSizeRange = new ScreenRange(101, 200); customScreenRanges.LargeScreenSizeRange = new ScreenRange(201, 300); customScreenRanges.ExtraLargeScreenSizeRange = new ScreenRange(301, 400); DeviceScreenSize screenSize2 = Detector.GetScreenSize(null, customScreenRanges); }