I created a customized ArcGIS Pro module and everything works fine but I also would like to create a customized icon for the module.
I found this resource but it does not work for me
ProGuide Content and Image Resources · Esri/arcgis-pro-sdk Wiki · GitHub
using System.Windows.Media.Imaging; using System.IO.Compression; //Image is defined as AddinContent.//AddinContent is ESRI custom build action. Cannot use without Addin BitmapImage forAddinContent = new BitmapImage(); string id = "{49545510-2f4a-4e9c-bc12-3ea79a330fa0}";//From your module using (ZipArchive zip = ZipFile.OpenRead( @"C:\Users\my_username\Documents\ArcGIS\AddIns\ArcGISPro\" + id + @"\AddinContent.esriAddInX")) { ZipArchiveEntry zipEntry = zip.GetEntry("Images\AddInDesktop32.png"); MemoryStream ms = new MemoryStream(); using (Stream stmZip = zipEntry.Open()) { stmZip.CopyTo(ms);} forAddinContent.BeginInit(); forAddinContent.StreamSource = ms; forAddinContent.EndInit(); }
I get zipEntry = null error
Is there way to customize a module's icon?
Thanks!
Solved! Go to Solution.
It was easier than I thought. I just needed to read the document more carefully. When I set the build action to "AddinContent" for the image and use the relative path for the image in Config.daml problem solved.
here is more info about build actions Build actions for files - Visual Studio | Microsoft Docs
It was easier than I thought. I just needed to read the document more carefully. When I set the build action to "AddinContent" for the image and use the relative path for the image in Config.daml problem solved.
here is more info about build actions Build actions for files - Visual Studio | Microsoft Docs