I need to programmtically fire the click of an existing tool so I can execute my existing tool click event code.
I see that the ButtonToolUIElement has a FireClickEvent() method but how do I access to this object using UltraToolManager.Tools collection? When access my tool in the tool collection and check the UIElement property it is null.
Could any one please help?
TIA,
Mark Lindell
I would not recommend using a the FireClickEvent on the ButtonToolUIElement. You can only get to the ui element if an instance of the button tool is visible, and that may not be guaranteed to be true.
I think the best thing to do here would be to separate out the click event handler code for this one tool into its own method which is called from the normal ToolClick event handler. Then you can call that method from anywhere else in your code and simulate the button click's action without having to interact with the toolbars manager.