Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

ArcEngine custom toolbar C#

$
0
0
Hello,

I am playing with the idea of an ArcEngine application with a custom toolbar I can add to the map control, but I am a bit stuck.

I have added a new item -> Base Toolbar, where I can add esri commands:

Code:

    [Guid("bf252637-ecde-48c3-9464-238bae6f800e")]
    [ClassInterface(ClassInterfaceType.None)]
    [ProgId("MyProject.MyCustomToolbar")]
    public sealed class MyToolbar: BaseToolbar
    {
        public MyToolbar()
        {
            this.AddItem("{380FB31E-6C24-4F5C-B1DF-47F33586B885}"); //undo command
            this.AddItem(new Guid("B0675372-0271-4680-9A2C-269B3F0C01E8")); //redo command
        }
    }


Is it possible to add buttons to a toolbar like this? In Arcmap, I have done it through the XML config with classes that inherit from esri addin control classes:

Code:

<AddIn language="CLR">
    <ArcMap>
      <Commands>
        <Button class="ButtonClass"

Where the class:

Code:

public class ButtonClass : Esri.ArcGIS.Desktop.AddIns.Button
{
}


Has anyone done this with ArcEngine applications?

Viewing all articles
Browse latest Browse all 1374

Trending Articles