Пример #1
0
        private void loadState()
        {
            this.tgSound.IsOn   = App.Config.Sound;
            this.tgVibrate.IsOn = App.Config.Vibrate;

            this.deviceType = DeviceTypeHelper.GetDeviceFormFactorType();
        }
Пример #2
0
        /// <summary>
        /// Initializes the singleton application object.  This is the first line of authored code
        /// executed, and as such is the logical equivalent of main() or WinMain().
        /// </summary>
        public App()
        {
            this.InitializeComponent();
            this.Suspending += OnSuspending;

            ///phone , tablet, Xbox
            DeviceType = DeviceTypeHelper.GetDeviceType();

            ///fake xbox app settings
            DeviceType = DeviceFormFactorType.Xbox;


            if (App.IsXbox)
            {
                ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize;
                //size of your app on the xbox
                ApplicationView.PreferredLaunchViewSize = new Size(960, 540);

                this.RequiresPointerMode = Windows.UI.Xaml.ApplicationRequiresPointerMode.WhenRequested;
            }
            else
            {
                ApplicationView.PreferredLaunchViewSize = new Size(970, 768);
            }
        }
 static DeviceFamilyStateTrigger()
 {
     deviceFamily = App.DeviceType;
 }