public MainPage() { m_model = new ViewModel.ApplicationViewModel(); InitializeComponent(); KeyboardShortcutManager.Initialize(); Application.Current.Suspending += App_Suspending; m_model.PropertyChanged += OnAppPropertyChanged; m_accessibilitySettings = new AccessibilitySettings(); if (Utilities.GetIntegratedDisplaySize(out var sizeInInches)) { if (sizeInInches < 7.0) // If device's display size (diagonal length) is less than 7 inches then keep the calc always in Portrait mode only { DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait | DisplayOrientations.PortraitFlipped; } } }