lundi 3 avril 2017

Adding a Ribbon Checkbox that is checked by default? (Pwp add in - C# and Xml)

XML code:

<checkBox 
           id="Fill"
           label="F"
           getPressed="CheckedByDefault"
/>

C# code:

public void CheckedByDefault(Office.IRibbonControl control)
        {
            RibbonCheckBox ch =  control;
            ch.Checked = true;
         }

I am not able to declare the RibbonCheckbox in this way and, therefore, not able to access and modify its "Checked" property.

Any ideas??




Aucun commentaire:

Enregistrer un commentaire