Пример #1
0
        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;
                }
            }
        }
Пример #2
0
        public MainPage()
        {
            this.InitializeComponent();
            m_model = new ApplicationViewModel();

            // UNO TODO
            // KeyboardShortcutManager.Initialize();

            m_model.PropertyChanged += OnAppPropertyChanged;

            double sizeInInches = 0.0;

            // UNO TODO
            //if (SUCCEEDED(GetIntegratedDisplaySize(&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;
            //    }
            //}
        }