Add Map Commands to ToolbarControl
[C#]
///<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) { 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); }
[Visual Basic .NET]
'''<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) 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