locked
Outlook 2010 Addin + Refresh Ribbon UI RRS feed

  • Question

  • Hi,

    I have created outlook 2010 addin using VSTO with C# which contains explorer and inspector ribbon controls using RibbonXML.

    How can i enable/disable the explorer and inspectors ribbon controls?.

    Normally the ribbon controls are updated when the explorer or inspector got focus.So if user opens multiple inspectors then the controls fails to refresh/update.

     

    Anyone suggest me, how to resolve this? or this is behavior of ribbon controls.

    Thursday, June 16, 2011 2:23 AM

Answers

  • A call to Invalidate would allow updating of any controls in any of the open Explorers or Inspectors in the callbacks for that control or all controls.
     
    If you don't want to use an event, how do you propose to know when to invalidate things? If you have a trigger for wanting an update you can just call Invalidate there.
     
    I don't understand your statement in your original post: "So if user opens multiple inspectors then the controls fails to refresh/update."
     
    If you open a new Inspector the Activate() event will fire in that item. Activate() will fire under the same conditions whether one or a hundred Inspectors or Explorers are opened.


    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "psvgopal" <=?utf-8?B?cHN2Z29wYWw=?=> wrote in message news:ecb1cb38-1e2c-4eb1-9639-7c3823fbb676...

    Invalidate() method already called when explorer/inspector's activate event fired.

     

    That i mentioned above "Normally the ribbon controls are updated when the explorer or inspector got focus" means explorer/inspector activated.

     

    But my requirement is to update the explorer/inspector ribbon controls without focusing specific explorer/inspector when the user has multiple inspectors.

     



    Ken Slovak MVP - Outlook
    Friday, June 17, 2011 1:34 PM

All replies

  • Call one of the Invalidate* methods on the ribbon object when the Activate() event fires on the Explorer or Inspector. Your callbacks for getEnabled(), getVisible(), etc. will fire.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "psvgopal" <=?utf-8?B?cHN2Z29wYWw=?=> wrote in message news:9da68794-a026-49b7-b919-651dc231846c...

    Hi,

    I have created outlook 2010 addin using VSTO with C# which contains explorer and inspector ribbon controls using RibbonXML.

    How can i enable/disable the explorer and inspectors ribbon controls?.

    Normally the ribbon controls are updated when the explorer or inspector got focus.So if user opens multiple inspectors then the controls fails to refresh/update.

     

    Anyone suggest me, how to resolve this? or this is behavior of ribbon controls.


    Ken Slovak MVP - Outlook
    Thursday, June 16, 2011 10:41 PM
  • Invalidate() method already called when explorer/inspector's activate event fired.

     

    That i mentioned above "Normally the ribbon controls are updated when the explorer or inspector got focus" means explorer/inspector activated.

     

    But my requirement is to update the explorer/inspector ribbon controls without focusing specific explorer/inspector when the user has multiple inspectors.

     


    Friday, June 17, 2011 2:34 AM
  • A call to Invalidate would allow updating of any controls in any of the open Explorers or Inspectors in the callbacks for that control or all controls.
     
    If you don't want to use an event, how do you propose to know when to invalidate things? If you have a trigger for wanting an update you can just call Invalidate there.
     
    I don't understand your statement in your original post: "So if user opens multiple inspectors then the controls fails to refresh/update."
     
    If you open a new Inspector the Activate() event will fire in that item. Activate() will fire under the same conditions whether one or a hundred Inspectors or Explorers are opened.


    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "psvgopal" <=?utf-8?B?cHN2Z29wYWw=?=> wrote in message news:ecb1cb38-1e2c-4eb1-9639-7c3823fbb676...

    Invalidate() method already called when explorer/inspector's activate event fired.

     

    That i mentioned above "Normally the ribbon controls are updated when the explorer or inspector got focus" means explorer/inspector activated.

     

    But my requirement is to update the explorer/inspector ribbon controls without focusing specific explorer/inspector when the user has multiple inspectors.

     



    Ken Slovak MVP - Outlook
    Friday, June 17, 2011 1:34 PM