RibbonButton Button = new new RibbonButton () īutton.CommandHandler = new new AdskCommonHandler () ĭisclaimer: This article is CSDN blogger "HisinWang 'original article, follow the CC 4.0 by- SA copyright agreement, reprint Please include links to the original source and this statement. } Private static RibbonButton NewRibbonBtn ( String text, String cmd) RibbonButton rbnBtnTest = NewRibbonBtn( " Test ", " M圜mdTest " ) įoreach (RibbonTab rbnTab in ribCntrl.Tabs)ĭocument doc = RibbonButton rbnBtnCircle = NewRibbonBtn( " 圆 ", " circle " ) RibbonButton rbnBtnLine = NewRibbonBtn( " 直线 ", " line " ) Section above, but realized the Ribbon interface, but not yet implemented Ribbon button to trigger the execution of the command.įirst, we implement a custom class AdskCommandHandler, by the class association Ribbon button and the corresponding command. Original link: HTTPS: // /hisinwang/article/details/78797068 RibbonButton button = new RibbonButton() ĭisclaimer: This article is CSDN blogger "HisinWang 'original article, follow the CC 4.0 by- SA copyright agreement, reproduced, please attach the original source link and this statement.
Private static RibbonButton NewRibbonBtn( string text) RibbonButton rbnBtnTest = NewRibbonBtn( " Test " ) RibbonPanelSource panel2Src = new RibbonPanelSource() RibbonButton rbnBtnCircle = NewRibbonBtn( " 圆 " ) RibbonButton rbnBtnLine = NewRibbonBtn( " 直线 " ) RibbonPanelSource panel1Src = new RibbonPanelSource()
创建Ribbon Tab页 if (myRibbonTab = null ) - private static RibbonTab myRibbonTab = null