Click here to Skip to main content
15,665,942 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is for the purpose of Loading screen in WinUi3.
I tried loading it as gif and mp4. On both scenarios I got the video lagging in different machines.

Now I have a 40 frame in png of the video file. I need to have the png images loading in sequence to give a transition of a video file.

Can you help me in getting the expected result?

What I have tried:

<pre><pre> private void LoadImages()
            LoadingScreenImages = new List<BitmapImage>();
            for (int i = 0; i < 40; i++)
                LoadingScreenImages.Add(new BitmapImage(new Uri(@"C:\Users\TestAppForLoadingVideo\PNG_sequences\Image_" + i + ".png")));

        private void TimerTick(object sender, object e)

            if (i < 80)
               // ImageFile.Source = LoadingScreenImages[i];
               // ImageFile.Source = new BitmapImage(new Uri(@"C:\Users\TestAppForLoadingVideo\PNG\" + i + ".png"));

I am able to load images in a sequence but the transition is missing. Help me to fix this
Gerry Schmitz 28-Feb-23 10:01am    
Image loading in UWP is async; "Movies" run at 24+ frames per second; none if this is reflected in your code. Probably better off loading all image into one "grid cell" and exposing one at a time by toggling visibility.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900