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

            var transition = new RadTransition();

            transition.BackwardInAnimation  = this.Resources["fadeInAnimation"] as RadFadeAnimation;
            transition.BackwardOutAnimation = this.Resources["fadeOutAnimation"] as RadFadeAnimation;
            transition.ForwardInAnimation   = this.Resources["fadeInAnimation"] as RadFadeAnimation;
            transition.ForwardOutAnimation  = this.Resources["fadeOutAnimation"] as RadFadeAnimation;
            transition.PlayMode             = TransitionPlayMode.Simultaneously;
            RadPhoneApplicationFrame frame = new RadPhoneApplicationFrame();

            frame.Transition = transition;
            // 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 = frame;
            //RootFrame = new PhoneApplicationFrame();
            RootFrame.Navigated += CompleteInitializePhoneApplication;

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

            // Handle reset requests for clearing the backstack
            RootFrame.Navigated += CheckForResetNavigation;

            // Ensure we don't initialize again
            phoneApplicationInitialized = true;
        }
Example #2
0
        // Do not add any additional code to this method
        private void InitializePhoneApplication()
        {
            if (phoneApplicationInitialized)
                return;

            // 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.
            // Uncomment this for standard:
            // RootFrame = new PhoneApplicationFrame();
            // Uncomment this for silverlight tools
            // RootFrame = new TransitionFrame();
            // Uncomment this for telerik frames
            RadPhoneApplicationFrame frame = new RadPhoneApplicationFrame();

            // rad frame transistions
            RadTransition transition = new RadTransition();
            transition.BackwardInAnimation = this.Resources["fadeInAnimation"] as RadAnimation;
            transition.BackwardOutAnimation = this.Resources["fadeOutAnimation"] as RadAnimation;
            transition.ForwardInAnimation = this.Resources["fadeInAnimation"] as RadAnimation;
            transition.ForwardOutAnimation = this.Resources["fadeOutAnimation"] as RadAnimation;
            transition.PlayMode = TransitionPlayMode.Consecutively;

            frame.Transition = transition;
            frame.OrientationChangeAnimation = this.Resources["fadeInAnimation"] as RadFadeAnimation;

            RootFrame = frame;
            RootFrame.Navigated += CompleteInitializePhoneApplication;

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

            // Ensure we don't initialize again
            phoneApplicationInitialized = true;
        }
Example #3
0
        // Do not add any additional code to this method
        private void InitializePhoneApplication()
        {
            //if (phoneApplicationInitialized)
            //    return;

            //// 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.
            //RadPhoneApplicationFrame frame = new RadPhoneApplicationFrame();
            //frame.Background = new SolidColorBrush(Colors.White);
            //RootFrame = frame;

            //RootFrame.Navigated += CompleteInitializePhoneApplication;

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

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

            if (phoneApplicationInitialized)
                return;
            // 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.
            RadTransition transition = new RadTransition();
            transition.BackwardInAnimation = this.Resources["RightInAnimation"] as RadSlideAnimation;
            transition.BackwardOutAnimation = this.Resources["RightOutAnimation"] as RadSlideAnimation;
            transition.ForwardInAnimation = this.Resources["fadeInAnimation"] as RadSlideAnimation;
            transition.ForwardOutAnimation = this.Resources["fadeOutAnimation"] as RadSlideAnimation;

            //transition.ForwardOutAnimation.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 100));
            //transition.ForwardInAnimation.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 100));
            //transition.ForwardOutAnimation.InitialDelay = new TimeSpan(0);
            //transition.ForwardInAnimation.InitialDelay = new TimeSpan(0);

            //transition.BackwardOutAnimation.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 100));
            //transition.BackwardInAnimation.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 100));
            //transition.BackwardOutAnimation.InitialDelay = new TimeSpan(0);
            //transition.BackwardInAnimation.InitialDelay = new TimeSpan(0);

            transition.PlayMode = TransitionPlayMode.Simultaneously;
            RadPhoneApplicationFrame frame = new RadPhoneApplicationFrame();
            frame.Transition = transition;
            frame.Background = new SolidColorBrush(Colors.White);

            RootFrame = frame;
            RootFrame.Navigated += CompleteInitializePhoneApplication;
            // Handle navigation failures
            RootFrame.NavigationFailed += RootFrame_NavigationFailed;
            // Ensure we don't initialize again
            phoneApplicationInitialized = true;
        }
Example #4
0
        // Do not add any additional code to this method
        private void InitializePhoneApplication()
        {
            if (phoneApplicationInitialized)
                return;

            // 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 PhoneApplicationFrame();
            RootFrame = new RadPhoneApplicationFrame();
            RootFrame.Background = new SolidColorBrush(Color.FromArgb(255, 155, 192, 192));

            RootFrame.Navigated += CompleteInitializePhoneApplication;

            // Using the telerik phone application frame control
            RadTransition transition = new RadTransition();
            transition.BackwardInAnimation = new RadMoveAnimation() { MoveDirection = MoveDirection.RightIn };
            transition.BackwardOutAnimation = new RadMoveAnimation() { MoveDirection = MoveDirection.RightOut };
            transition.ForwardInAnimation = new RadMoveAnimation() { MoveDirection = MoveDirection.LeftIn };
            transition.ForwardOutAnimation = new RadMoveAnimation() { MoveDirection = MoveDirection.LeftOut };

            RootFrame.Transition = transition;

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

            // Ensure we don't initialize again
            phoneApplicationInitialized = true;
        }
Example #5
0
        // Do not add any additional code to this method
        private void InitializePhoneApplication()
        {
            if (phoneApplicationInitialized)
                return;
            // 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.
            var transition = new RadTransition
            {
                BackwardInAnimation = Resources["slideInAnimation"] as RadSlideContinuumAnimation,
                BackwardOutAnimation = Resources["slideOutAnimation"] as RadSlideContinuumAnimation,
                ForwardInAnimation = Resources["slideInAnimation"] as RadSlideContinuumAnimation,
                ForwardOutAnimation = Resources["slideOutAnimation"] as RadSlideContinuumAnimation,
                PlayMode = TransitionPlayMode.Consecutively
            };
            var frame = new RadPhoneApplicationFrame { Transition = transition };
            RootFrame = frame;
            RootFrame.Navigating += RootFrame_Navigating;
            RootFrame.Navigated += RootFrame_Navigated;
            RootFrame.Navigated += CompleteInitializePhoneApplication;
            // Handle navigation failures
            RootFrame.NavigationFailed += RootFrame_NavigationFailed;
            // Ensure we don't initialize again
            phoneApplicationInitialized = true;

            RootFrame.UriMapper = new CustomUriMapper();

            phoneApplicationInitialized = true;
        }