You will learn: how to create and run a basic ArcGIS Pro solution configuration.
With ArcGIS Pro SDK for .NET, you can extend ArcGIS Pro with your own unique tools and workflows. Using Microsoft Visual Studio and the Pro SDK, developers can build Pro add-ins and configurations that provide users with custom functionality specific to their organization or industry.
Along with having all the capabilities of a Pro add-in, solution configurations also provide you the ability to customize the startup UI for ArcGIS Pro. You can create a custom splash screen, start page, about page, and use conditional logic and user roles to tailor the overall user experience.
In this lab, you will use C# to create a new configuration using the project template, customize the Pro splash screen and start page, and start Pro using a new configuration shortcut.
Start Visual Studio.
Choose File > New > Project and then from ArcGIS templates group, select ArcGIS Pro Managed Configuration. Give your project a name, such as
Compile and build the project without starting Pro by selecting Build > Build Solution.
Open Windows Explorer and navigate to the folder, C:\Users\<UserName>\Documents\ArcGIS\AddIns\ArcGISPro\Configurations. You should see your newly compiled configuration file reflecting the name of your project with the
Review the start action and command line arguments for the project. To do this, in the Solution Explorer, right-click the project and choose Properties at the bottom of the list. Select Debug from the tab listing on the left side. Notice the path to the ArcGIS Pro .exe has been set, and that command line arguments have been set.
In the Solution Explorer within your project list, open the UI folder to see the
.cs files contained there. Double-click the file
SplashScreen.xaml to open the splash screen file. Notice by default in Design view that it contains the name of your project. Click the text and change it to something new, e.g., “My New Config”.
From the same UI folder, double-click the
StartPage.xaml view file and in Design view you should see a background image of some 3D buildings with a project selection box in the center. Re-build your solution if these aren't visible in Design view. Customize the start page by adding a new TextBlock control from the Visual Studio Toolbox of Common WPF Controls, and include some text and basic formatting. Alternatively, you can add any basic WPF control you feel comfortable working with.
Compile and build the project.
Press Start to run the project in the Visual Studio debugger. Notice your custom splash screen and start page opens. Select a Pro project from the list or press the browse button to navigate to one.
Once your Pro project starts, notice that the standard Pro icon, located at the top-left corner of the application, has been replaced by a green, custom icon. Click on the Project tab, and then click the About option. On the About pane, notice that the name of the configuration’s project is found displayed below the title "About ArcGIS Pro".
Close ArcGIS Pro. Create a new Pro desktop shortcut by right-clicking the desktop and selecting New > Shortcut. In the space below “Type the location of the item:”, copy over the path to the Pro .exe file path, as well as the command line arguments string, from the Debug pane referenced in Step 5. Your path should look something like: "C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe" /config:<name of configuration>. Click Next. Enter a name for the shortcut, and click Finish.
Double-click your new desktop shortcut to start Pro and your configuration. You should see your custom splash screen and start page appear. You have now seen how a configuration file is normally started. Close ArcGIS Pro.
Compare your solution with our completed solution project.
Download and try the two Pro SDK configuration community samples, which are full, ready-to-run Visual Studio solutions, each with basic walk-through information:
Review the Pro SDK API reference and find the
ConfigurationManager class for more information and additional behavior.