Hi.
I've created an ArcGIS Pro Add-in which contains some buttons, that I'd like to enable/disable based on a condition. I've read about conditions and states in the ArcGIS Pro SDK Wiki, but I'm not quite sure on which event to subscribe to.
The add-in is dependent on the existence of three layers in the map and two tables (all in the same filegeodatabase). I've already made a method that checks if the layers exists (when the buttons are clicked), but I'd like my buttons to be enabled if the layers exists in the map, and disabled if one or more of the layers are missing.
How do I proceed with this? Which events should I be subscribing to?