user65248
user65248

Reputation: 551

Windows Phone Navigation transitions delay and blank screen in between

I'm using WP Toolkit to do the transitions between my app pages, it works fine , but I get this strange delay in between transitions while navigating from one page to another, it just shows a blank screen which obviously doesn't look good, without any transition it opens the page straight away without any delay or blank screen. This has taken almost 2 days of my time and I don't know what's wrong, I'd appreciate it if someone can help me with it or suggest another page transition library .

(I tried WP7Contrib transitions but I have the same problem with that, not sure if its my app or the libraries)

Upvotes: 0

Views: 1145

Answers (2)

Mani
Mani

Reputation: 1374

I would suggest you to create your own slide transitions between pages. Its quite simple actually. Create a storyboard and play them at onNavigatingFrom and onNavigatedTo functions in both the page you are navigating from and page you are going into respectively. It just gives me what and how i wanted in my applications. Removing additional references makes your code more optimized.

Upvotes: 0

Fabrice
Fabrice

Reputation: 931

In fact the background between transitions is black and to avoid that kind of behavior I solved the issue by setting the background in the App.Xaml.cs

 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 TransitionFrame();

        var brush = new ImageBrush
        {
            ImageSource = new System.Windows.Media.Imaging.BitmapImage(new Uri("Images/Background.jpg", UriKind.Relative)),
            Opacity = 0.8d
        };

        RootFrame.Background = brush;

        RootFrame.Navigated += CompleteInitializePhoneApplication;

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

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

With that all my pages have my background and the black background is no longer displayed during the transition.

Upvotes: 3

Related Questions