A 'hello world' CS program
From Ribbon Commander Documentation
Revision as of 00:36, 15 March 2013 by Rxdff15551 bb53 (Talk | contribs)
Creating a tab
- Add a new class to your project and name it MyCustomUI.
- Add the following code to your class
// Namespaces of the two Dynamic RibbonX assemblies
using LogismiX.Interop.DynamicRibbonX;
using LogismiX.DynamicRibbonX.Core;
namespace DynamicRibbonXAddin
{
class MyCustomUI
{
private rxCustomUI _customUI;
public MyCustomUI()
{
// Instantiate a new rxCustomUI in a new context with id 'my_test_cs_ctx'
_customUI = rxCustomUI.create("my_test_cs_ctx", "Test C# Context");
// Cache a reference to the custom UI's ribbon
rxRibbon myRibbon = _customUI.ribbon;
// Create a new tab and label it 'My Tab'
rxTab myTab = new rxTab();
myTab.label = "My First Tab";
// Add the tab to myRibbon's tabs
myRibbon.tabs.add(myTab);
// Render the UI
_customUI.refresh();
}
}
}