This document is archived and information here might be outdated. Recommended version. |
Add Map Commands to ToolbarControl
///<summary>Add Map Commands to ToolbarControl.</summary> /// ///<param name="toolbarControl">An IToolbarControl inferface to add map commands to.</param> /// ///<remarks></remarks> public void AddMapCommandsToToolbarControl(ESRI.ArcGIS.Controls.IToolbarControl toolbarControl) { // Call to add the map commands to the ToolbarControl // For example, if a ToolbarControl named axToolbarControl1 exists use the following code: // AddMapCommandsToToolbarControl((IToolbarControl)axToolbarControl1.Object); toolbarControl.AddToolbarDef("esriControls.ControlsMapNavigationToolbar", -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsMapIdentifyTool", -1, -1, true, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsMapFindCommand", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsMapHyperlinkTool", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsMapMeasureTool", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsLayerListToolControl", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsLayerTransparencyCommand", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsMapSwipeTool", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); }
'''<summary>Add Map Commands to ToolbarControl.</summary> ''' '''<param name="toolbarControl">An IToolbarControl inferface to add map commands to.</param> ''' '''<remarks></remarks> Private Sub AddMapCommandsToToolbarControl(ByVal toolbarControl As ESRI.ArcGIS.Controls.IToolbarControl) ' Call to add the map commands to the ToolbarControl ' For example, if a ToolbarControl named axToolbarControl1 exists use the following code: ' AddMapCommandsToToolbarControl(axToolbarControl1.Object) toolbarControl.AddToolbarDef("esriControls.ControlsMapNavigationToolbar", -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsMapIdentifyTool", -1, -1, True, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsMapFindCommand", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsMapHyperlinkTool", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsMapMeasureTool", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsLayerListToolControl", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsLayerTransparencyCommand", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsMapSwipeTool", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) End Sub