ll
这个方法向窗体中显示这个停靠的控件
1 void iToolbox_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { 2 dockPanel6.Show(); 3 }
这个方法调用的地方为
iToolbox.ItemClick
1 // 2 // iToolbox 3 // 4 this.iToolbox.Caption = "Toolbo&x"; 5 this.iToolbox.CategoryGuid = new System.Guid("0cb4cc3e-4798-4d61-9457-672bdc2a90d4"); 6 this.iToolbox.Hint = "Toolbox"; 7 this.iToolbox.Id = 39; 8 this.iToolbox.ImageIndex = 25; 9 this.iToolbox.ItemShortcut = new DevExpress.XtraBars.BarShortcut(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) 10 | System.Windows.Forms.Keys.X)); 11 this.iToolbox.Name = "iToolbox"; 12 this.iToolbox.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.iToolbox_ItemClick); 13
链接持续信息
1 this.bar3.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { 2 new DevExpress.XtraBars.LinkPersistInfo(this.iSolutionExplorer), 3 new DevExpress.XtraBars.LinkPersistInfo(this.iProperties), 4 new DevExpress.XtraBars.LinkPersistInfo(this.iToolbox), 5 new DevExpress.XtraBars.LinkPersistInfo(this.iClassView), 6 new DevExpress.XtraBars.LinkPersistInfo(this.iTaskList, true), 7 new DevExpress.XtraBars.LinkPersistInfo(this.iFindResults), 8 new DevExpress.XtraBars.LinkPersistInfo(this.iOutput)});
this.bar3 = new DevExpress.XtraBars.Bar();
添加到
barManager
1 // 2 // barManager 3 // 4 this.barManager.Bars.AddRange(new DevExpress.XtraBars.Bar[] { 5 this.bar1, 6 this.bar2, 7 this.bar3, 8 this.bar4, 9 this.bar5, 10 this.bar6});
1 // 2 // barManager 3 // 4 this.barManager.Bars.AddRange(new DevExpress.XtraBars.Bar[] { 5 this.bar1, 6 this.bar2, 7 this.bar3, 8 this.bar4, 9 this.bar5, 10 this.bar6});
// 增加分类 11 this.barManager.Categories.AddRange(new DevExpress.XtraBars.BarManagerCategory[] { 12 new DevExpress.XtraBars.BarManagerCategory("Built-in Menus", new System.Guid("a984a9d9-f96f-425a-8857-fe4de6df48c2")), 13 new DevExpress.XtraBars.BarManagerCategory("File", new System.Guid("ec880574-4d2a-4f26-8779-903acfad8a52")), 14 new DevExpress.XtraBars.BarManagerCategory("Edit", new System.Guid("ac82dbe7-c530-4aa2-b6de-94a7777426fe")), 15 new DevExpress.XtraBars.BarManagerCategory("Standard", new System.Guid("fbaaf85d-943d-4ccd-8517-fc398efe9c7b")), 16 new DevExpress.XtraBars.BarManagerCategory("View", new System.Guid("0cb4cc3e-4798-4d61-9457-672bdc2a90d4")), 17 new DevExpress.XtraBars.BarManagerCategory("Window", new System.Guid("faa74de1-bd23-44b9-955d-6ba635fa0f01")), 18 new DevExpress.XtraBars.BarManagerCategory("Status", new System.Guid("d3532f9f-c716-4c40-8731-d110e1a41e64")), 19 new DevExpress.XtraBars.BarManagerCategory("Layouts", new System.Guid("f2b2eae8-5b98-43eb-81aa-d999b20fd3d3")), 20 new DevExpress.XtraBars.BarManagerCategory("PaintStyles", new System.Guid("d0a113b2-425b-47f5-a6b5-0aefb1859507"))});
// 增加控制器 21 this.barManager.Controller = this.barAndDockingController;
// 开始布局 22 this.barManager.DockControls.Add(this.barDockControl1); 23 this.barManager.DockControls.Add(this.barDockControl2); 24 this.barManager.DockControls.Add(this.barDockControl3); 25 this.barManager.DockControls.Add(this.barDockControl4); 26 this.barManager.DockManager = this.dockManager; 27 this.barManager.Form = this; 28 this.barManager.Images = this.mainMenuImages; 29 this.barManager.Items.AddRange(new DevExpress.XtraBars.BarItem[] { 30 this.siFile, 31 this.siEdit, 32 this.siNew, 33 this.iOpen, 34 this.iClose, 35 this.iProject, 36 this.iFile, 37 this.iBlankSolution, 38 this.iAddNewItem, 39 this.iAddExistingItem, 40 this.siAddProject, 41 this.iNewProject, 42 this.iExistingProject, 43 this.iSaveAll, 44 this.iOpenSolution, 45 this.iCloseSolution, 46 this.iPageSetup, 47 this.iPrint, 48 this.iExit, 49 this.siFind, 50 this.iFind, 51 this.iReplace, 52 this.iFindinFiles, 53 this.iNew, 54 this.iOpenFile, 55 this.iSave, 56 this.iStart, 57 this.eConfiguration, 58 this.eFind, 59 this.iSolutionExplorer, 60 this.iProperties, 61 this.iToolbox, 62 this.iClassView, 63 this.iTaskList, 64 this.iFindResults, 65 this.iOutput, 66 this.siWindow, 67 this.iStatus1, 68 this.iLoadLayout, 69 this.iSaveLayout, 70 this.siLayouts, 71 this.iPaintStyle, 72 this.barDockingMenuItem1, 73 this.bsiHelp, 74 this.iAbout, 75 this.barButtonItem1, 76 this.barButtonItem2, 77 this.barButtonItem3}); 78 this.barManager.MainMenu = this.bar1; 79 this.barManager.MaxItemId = 78; 80 this.barManager.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { 81 this.repositoryImageComboBox1, 82 this.repositoryItemComboBox1, 83 this.repositoryItemImageComboBox1}); 84 this.barManager.StatusBar = this.bar4; 85 this.barManager.Merge += new DevExpress.XtraBars.BarManagerMergeEventHandler(this.barManager1_Merge); 86 this.barManager.UnMerge += new DevExpress.XtraBars.BarManagerMergeEventHandler(this.barManager1_UnMerge); 87
1 // 2 // dockPanel6 3 // 4 this.dockPanel6.Controls.Add(this.dockPanel6_Container); 5 this.dockPanel6.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left; 6 this.dockPanel6.FloatSize = new System.Drawing.Size(146, 428); 7 this.dockPanel6.ID = new System.Guid("24977e30-0ea6-44aa-8fa4-9abaeb178b5e"); 8 this.dockPanel6.ImageIndex = 25; 9 this.dockPanel6.Location = new System.Drawing.Point(0, 0); 10 this.dockPanel6.Name = "dockPanel6"; 11 this.dockPanel6.OriginalSize = new System.Drawing.Size(200, 200); 12 this.dockPanel6.SavedDock = DevExpress.XtraBars.Docking.DockingStyle.Left; 13 this.dockPanel6.SavedIndex = 0; 14 this.dockPanel6.Size = new System.Drawing.Size(200, 557); 15 this.dockPanel6.Text = "Toolbox"; 16 this.dockPanel6.Visibility = DevExpress.XtraBars.Docking.DockVisibility.AutoHide;