Exemple #1
0
        public App()
        {
            InitializeComponent();
            SetPages();
            SplashScreenLogo splashScreen = new SplashScreenLogo();

            MainPage = splashScreen;
        }
        void PositionElements()
        {
            // Position the Image
            SplashScreenLogo.SetValue(Canvas.LeftProperty, splashImageRect.X);
            SplashScreenLogo.SetValue(Canvas.TopProperty, splashImageRect.Y);
            SplashScreenLogo.Height = splashImageRect.Height;
            SplashScreenLogo.Width  = splashImageRect.Width;

            // Position the Progress Ring
            SplashProgressRing.SetValue(Canvas.LeftProperty, (Window.Current.Bounds.Width / 2) - (SplashProgressRing.Width / 2));
            SplashProgressRing.SetValue(Canvas.TopProperty, (Window.Current.Bounds.Height / 2) + (SplashScreenLogo.Height / 3));

            // Position the Text
            StatusStackPanel.Width = SplashScreenLogo.Width * 0.5;
            StatusStackPanel.SetValue(Canvas.LeftProperty, (Window.Current.Bounds.Width / 2) - (StatusStackPanel.Width / 2));
            StatusStackPanel.SetValue(Canvas.TopProperty, Window.Current.Bounds.Height / 2 + SplashScreenLogo.Height * 0.52);
        }