The docking bar created by .Net cannot be placed at the bottom of the menu bar in 2016/2022 tests, it can only be fixed at the topmost position. Manual swapping also cannot complete this operation.
PatternSet
PatternSet is an AutoCAD interface. Through the interface, you can set the style of the toolbar and implant your own window into the toolbar. The required WPF window type is ‘UserControl’, which is added to the CAD toolbar as a subcategory. So both can be created separately and finally connected using the interface.
The way of Toolbar is basically consistent with CUI, you only need to pass in your own command string and bmp format image.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
var acadApp = (AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;
var atb = acadApp.MenuGroups.Item("ACAD").Toolbars.Add("TYDI");
var bitmapPath = @"E:\CSharpProgram\TYDIDocumentPlatform\DocumentPlatform\Resources\cCCC.bmp"; var bitmapLargePath = @"E:\CSharpProgram\TYDIDocumentPlatform\DocumentPlatform\Resources\A.bmp";
var atbItem = atb.AddToolbarButton(0, "Test06", "CCC", "LI", false); //atbItem.SetBitmaps(bitmapPath, bitmapPath); var atbItem2 = atb.AddToolbarButton(2, "Test02", "BBBB", "CIRLE", false);