c# - Accessing another ribbon element in IRibbonExtensibility class -


i have project in i'm using office.iribbonextensibility inheritance. issue i'm having project requires me 'uncheck' checkbox when button pressed on ribbon. far can tell, selected control accessible in code through office.iribboncontrol property of button press handler. question is, how access checkbox element in button click event in xml based vsto project?

try code

ribbon.xml

<?xml version="1.0" encoding="utf-8"?> <customui onload="ribbon_load" xmlns="http://schemas.microsoft.com/office/2009/07/customui">     <ribbon>         <tabs>             <tab idmso="tabaddins">               <group id="group1" label="group1">                 <button id ="btntest" size="large" label="testbutton" onaction="btntest_click"/>                 <checkbox id ="chktest" label="testcheckbox" getpressed="chktest_pressed" />               </group>             </tab>         </tabs>     </ribbon> </customui> 

ribbon.cs

private bool ischecked = false; public void btntest_click(iribboncontrol ribbon) {     ischecked = true;     this.ribbon.invalidate(); } public bool chktest_pressed(iribboncontrol ribbon) {     return ischecked; } 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -