I am looking for an event on the UltraToolbarsManager Tools (ToolsCollection) that gives information about a new tool that is added to this collection.
In my application I want to store some information from the tool that is added in a cache. But unfortunatly the ToolsCollection or the UltraToolbarsManager doesn't have an acceptable event that give some information about the tool.
Furthermore I also need an event for ToolRemoved.
I hope someone can help me,Michael
The only event that will be fired when a tool is added or removed is the PropertyChanged event. The PropId on the ChangeInfo of the event args will be PropertyIds.Tools. When you receive this event with this PorpId, you can store the current tools in the list and the next time it is fired, you can compare the old tools with the tools currently in the list to see what was added or removed.
Hi Mike,
the reason is that the PropertyChanged event is raised very often, when I add and remove Tools dynamicly. Therefore I have a performance lack when I observe the collection each time.
Unfortunatly I need this for a workaround. The user want to show and hide the description for menuitems. Therefore I always have to cache the description value for each ButtonTool in the PropertyChanged method. When the user disables the "description for menus", I set all descriptions on the cached ButtonTools to null and when the user enables the "description on menu" I restore the descriptions from cache.
Is there an other posibility to reach this goal?