Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
905
QAT item added event
posted

Hello,

is there an event or something else to find which item has been added to qat just when i add an item to qat? I want to get the item i added last.

Parents
No Data
Reply
  • 54937
    Suggested Answer
    Offline posted

    There are a couple of options I can think of. I think the best option would be to hook the CollectionChanged event of the Items collection of the QuickAccessToolbar (e.g. ((INotifyCollectionChanged)this.qat.Items).CollectionChanged += new NotifyCollectionChangedEventHandler(OnQatItemsChanged);). Another option might be to hook the ToolCloned event of the tools (or possibly hook it on the ribbon) but this may not give you the results you expect as this could be raised for the items within a ribbongroup when the ribbon group is added to the qat (or when its expanded and the associated group's items have changed).

Children