Get diagram in custom tool constructor


I wrote a custom ClickSelectingTool, in whose constructor I need to set some properties in its diagram. However, the base.Diagram property, which can be used later on is still null in the constructor, so I wonder, when does it get set and how can I automatically call a function as soon as the diagram is set?

The DiagramTool.Diagram property is set by the various Diagram tool property setters and by the Diagram.CurrentTool property setter.

I think it is best to override DiagramTool.DoStart, if you want to customize the tool based on the Diagram it belongs to.