Select to view content in your preferred language

Change default image or icon for ArcGIS Pro Addin Module

227
2
Jump to solution
2 weeks ago
PeteVitt
Frequent Contributor

Hi  - I'm working with an ArcGIS Pro Module AddIn for Arc Pro 3.5.  I have a button that opens a wpf window.  Is there anyway to change the default icon or image that appears on the upper left corner of the window? ( see defaultImage.png).  I've tried changing the image in the config.daml:

<AddInInfo id="{da90fb53-6559-46bc-8879-8ff37e97bbec}" version="1.0" desktopVersion="3.5.57366" product="ArcGISPro">
<Name>SawpaGisTools</Name>
<Description>SawpaGisTools description</Description>
<Image>Images\sawpa32.png</Image>

and followed the configuration and build instructions for the image in this post: (https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-change-icon-of-add-in/td-p/1112826).  The build configuration for my image is shown in NewImage.png.  The image is not appearing in my .esriaddinx output file

Is there some other place I need to make this change? or maybe not possible?  Not a huge deal, but would like to change it if I can

Thanks

Pete

0 Kudos
1 Solution

Accepted Solutions
GKmieliauskas
Esri Regular Contributor

Hi,

As was described in your link, change of Image in daml will change image of your AddIn in Add In Manager of ArcGIS Pro.

You need WPF way to change window icon. Add *.ico file to your AddIn resources and set build Action to "Resource"

GKmieliauskas_0-1758700589904.png

Open your ProWindow xaml and set Icon property:

<controls:ProWindow x:Class="DockpaneSimple.ProWindow1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:controls="clr-namespace:ArcGIS.Desktop.Framework.Controls;assembly=ArcGIS.Desktop.Framework"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
        mc:Ignorable="d"
        Title="ProWindow1" Height="300" Width="300"
        Icon="resources\appicon.ico"
        WindowStartupLocation="CenterOwner"
    >

And you will get:

GKmieliauskas_1-1758700753137.png

 

 

View solution in original post

2 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

As was described in your link, change of Image in daml will change image of your AddIn in Add In Manager of ArcGIS Pro.

You need WPF way to change window icon. Add *.ico file to your AddIn resources and set build Action to "Resource"

GKmieliauskas_0-1758700589904.png

Open your ProWindow xaml and set Icon property:

<controls:ProWindow x:Class="DockpaneSimple.ProWindow1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:controls="clr-namespace:ArcGIS.Desktop.Framework.Controls;assembly=ArcGIS.Desktop.Framework"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
        mc:Ignorable="d"
        Title="ProWindow1" Height="300" Width="300"
        Icon="resources\appicon.ico"
        WindowStartupLocation="CenterOwner"
    >

And you will get:

GKmieliauskas_1-1758700753137.png

 

 

PeteVitt
Frequent Contributor

Thanks!

0 Kudos