private void Form1_Load(object sender, System.EventArgs e)
        {
            //Set buddy control
            axToolbarControl1.SetBuddyControl(axPageLayoutControl1);
            axTOCControl1.SetBuddyControl(axPageLayoutControl1);

            //Add items to the ToolbarControl
            axToolbarControl1.AddItem("esriControls.ControlsOpenDocCommand", -1, -1, false, 0, esriCommandStyles.esriCommandStyleIconOnly);
            axToolbarControl1.AddItem("esriControls.ControlsPageZoomInTool", -1, -1, true, 0, esriCommandStyles.esriCommandStyleIconOnly);
            axToolbarControl1.AddItem("esriControls.ControlsPageZoomOutTool", -1, -1, false, 0, esriCommandStyles.esriCommandStyleIconOnly);
            axToolbarControl1.AddItem("esriControls.ControlsPageZoomWholePageCommand", -1, -1, false, 0, esriCommandStyles.esriCommandStyleIconOnly);
            axToolbarControl1.AddItem("esriControls.ControlsPageFocusPreviousMapCommand", -1, -1, true, 0, esriCommandStyles.esriCommandStyleIconOnly);
            axToolbarControl1.AddItem("esriControls.ControlsPageFocusNextMapCommand", -1, -1, false, 0, esriCommandStyles.esriCommandStyleIconOnly);
            axToolbarControl1.AddItem("esriControls.ControlsMapFullExtentCommand", -1, -1, true, 0, esriCommandStyles.esriCommandStyleIconOnly);
            axToolbarControl1.AddItem("esriControls.ControlsMapZoomInTool", -1, -1, false, 0, esriCommandStyles.esriCommandStyleIconOnly);
            axToolbarControl1.AddItem("esriControls.ControlsMapZoomOutTool", -1, -1, false, 0, esriCommandStyles.esriCommandStyleIconOnly);
            axToolbarControl1.AddItem("esriControls.ControlsSelectTool", -1, -1, true, 0, esriCommandStyles.esriCommandStyleIconOnly);
        }
Exemplo n.º 2
0
        private void Form1_Load(object sender, System.EventArgs e)
        {
            //Set buddy control
            axToolbarControl1.SetBuddyControl(axPageLayoutControl1);
            axTOCControl1.SetBuddyControl(axPageLayoutControl1);

            //Add ToolbarControl items
            axToolbarControl1.AddItem("esriControls.ControlsOpenDocCommand");
            axToolbarControl1.AddItem("esriControls.ControlsSaveAsDocCommand");
            axToolbarControl1.AddItem("esriControls.ControlsPageZoomInTool");
            axToolbarControl1.AddItem("esriControls.ControlsPageZoomOutTool");
            axToolbarControl1.AddItem("esriControls.ControlsPageZoomWholePageCommand");
            axToolbarControl1.AddItem("esriControls.ControlsMapZoomInTool");
            axToolbarControl1.AddItem("esriControls.ControlsMapZoomOutTool");
            axToolbarControl1.AddItem("esriControls.ControlsMapPanTool");
            axToolbarControl1.AddItem("esriControls.ControlsMapFullExtentCommand");
            axToolbarControl1.AddItem("esriControls.ControlsMapIdentifyTool");

            //Disable controls
            button1.Enabled   = false;
            comboBox1.Enabled = false;
        }