![codejock commandbars codejock commandbars](https://www.en.netpro.ro/assets/images/codejock-reclama2-225x225.png)
+= new System.EventHandler(this.axCommandBars_Resize) This.axCommandBars = new AxXtremeCommandBars.AxCommandBars() Private void frmTest_Load(object sender, EventArgs e) When I use workaround #1 ( creating controls in Form_Load ) And call it after you create MDI child:įrmDocument frmDocument = new frmDocument() įrmDocument.Text = "Document " + lDocumentCount.ToString() Here is a work around for CommandBars so you can work with it like normal.ĬommandBars.AttachToWindow(32()) ĬommandBars.Icons = ĬommandBar StandardBar = CommandBars.Add("Standard", XTPBarPosition.xtpBarTop) ĬommandBarPopup ControlNew = (CommandBarPopup)AddButton(StandardBar.Controls, XTPControlType.xtpControlSplitButtonPopup, ID.FILE_NEW_PROJECT, "New") ĪddButton(, XTPControlType.xtpControlButton, ID.FILE_NEW_PROJECT, "New Project") ĪddButton(, XTPControlType.xtpControlButton, ID.FILE_NEW_BLANK, "New Blank Solution") ĬommandBarPopup ControlItem = (CommandBarPopup)AddButton(StandardBar.Controls, XTPControlType.xtpControlSplitButtonPopup, ID.PROJECT_NEW, "New Item") ĪddButton(, XTPControlType.xtpControlButton, ID.PROJECT_NEW, "Add New Item") ĪddButton(, XTPControlType.xtpControlButton, ID.PROJECT_EXIST, "Add Existin&g Item.") ĪddButton(, XTPControlType.xtpControlButton, ID.PROJECT_ADD_CLASS, "Add Class.") I don't see how we can catch this recreate thing form our ActiveX. NET will first destroy it and then recreate. XtremeCommandBars.CommandBarPopup ControlFile = (XtremeCommandBars.CommandBarPopup)(, 0, "&File22", -1, false) Ĭontrols = Ĭontrol = Controls.Add(, ID.ID_FILE_NEW, "&New", -1, false) Ĭontrol.DescriptionText = "Create a new document" Ĭontrol = Controls.Add(, ID.ID_FILE_OPEN, "&Open", -1, false) Ĭontrol.DescriptionText = "Open an existing document" Ĭontrol = Controls.Add(, ID.ID_FILE_CLOSE, "&Close", -1, false) Ĭontrol.DescriptionText = "Close the active document" Ĭontrol = Controls.Add(, ID.ID_FILE_SAVE, "&Save", -1, false) Ĭontrol.DescriptionText = "Save the active document" ĬommandBars1.ScaleMode = Īs mentioned before, to change a form from a normal form to a MDI child. XtremeCommandBars.CommandBarControls Controls XtremeCommandBars.CommandBarControl Control This.CommandBars1 = new AxXtremeCommandBars.AxCommandBars() Private void frmDocument_Load(object sender, System.EventArgs e) This.Load += new System.EventHandler(mDocument_Load)
CODEJOCK COMMANDBARS CODE
/ the contents of this method with the code editor. / Required method for Designer support - do not modify
CODEJOCK COMMANDBARS WINDOWS
#region Windows Form Designer generated code
![codejock commandbars codejock commandbars](http://www.codejock.com/assets/images/downloads/samples/commandbars_gallerysample_full.png)
Protected override void Dispose( bool disposing )
![codejock commandbars codejock commandbars](https://slideplayer.com/9665273/31/images/slide_1.jpg)
TODO: Add any constructor code after InitializeComponent call Required for Windows Form Designer support Private AxXtremeCommandBars.AxCommandBars CommandBars1 Here is my ENTIRE code for my MDIChild form. To make this work, simply drag CommandBars control on form.you can remove it after if you wish, this just makes references getting set a lot easier. You have move code where designer create CommandBars to Form_Load event. NET switch from standard frame to MDI Child Frame it recreates window and kill our CommandBars.