.
//导航栏按钮 DevExpress.XtraNavBar.NavBarControl nBC = new DevExpress.XtraNavBar.NavBarControl(); //导航栏分组按钮 DevExpress.XtraNavBar.NavBarGroup nBG = new DevExpress.XtraNavBar.NavBarGroup(); //导航栏分组控件,可以添加 公共控件 或 自定义控件 DevExpress.XtraNavBar.NavBarGroupControlContainer nBGContainer = new DevExpress.XtraNavBar.NavBarGroupControlContainer(); /*--------------------------*/ ((System.ComponentModel.ISupportInitialize)(nBC)).BeginInit(); nBC.SuspendLayout(); nBGContainer.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.treeList1)).BeginInit(); /*--------------------------------------------------------------------------------------------*/ nBG.Caption = "navBarGroup1"; nBG.ControlContainer = nBGContainer; nBG.Expanded = true; nBG.GroupClientHeight = 356; nBG.GroupStyle = DevExpress.XtraNavBar.NavBarGroupStyle.ControlContainer; nBG.Name = "navBarGroup1"; nBG.GroupCaptionUseImage = DevExpress.XtraNavBar.NavBarImage.Large;/*设置图片显示为大图标*/ //nBG.ImageOptions.LargeImage = ;/*设置大图片图片*/ //nBG.ImageOptions.SmallImage = ;/*设置小图标图片*/ /*--------------------------*/ nBGContainer.Appearance.BackColor = System.Drawing.SystemColors.Control; nBGContainer.Appearance.Options.UseBackColor = true; nBGContainer.Controls.Add(this.treeList1);//添加 公共控件 或 自定义控件 nBGContainer.Name = "navBarGroupControlContainer1"; nBGContainer.Size = new System.Drawing.Size(250, 356); nBGContainer.TabIndex = 0; /*--------------------------------------------------------------------------------------------*/ ((System.ComponentModel.ISupportInitialize)(nBC)).EndInit(); nBC.ResumeLayout(false); nBGContainer.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.treeList1)).EndInit();
其他链接:https://blog.csdn.net/qq992817263/java/article/details/54017869
.