After much Googling, I am resorting to posting here. I'd like to simply show the initializing continuous progress dots on the splash screen of my configuration - you know the dots that Pro's default splash screen already shows? I have not been able to find any examples of this.. and all I find on Google about progress bars in C# is for WindowsForms apps. Would that work here? I feel like this is becoming a whole lot more complicated than it should be. And I can't believe there isn't a community sample of this or a sample in one of the many videos about the Pro SDK that shows a simple progress indicator on the splash screen. Please direct me to it if there is! Thanks!
These dots that run across the screen.. even Visual Studio uses them when it loads.
Solved! Go to Solution.
WPF Spark Nuget provides a "FluidProgressBar" user control that can be used for this.
* Download the WPF Spark nuget
* Include the user control in your splash screen in the configuration project.
<Grid>
<Border BorderBrush="Black" BorderThickness="3" Margin="10">
<Grid>
<Grid.RowDefinitions>
...
<TextBlock ...>
ProgressDots
</TextBlock>
<wpfspark:FluidProgressBar Grid.Row="1" Margin="50, 50">
</wpfspark:FluidProgressBar>
</Grid>
</Border>
</Grid>
Thanks
Uma
WPF Spark Nuget provides a "FluidProgressBar" user control that can be used for this.
* Download the WPF Spark nuget
* Include the user control in your splash screen in the configuration project.
<Grid>
<Border BorderBrush="Black" BorderThickness="3" Margin="10">
<Grid>
<Grid.RowDefinitions>
...
<TextBlock ...>
ProgressDots
</TextBlock>
<wpfspark:FluidProgressBar Grid.Row="1" Margin="50, 50">
</wpfspark:FluidProgressBar>
</Grid>
</Border>
</Grid>
Thanks
Uma
Thanks Uma! Exactly what I was after. Is there a c# method to get Pro's version number to display on the splash screen? I tinkered around a bit and could only get the aassembly/build info, but could not get Pros number.
Hi Dylan
The best way to get the Pro version to display on your Configuration's splash screen is to use the registry.
Pro's version is provided in the following key:
[HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro]
"InstallDir"="C:\\Program Files\\ArcGIS\\Pro\\"
...
"Version"="2.4"
Please note, Pro can be installed without admin rights - which means these keys could be found in the HKEY_CURRENT_USER registry hive if Pro was installed in the context of a single user.
Thanks
Uma
Uma, forgive me but I don't quite follow what that would look like in the configuration as far as coding that. Is there some method that I'd pass the registry key into to return the version? I'd like to avoid hardcoding version="2.3" into the xaml and have static text, I'd like it to change dynamically with future upgrades.
Hi
No problem. You will just have to use the C# RegistryKey class to get the Pro version registry key in code. And then you can display the Version in the splash screen..
A code similar to this can be used to get the Pro's version registry key.
RegistryKey localKey = egistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, RegistryView.Registry64);
RegistryKey esriKey = localKey.OpenSubKey(@"SOFTWARE\ESRI\ArcGISPro");
if (esriKey == null)
{
localKey = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.CurrentUser, RegistryView.Registry64);
esriKey = localKey.OpenSubKey(@"SOFTWARE\ESRI\ArcGISPro");
}
if (esriKey == null)
{
//this is an error
MessageBox.Show("Pro is not installed");
}
var version = esriKey.GetValue("Version") as string;
if (version == null || version == string.Empty)
//this is an error
MessageBox.Show("Pro is not installed");
return version;
Thank you Uma, I added this to my splashScreenViewModel.cs and it worked and my splash screen is looking great now