EmbeddableControl.OpenAsync is called twice

07-24-2018 06:40 AM
New Contributor II


I'm currently dipping into using EmbeddableControls by fooling around with the official DivideLines sample. The ViewModel overrides the OpenAsync method of the EmbeddableControl base class to set up some stuff. When I fire up the "Divide Lines" tool from the "Edit" tab the OpenAsync method gets called once as expected.

But if I change the Config.daml and start the tool from it's own ribbon tab page the OpenAsync method gets called twice.. and I can't figure out why?! Since the OpenAsync method subscribes to events etc. it's less than optimal if it gets called multiple times and I have to work around with an isControlOpen flag - which is not so diserable.

So, how come the OpenAsync method is called twice when the tool is started from the ribbon tab but not when called from the "Edit" tab?

Thanks in advance


0 Kudos
0 Replies