Is it possible to load combobox defined in Config.daml automatically on ArcGIS Pro start? Something like loadOnClick="false" for button. I want to load combobox without necessity to go to add-in tab. I need it to have combobox view model created when add-in initialized.
Solved! Go to Solution.
The ComboBox class is created only when it gets visible. This is by design. The Combobox contents can be initialized in the Module Class. You can then access this in your ComboBox class by referencing it from the Module. module1.Current.ComboBoxItems...
You can set the "autoload" attribute for the "insertModule" element in the Config.daml to true in your add-in. This will load your add-in as soon as Pro opens up.
...
<modules>
<insertModule id="Pro_AddIn_Module" className="Module1" autoLoad="true" caption="Module1">
...
No, that doesn't work. ComboBox view model is not created until add-in tab opened in ribbon. Seems like a bug.
The ComboBox class is created only when it gets visible. This is by design. The Combobox contents can be initialized in the Module Class. You can then access this in your ComboBox class by referencing it from the Module. module1.Current.ComboBoxItems...
How do you actually reference the combobox in module1? Can you provide an example. I am trying to do the same only with a prowindow.