/* * * hummm... What you read here is... DRAFT ! * The designer is not ready at all ! * */ public override string GetDesignTimeHtml() { String lReturn = String.Empty; OfficeRibbon lControl = (Component as OfficeRibbon); return("<div style='height:60px; padding:5px; border:1px solid #C0C0C0; font-family:Verdana; font-size:8pt;'><b>Ribbon</b> [" + lControl.ID + "]</div>"); }
public override void Initialize(IComponent component) { base.Initialize(component); _Control = (OfficeRibbon)component; foreach (RibbonContext lContext in _Control.Contexts) { foreach (RibbonTab lTab in lContext.Tabs) { _ListTabs.Add(lTab); } } }
void CalcActiveTab() { var xx = WordApp.CommandBars["Ribbon"]; var xxi = xx as Accessibility.IAccessible; var r = new OfficeRibbon(xxi); OfficeRibbonTab refTab = r.Tabs["References"]; var a = refTab.Accessible; var aa = a.get_accState(0); var b = refTab.AccessibleParent; var bb = b.get_accState(0); var refTabCOM = refTab._me; var q = refTabCOM as IAccessible; var state = q.accState[0]; }
// ActionList command to change the text size private void ToggleLargeText() { // Get a reference to the parent designer's associated control OfficeRibbon ctl = (OfficeRibbon)_parent.Component; AboutOfficeWebUI AboutForm = new AboutOfficeWebUI(); AboutForm.ShowDialog(); /* * // Get a reference to the control's LargeText property * PropertyDescriptor propDesc = TypeDescriptor.GetProperties(ctl)["ApplicationMenuText"]; * * // Get the current value of the property * String v = (String)propDesc.GetValue(ctl); * * // Toggle the property value * propDesc.SetValue(ctl, "hello world"); */ }
void CalcActiveTab() { var xx = WordApp.CommandBars["Ribbon"]; var xxi = xx as Accessibility.IAccessible; var r = new OfficeRibbon(xxi); OfficeRibbonTab refTab = r.Tabs["References"]; var a = refTab.Accessible; var aa = a.get_accState(0); var b = refTab.AccessibleParent; var bb = b.get_accState(0); var refTabCOM = refTab._me; var q = refTabCOM as IAccessible; var state = q.accState[0]; }