S
S
Space Purr2019-04-20 17:21:28
WPF
Space Purr, 2019-04-20 17:21:28

What is the best way to implement a splash screen for the first launch of the program?

Hello.
In general, there is a completed application. A window opens and all that.
But it got into my head when I first started the program to launch a small animation (through the wpfanimatedgif library), but I can’t figure out how to implement it better.
So far I have implemented in MainWIndow.xaml like this:

...другие элементы и гриды
<Grid> этот грид соответственно находится поверх всех остальных элементов
      <StackPanel>
            <Image Visibility="{Binding OpeningVisibleProp}" gif:ImageBehavior.AutoStart="{Bining AutoStartProp}" 
                  gif:ImageBehavior.AnimatedSource="/BindingKompas;component/images/curtain.gif" 
                  gif:ImageBehavior.RepeatBehavior="1x" RenderOptions.BitmapScalingMode="HighQuality" 
                  Height="650">                      
            </Image>
      </StackPanel> дальше событие по отлову окончания анимации, в котором меняется значение первого запуска в файле
</Grid>

In general, everything works like this:
The program is loaded, checks, for example, the value in the file next to the program, if the first run, then the animation Visibility=Visible and change the data in the file, if not, then Hidden and AutoStart=false, so that it does not load just like that.
However, it seems to me that this is somehow crookedly ugly, if only because the window frame of the program remains visible. Perhaps it is worth writing a separate application with animation, through which the main application would be launched, depending on the first launch of the program on the computer or not.
Do you, dear fellow programmers, have any ideas about this?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
#
#, 2019-04-20
@SpacePurr

https://duckduckgo.com/?q=c%23+wpf+splash&t=ffab&ia=web

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question