Andry Joos - I was having the same issue but was able to find a solution. I documented it on GIS Stack Exchange here.
Hi Tim! Thank you very much for letting me know. It's awesome to read that there actually is a solution. I will check if we still have that problem at the customer's side and implement it that way, if possible.
Maybe you want to copy&paste your solution into GeoNet too, for future reference for other people having the same issue?
I found a work around to this by using Rick Brewster's suggestions.
First, I modified Rick's class by adding a constructor public ToolStripEx() : base() { }
Then in my dockable window's designer class "MyClass.Designer.cs" I changed the toolstrip's declared type from System.Windows.Forms.ToolStrip
to ToolStripEx
.
Next, in the InitializeComponent()
method of the same designer class, I changed the initialization type for the toolstrip the same way from this.MyToolStrip = new System.Windows.Forms.ToolStrip()
to this.MyToolStrip = new ToolStripEx()
.
Finally, I set this.MyToolStrip.ClickThrough = true;
in the default property assignment section in the same designer class.
Now the buttons on the toolstrip fire the onClick event everytime - even when the dockable window is not active!