Select to view content in your preferred language

Gif image in splash screen

1416
1
10-20-2022 05:24 AM
newbiedotnetguy
Emerging Contributor

Hi,

I am trying to add gif image having an animation in the splash screen for my ArcGIS Pro WPF application. 

First is there any API/Control for adding the gif image?

And second I was trying to use a third part package to add the gif image in splash screen. But splash screen is not showing and it is directly showing the About Page. When I am using the same third party package in a simply wpf application it is working fine.

Below is the third party package:

https://github.com/XamlAnimatedGif/WpfAnimatedGif

Tags (1)
0 Kudos
1 Reply
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Using the WpfAnimatedGif NuGet I implemented this sample in SplashScreen.xaml of my Pro Configuration:

<Window x:Class="ProConfigStartAnimation.UI.SplashScreen"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:ProConfigStartAnimation"
             xmlns:gif="http://wpfanimatedgif.codeplex.com"
             mc:Ignorable="d" 
             ResizeMode="NoResize"
             Topmost="False"
             ShowInTaskbar="False"
             WindowStartupLocation="CenterScreen"
             WindowStyle="None"
             Width="648" Height="328">
  <Grid>
    <Border BorderBrush="Black" BorderThickness="3" Margin="10">
      <StackPanel Orientation="Vertical">
        <Image Source="../Images/FolderOpenState32.png" Width="32" Height="32" />
        <Image gif:ImageBehavior.AnimatedSource="../Images/earth.gif" Width="192" Height="192" />
        <TextBlock FontSize="50"
                   HorizontalAlignment="Center"
                   VerticalAlignment="Center">
          ProConfigStartAnimation
        </TextBlock>
      </StackPanel>
    </Border>
  </Grid>
</Window>

I attached my sample project for your reference.

 

0 Kudos