EmbeddableControl.OpenAsync is called twice

231
0
07-24-2018 06:40 AM
RehmSoftware
New Contributor III

Hi,

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

Christian

0 Kudos
0 Replies