ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MapTool Class / ContextToolbarID Property
Example

In This Topic
    ContextToolbarID Property (MapTool)
    In This Topic
    Gets or sets the DAML ID of the toolbar to display for the tool.
    Syntax
    protected string ContextToolbarID {get; set;}
    Protected Property ContextToolbarID As String
    Example
    Set a MiniToolbar, ContextMenuID
    // daml entries
    // 
    // <menus>
    //  <menu id="MyMenu" caption="Nav">
    //    <button refID="esri_mapping_prevExtentButton"/>
    //    <button refID="esri_mapping_fixedZoomInButton"/>
    //  </menu>
    // </menus>
    // <miniToolbars>
    //   <miniToolbar id="MyMiniToolbar">
    //    <row>
    //      <button refID="esri_mapping_fixedZoomInButton"/>
    //      <button refID="esri_mapping_prevExtentButton"/>
    //    </row>
    //   </miniToolbar>
    // </miniToolbars>
    
    public class SketchToolWithToolbar : MapTool
    {
      public SketchToolWithToolbar()
      {
        IsSketchTool = true;
        SketchType = SketchGeometryType.Line;
        SketchOutputMode = SketchOutputMode.Map;
        ContextMenuID = "MyMenu";
        ContextToolbarID = "MyMiniToolbar";
      }
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also