Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

If I add ControlsMapZoomInTool like this:

AddItem("esriControls.ControlsMapZoomInTool", -1);

To a Basic Context Menu I get the magnifying icon in my context menu right next to the words "Zoom In".

Is there a way to add an icon to a custom Universal BaseCommand in ArcEngine?

ArcEngine 10, C#, VS2010

share|improve this question
add comment

1 Answer

I'm not sure if ArcEngine is different from desktop. Just set the icon in the master base class and do not set it on the children classes.

Something like:

public class UniversalCustomCommand:BaseCommand
{
    public UniversalCustomCommand()
    {
        base.m_bitmap = new Bitmap(GetType(),"path to icon");
    }
}

public class ConcreteCommandA:UniversalCustomCommand
{
    public ConcreteCommandA()
        :base()
    {
        // init other members here
    }
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.