Select to view content in your preferred language

Custom control references

475
1
10-05-2010 09:39 AM
DonFreeman
Emerging Contributor
Hello,
I am trying to build a toolbar as a custom reuseable control. How should I reference the images that appear as the toolbar buttons so that they are contained in the control and are not specific to the project the control is in? At present I have this:
<esriToolkit:ToolbarItem Text="Zoom In">
                        <esriToolkit:ToolbarItem.Content>
                            <Image Source="/SilverlightSamples;component/Controls/dfMapToolbar/i_zoomin.png" 
                            Stretch="UniformToFill" VerticalAlignment="Bottom" Margin="5,10,5,10"/>
                        </esriToolkit:ToolbarItem.Content>
                    </esriToolkit:ToolbarItem>

which works but is specific to the current project (SilverlightSamples). How can I change the source reference so that the image can still be found but I don't have to change it everytime I put it in a new project?

Thanks
0 Kudos
1 Reply
AliMirzabeigi
Emerging Contributor
Don,

You need to develop your custom control in a separate project and include your images in that project setting their build action to "Resource".
0 Kudos