I have many custom vector based images that I use for my buttons, menu etc on all my Add-In dockpane and forms. I reference them as static resources and this works wonderfully. What I want to do and can't seem to figure out how or if it is even possible, use those same images in the config.daml file for both the smallImage and largeImage button and tool properties. This pack statement works for Esri images: pack:application:,,,/ArcGIS.Desktop.Resources;component/Images/GenerateSectorLines16. I would like to do the same but be referencing my own Images.xaml resource file. The same one my dockpane buttons use but after trying every possible solution I can come up with, nothing has worked. I'm no reaching out to you. Any suggestions?
Thanks,
Jon
Hi,
You can set xaml for smallImage, largeImage, overlaySmallImage and overlayLargeImage:
<button id="DockpaneSimple_Button1" caption="Button 1" className="Button1" loadOnClick="true"
smallImage="Images/ImageSmall.xaml"
largeImage="Images/ImageLarge.xaml">
<tooltip heading="Tooltip Heading">Tooltip text<disabledText /></tooltip>
Build action for project items ImageSmall.xaml and ImageLarge.xaml must be 'Content'.
My sample xaml:
<DrawingImage xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<DrawingImage.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="#00FFFFFF"
Geometry="M 0,0L 32,0L 32,32L 0,32L 0,0 Z " />
<GeometryDrawing Brush="#FFFF0000"
Geometry="F1 M 6.25,3.97918L 23.125,3.97918L 23.125,16.1458L 6.25,16.1458L 6.25,3.97918 Z ">
<GeometryDrawing.Pen>
<Pen LineJoin="Round"
Brush="#FF000000" />
</GeometryDrawing.Pen>
</GeometryDrawing>
<GeometryDrawing Brush="#FF00C800"
Geometry="F1 M 21.8542,11.0625C 26.399,11.0625 30.0833,14.7468 30.0833,19.2917C 30.0833,23.8365 26.399,27.5208 21.8542,27.5208C 17.3093,27.5208 13.625,23.8365 13.625,19.2917C 13.625,14.7468 17.3093,11.0625 21.8542,11.0625 Z ">
<GeometryDrawing.Pen>
<Pen LineJoin="Round"
Brush="#FF000000" />
</GeometryDrawing.Pen>
</GeometryDrawing>
<GeometryDrawing Brush="#FFFFFF00"
Geometry="F1 M 16.8731,14.9035L 11.9668,16.2498L 8.58953,12.5761L 8.25831,17.6042L 3.62852,19.7405L 8.33013,21.5017L 8.84603,26.4958L 12.083,22.5562L 17.0316,23.5064L 14.3306,19.3103L 16.8731,14.9035 Z ">
<GeometryDrawing.Pen>
<Pen LineJoin="Round"
Brush="#FF000000" />
</GeometryDrawing.Pen>
</GeometryDrawing>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
Resulting view :
For local resources you don't need prefix "pack:application:,,,/".
You can make your own library of images and then you can access them from daml as Esri images
I don't see the attached sample xaml with the 6 images. Can you please attach it again?
Thanks!
Replace the <Image> tag as follows:
<Image>Images\height.png</Image>
Modify the image references to:
smallImage="Images\height.png"
largeImage="Images\height.png"
<Content Include="Images\height.png" />