Beispiel #1
0
        // Do not add any additional code to this method
        private void InitializePhoneApplication()
        {
            if (phoneApplicationInitialized)
            {
                return;
            }

            WP_to_WP.Shared.Services.UiSettings Settings = new WP_to_WP.Shared.Services.UiSettings();
            Settings.SetDefaultLanguage();


            // Create the frame but don't set it as RootVisual yet; this allows the splash
            // screen to remain active until the application is ready to render.
            RootFrame = new RadPhoneApplicationFrame
            {
                Background = new ImageBrush
                {
                    ImageSource = new BitmapImage(new Uri("Assets/SplashScreenImage-WVGA.png", UriKind.RelativeOrAbsolute)),
                    Opacity     = 1,
                    Stretch     = Stretch.UniformToFill
                }
                ,
                Height = 800
            };
            RootFrame.Navigated += CompleteInitializePhoneApplication;

            // Handle navigation failures
            RootFrame.NavigationFailed += RootFrame_NavigationFailed;

            // Ensure we don't initialize again

            SetTile();

            phoneApplicationInitialized = true;
        }
        // Do not add any additional code to this method
        private void InitializePhoneApplication()
        {
            if (phoneApplicationInitialized)
                return;

            WP_to_WP.Shared.Services.UiSettings Settings = new WP_to_WP.Shared.Services.UiSettings();
            Settings.SetDefaultLanguage();

            // Create the frame but don't set it as RootVisual yet; this allows the splash
            // screen to remain active until the application is ready to render.
            RootFrame = new RadPhoneApplicationFrame
            {
                Background = new ImageBrush
                {
                    ImageSource = new BitmapImage(new Uri("Assets/SplashScreenImage-WVGA.png", UriKind.RelativeOrAbsolute)),
                    Opacity = 1,
                    Stretch = Stretch.UniformToFill
                }
                ,
                Height = 800
            };
            RootFrame.Navigated += CompleteInitializePhoneApplication;

            // Handle navigation failures
            RootFrame.NavigationFailed += RootFrame_NavigationFailed;

            // Ensure we don't initialize again

            SetTile();

            phoneApplicationInitialized = true;
        }
Beispiel #3
0
        // Do not add any additional code to this method
        private void InitializePhoneApplication()
        {
            Settings.SetDefaultLanguage();

            if (phoneApplicationInitialized)
            {
                return;
            }



            int ImageSize = 1280;
            Uri image     = new Uri("Assets/SplashScreenImage-WXGA.png", UriKind.RelativeOrAbsolute);

            switch (ResolutionHelper.CurrentResolution)
            {
            case Resolutions.HD720p:
                image     = new Uri("Assets/SplashScreenImage-720p.png", UriKind.RelativeOrAbsolute);
                ImageSize = 1280;
                break;

            case Resolutions.WXGA:
                image     = new Uri("Assets/SplashScreenImage-WXGA.png", UriKind.RelativeOrAbsolute);
                ImageSize = 1280;
                break;

            case Resolutions.WVGA:
                image     = new Uri("Assets/SplashScreenImage-WVGA.png", UriKind.RelativeOrAbsolute);
                ImageSize = 800;
                break;

            default:
                ImageSize = 800;
                break;
            }


            // Create the frame but don't set it as RootVisual yet; this allows the splash
            // screen to remain active until the application is ready to render.
            RootFrame = new RadPhoneApplicationFrame
            {
                Background = new ImageBrush
                {
                    ImageSource = new BitmapImage(image),
                    Opacity     = 1,
                    Stretch     = Stretch.UniformToFill
                }
                ,
                Height = 800
            };
            RootFrame.Navigated += CompleteInitializePhoneApplication;

            // Handle navigation failures
            RootFrame.NavigationFailed += RootFrame_NavigationFailed;

            // Ensure we don't initialize again
            phoneApplicationInitialized = true;


            RootFrame.Navigating += RootFrame_Navigating;
            RootFrame.Navigated  += RootFrame_Navigated;
        }